Clear Chatroom text function
Posted: Thu 8. Jan 2004, 16:19
Hi Oliver [et al],
Apologies in advance Oliver if this is an unwelcome post - I will delete it if you ask.
----------------------
If like me you would like to clear the chatroom text without running to phpmyadmin then I have a very dirty cheap way to do it.
create a new .php... includes/inc_Lib/admin.EmptyChat.php
then add this line to includes/inc_Lang/Backend/en/lang.inc.php at the end of the //phpwcms.php section...
then in phpwcms.php add this new line of code directly after this existing line...
$subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="5" width="1"></td></tr>'."\n";
then add this new line of code directly after this existing line...
case 11: //Templates
include_once "./include/inc_tmpl/admin.templates.tmpl.php";
break;
This works for me but you may want to back up your database first ![Wink ;)](./images/smilies/icon_wink.gif)
I can't support this function, accept no liability and will offer no refunds.
a new version with a warning/notification box and nicer varification will follow some day![Wink ;)](./images/smilies/icon_wink.gif)
Apologies in advance Oliver if this is an unwelcome post - I will delete it if you ask.
----------------------
If like me you would like to clear the chatroom text without running to phpmyadmin then I have a very dirty cheap way to do it.
create a new .php... includes/inc_Lib/admin.EmptyChat.php
Code: Select all
<?PHP
/*************************************************************************************
Copyright notice
(c) 2002-2003 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
This script is part of PHPWCMS. The PHPWCMS web content management system is
free software; you can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
A copy is found in the textfile GPL.txt and important notices to the license
from the author is found in LICENSE.txt distributed with these scripts.
This script is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/
?>
<?php
$sql = "DELETE FROM ".DB_PREPEND."phpwcms_chat;";
if($result = mysql_query($sql, $db) or die("error Deleting Chat repository"))
echo "Chat Repository has now been cleared";
?>
Code: Select all
$BL['be_subnav_admin_EmptyChat'] = 'Clear Chat Text';
$subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="5" width="1"></td></tr>'."\n";
Code: Select all
$subnav .= '<tr><td colspan="2"><img src="img/leer.gif" height="5" width="1"></td></tr>'."\n";
$subnav .= subnavtext($BL['be_subnav_admin_EmptyChat'], "phpwcms.php?do=admin&p=12", $p, "12", 0);
case 11: //Templates
include_once "./include/inc_tmpl/admin.templates.tmpl.php";
break;
Code: Select all
case 12: //EmptyChat
include_once "./include/inc_lib/admin.EmptyChat.php";
break;
![Wink ;)](./images/smilies/icon_wink.gif)
I can't support this function, accept no liability and will offer no refunds.
a new version with a warning/notification box and nicer varification will follow some day
![Wink ;)](./images/smilies/icon_wink.gif)