PDA

View Full Version : [PP] ShoutBox /time command mod



Mr Macro
29-05-2007, 08:24 PM
I wrote a little command mod for the staff shout box, you type /time and it shows you the time! WOW!

Download link:

http://www.uploadz.co.uk/441powerpanel-shoutbox-timemod.zip


To install just upload sendshout.php to shoutbox directory.

You then need to alter the 'shoutbox' MySQL table.Go into PHPMyAdmin and run this query:



REATE TABLE `shoutbox` (
`id` int(255) NOT NULL auto_increment,
`username` varchar(500) collate latin1_general_ci NOT NULL,
`message` longtext collate latin1_general_ci NOT NULL,
`ip` varchar(500) collate latin1_general_ci NOT NULL,
`time1` varchar(500) collate latin1_general_ci NOT NULL,
`time2` varchar(500) collate latin1_general_ci NOT NULL,
`time3` varchar(500) collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;


I put a back up of sendshout in there too incase the mod doesn't work.

Enjoy.

ScottDiamond
29-05-2007, 08:27 PM
Hey!

Well done on making your first Mod for PowerPanel. :) +Rep for helping people out and I'm sure it will be appreciated and hope to see more from you. :)

Dentafrice,
29-05-2007, 08:27 PM
ill make a ppmod of this

ScottDiamond
29-05-2007, 08:28 PM
ill make a ppmod of this

This is a PPMod? :)

Mr Macro
29-05-2007, 08:29 PM
Ok, download fixed.

Dentafrice,
29-05-2007, 08:30 PM
not yet ill make one

ScottDiamond
29-05-2007, 08:34 PM
not yet ill make one

I'm a bit confused. This guy's made an add-on for PowerPanel, and you say it's not a PPMod? :S

Mr Macro
29-05-2007, 08:36 PM
He means its not a .ppmod file to add to the auto-update system.

ScottDiamond
29-05-2007, 08:38 PM
He means its not a .ppmod file to add to the auto-update system.

Ah, I get you now. :) Thanks.

Drompo
29-05-2007, 08:42 PM
Thats the bloody long way round
In shoutbox/sendshout.php
After This

if($message == "/prune" && $_SESSION['level'] == "admin") {
## PRUNE
$del = mysql_query("TRUNCATE TABLE shoutbox");
$insert = mysql_query("INSERT INTO shoutbox (`username`, `message`, `ip`) VALUES ('$_SESSION[username]', 'Shoutbox Pruned!', '$ip')") or die('Could not insert data! '.mysql_error());
## /PRUNE
}Add

elseif($message == "/time") {
## Time
$time = date("H:m s");
$insert = mysql_query("INSERT INTO shoutbox (`username`, `message`, `ip`) VALUES ('$_SESSION[username]', 'The Time is $time', '$ip')") or die('Could not insert data! '.mysql_error());
## /Time
}That works Fine

Mr Macro
29-05-2007, 08:45 PM
Thats a good point... i feel a noob now lmao... suppose i am too be honest.

Drompo
29-05-2007, 08:46 PM
Your not a noob. you created a script even if you did go the long way around. I respect that.

+rep

Mr Macro
29-05-2007, 08:49 PM
Actaully, if it did work it would be fugly as it would be somthing like 214951 instead of 21:49:51 ah well.I'm learning.Thats a new syntax in my resource book :)

NEW DOWNLOAD LINK:

http://www.uploadz.co.uk/559powerpanel-shoutbox-timemod.zip

(http://www.uploadz.co.uk/35powerpanel-shoutbox-timemod.zip)
To install, simply upload sendshout.php to the shoutbox directory.

Luckyrare
29-05-2007, 09:05 PM
Well done x] Nice to see people posting these addons/mods

Want to hide these adverts? Register an account for free!