Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default [PP] ShoutBox /time command mod

    I wrote a little command mod for the staff shout box, you type /time and it shows you the time! WOW!

    Download link:


    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:

    Code:
    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.
    Last edited by Mr Macro; 29-05-2007 at 08:35 PM.
    James


    Connected to reality through a proxy server.

  2. #2
    ScottDiamond Guest

    Default

    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.

  3. #3
    Join Date
    May 2007
    Location
    Nebo, NC, USA
    Posts
    2,517
    Tokens
    0

    Latest Awards:

    Default

    ill make a ppmod of this

  4. #4
    ScottDiamond Guest

    Default

    Quote Originally Posted by Dentafrice, View Post
    ill make a ppmod of this
    This is a PPMod?

  5. #5
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    Ok, download fixed.
    Last edited by Mr Macro; 29-05-2007 at 08:34 PM.
    James


    Connected to reality through a proxy server.

  6. #6
    Join Date
    May 2007
    Location
    Nebo, NC, USA
    Posts
    2,517
    Tokens
    0

    Latest Awards:

    Default

    not yet ill make one

  7. #7
    ScottDiamond Guest

    Default

    Quote Originally Posted by Dentafrice, View Post
    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

  8. #8
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    He means its not a .ppmod file to add to the auto-update system.
    James


    Connected to reality through a proxy server.

  9. #9
    ScottDiamond Guest

    Default

    Quote Originally Posted by Mr Macro View Post
    He means its not a .ppmod file to add to the auto-update system.
    Ah, I get you now. Thanks.

  10. #10
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    Thats the bloody long way round
    In shoutbox/sendshout.php
    After This
    PHP Code:
    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
    PHP Code:
    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
    Last edited by Drompo; 29-05-2007 at 08:45 PM.


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •