Ich würde das Ding nicht benutzen!
Nimm mal meine Shoutbox:
<?php
# Copyright by Manuel
# Support www.ilch.de
# Modifikation: ZSKing
echo '<center>' ;
defined ('main') or die ( 'Glaubst du, du kannst hier Daten klauen?! Falsch gedacht! :p' );
$datum=date("j.n.");
$zeit=date(" H:i ");
$text = BBcode($text);
if ( loggedin() ) {
$shoutbox_VALUE_name = $_SESSION['authname'];
} else {
$shoutbox_VALUE_name = 'SRX-Gast';
}
if ( !empty($_POST['shoutbox_submit']) ) {
$shoutbox_nickname = escape($_POST['shoutbox_nickname'],'string');
$shoutbox_nickname = substr($shoutbox_nickname, 0, 15);
$shoutbox_textarea = escape($_POST['shoutbox_textarea'],'textarea');
$shoutbox_textarea = preg_replace("/\[.?(url|b|i|u|img|code|quote)[^\]]*?\]/i","",$shoutbox_textarea);
$shoutbox_textarea = strip_tags($shoutbox_textarea);
if ( !empty($shoutbox_nickname) AND !empty($shoutbox_textarea) ) {
db_query('INSERT INTO `prefix_shoutbox` VALUES ( "" , "'.$shoutbox_nickname.' '."am".' '.$datum.' '.'<br/>'.' '."um".' '.$zeit.' '."Uhr".' " , "'.$shoutbox_textarea.'" ) ' );
}
}
echo '<form action="index.php" method="POST">';
echo "<center><br>Uhrzeit: $zeit Uhr<br/>Datum: $datum"; echo '<br/>' ; echo '<input type="text" size="13" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="15">';
echo '<br /><textarea cols="15" rows="2" name="shoutbox_textarea" ></textarea><br />';
echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">';
echo '</form><table width="140" class="border" cellpadding="2" cellspacing="1" border="0">';
$erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT 10');
$class = 'Cnorm';
while ($row = db_fetch_object($erg) ) {
$class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
echo '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b> '.preg_replace( '/([^\s]{10})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>';
}
echo '</table> <a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>' ;
echo '</center>' ;
?>
Einfach den Code in deiner /include/boxes/shoutbox.php mit dem oben ersetzen und fertig! Es sind noch mehr Funktionen dabei!
Zuletzt modifiziert von ZSKing am 28.12.2007 - 19:02:54