Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Clear shoutbox in ACP [2.08]
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

2017-04-05 23:51:41
This works for me. I thought someone had already made a mod to do this, but I couldnt find it, so I mashed my own together from spare parts lol.

In admincp.php, add this link below the others

<td align="center"><a href="admincp.php?action=clearshout"><img src="images/admin/shoutclear.png" border="0" width="118" height="80" alt="" /><br /><?php echo T_("CLEAR_SHOUTBOX"); ?><br /></a></td>


   at the bottom before ?> put

///////////////// CLEAR SHOUTBOX /////////////////////////////

if ($action == "clearshout") {

stdhead(T_("CLEAR_SHOUTBOX"));
error_reporting(E_ALL);

  begin_frame("".T_("CLEAR_SHOUTBOX")."");

?>
<br /><br />
<font size ='3'><center><?php echo T_("CLEAR_SHOUTBOX_TEXT"); ?></center></font>
<br /><br />

  <form enctype="multipart/form-data" method="post" action="admincp.php">
  <input type="hidden" name="action" value="clearshout" />
  <input type="hidden" name="do" value="delete" />
  <table class="f-border" cellspacing="0" cellpadding="5" width="100%" align="center">
  <tr><td colspan="2" align="center"><input type="submit" value="<?php echo T_("CLEAR_SHOUTBOX");?>" /></td></tr>
  </table></form>

  <?php
  end_frame();

  if ($do == "delete"){
        SQL_Query_exec("TRUNCATE TABLE `shoutbox`");
        write_log("Shoutbox cleared by $CURUSER[username]");
        $msg_shout = sqlesc("".T_("SHOUTBOX_CLEARED_MESSAGE")."");
        SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,'".get_date_time()."', 'System' ,".$msg_shout.")");
        autolink ("admincp.php", "<b><font color='#ff0000'>Shoutbox Cleared....</font></b>");

}
  navmenu();
  stdfoot();
}
///////////////END CLEAR SHOUTBOX //////////////////////////////////////////////


   in english.php add

$LANG["CLEAR_SHOUTBOX_TEXT"] = "Are you sure you want to clear the shoutbox? You can't undo this";
$LANG["SHOUTBOX_CLEARED_MESSAGE"] = "The shoutbox has been cleared";
$LANG["CLEAR_SHOUTBOX"] = "Clear Shoutbox";


   you may already have $LANG["CLEAR_SHOUTBOX"] = "Clear Shoutbox"; in your language file. Check and see first

upload image to images/admin/ folder

[ATTACH]2468._xfImport[/ATTACH]
shoutclear.png
shoutclear.png

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-11-21 23:57:17
Thank you, Merci etc ;-)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728