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
at the bottom before ?> put
in english.php add
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]
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]
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)
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)