ich habe ein kleines Problem mit der Shoutbox.
Zuerst mal den Code:
<div align="center";> <?php # Copyright by Manuel Staechele # Support www.ilch.de # modifieziert von: Burli defined ('main') or die ( 'no direct access' ); function shoutboxsmileys($string){ $smileys = array( '8-)' => ':cool:#@#-_-_-#@#cool.gif', ':-P' => ':tongueout:#@#-_-_-#@#tongueout.gif', ':´-(' => ':cray:#@#-_-_-#@#cray.gif', 'lol' => ':*lol*:#@#-_-_-#@#lol.gif', 'joke' => ':joke:#@#-_-_-#@#jokingly.gif', 'happy' => ':happy:#@#-_-_-#@#happy.gif', 'yahoo' => ':yahoo:#@#-_-_-#@#yahoo.gif', 'n8' => ':n8:#@#-_-_-#@#n8.gif', 'help' => ':help:#@#-_-_-#@#help.gif', 'grr' => ':grr:#@#-_-_-#@#diablo.gif' ); foreach ($smileys as $icon => $info) { list($emo, $url) = explode('#@#-_-_-#@#', $info); $string = str_replace($icon,'<img src="include/images/shoutboxsmileys/'.$url.'" border="0" alt="'.$emo.'" title="'.$emo.'" />',$string); } return $string; } $shoutbox_VALUE_name2 = getenv("REMOTE_ADDR"); $datum=date("j.n.Y"); $zeit=date(" H:i "); $width = $allgAr['sbbox_width']; $height = $allgAr['sbbox_height']; echo '<style type="text/css"> { width: '.$width.'; height: '.$height.'; } </style>'; if (loggedin()) { $shoutbox_VALUE_name = $_SESSION['authname']; $func ='readonly'; } else { $shoutbox_VALUE_name = 'Nickname'; $func ='onFocus="if (value == \'' . $shoutbox_VALUE_name . '\') {value = \'\'}" onBlur="if (value == \'\') {value = \'' . $shoutbox_VALUE_name . '\'}"'; } if ( !empty($_POST['shoutbox_submit']) AND chk_antispam ('shoutbox')) { $shoutbox_nickname = escape($_POST['shoutbox_nickname'],'string'); $shoutbox_nickname = substr($shoutbox_nickname, 0, 45); $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` (`nickname`, `textarea`) VALUES ( "'.$datum.'/ '.$zeit.''.$shoutbox_VALUE_name2.' <br>'.$shoutbox_nickname.'" , "<br>'.$shoutbox_textarea.'" ) ' ); } } if (has_right($allgAr['sb_recht'])){ echo '<form action="index.php" method="POST" name="shoutbox">'; echo '<input type="text" size="29" name="shoutbox_nickname" value="' . $shoutbox_VALUE_name . '" maxlength="40" '.$func.'>'; echo '<br /><textarea style="width: 99%" cols="15" rows="3" name="shoutbox_textarea"></textarea><br />'; echo get_antispam ('shoutbox', 0); echo '<div style="overflow:no; width: '.$width.';">'; echo '<hr>'; echo '<script language="JavaScript" type="text/javascript" src="include/includes/js/bbcode.js"></script>'; echo '<a href="javascript:put_sb(\'8-)\')"><img src="include/images/shoutboxsmileys/cool.gif" border ="0"/></a> '; echo '<a href="javascript:put_sb(\':-P\')"><img src="include/images/shoutboxsmileys/tongueout.gif" border ="0"/></a> '; echo '<a href="javascript:put_sb(\':´-(\')"><img src="include/images/shoutboxsmileys/cray.gif" border ="0"/></a> '; echo '<a href="javascript:put_sb(\'lol\')"><img src="include/images/shoutboxsmileys/lol.gif" border ="0"/></a> <br>'; echo '<a href="javascript:put_sb(\'joke\')"><img src="include/images/shoutboxsmileys/jokingly.gif" border ="0"/></a> '; echo '<a href="javascript:put_sb(\'happy\')"><img src="include/images/shoutboxsmileys/happy.gif" border ="0"/></a> '; echo '<a href="javascript:put_sb(\'yahoo\')"><img src="include/images/shoutboxsmileys/yahoo.gif" border ="0"/></a> '; echo '<a href="javascript:put_sb(\'n8\')"><img src="include/images/shoutboxsmileys/n8.gif" border ="0"/></a> '; echo '<a href="javascript:put_sb(\'help\')"><img src="include/images/shoutboxsmileys/help.gif" border ="0"/></a> '; echo '<a href="javascript:put_sb(\'grr\')"><img src="include/images/shoutboxsmileys/diablo.gif" border ="0"/></a> '; echo '<hr>'; echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">'; echo '</form>'; echo '</div>'; } echo '<div style="overflow:auto; width: '.$width.'; height: '.$height.';">'; echo '<table width="100%" class="border" cellpadding="2" cellspacing="1" border="0">'; $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT '.(is_numeric($allgAr['sb_limit'])?$allgAr['sb_limit']:5)); $class = 'Cnorm'; while ($row = db_fetch_object($erg) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); echo '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b> '.shoutboxsmileys(preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row->textarea)).'</td></tr>'; } echo "</table></div><center><br>Es ist der: $datum <br>um $zeit <br>Deine IP:<b> $shoutbox_VALUE_name2</b><br>wird gespeichert"; echo '<br><b><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a></b></center>'; ?> </div>
Ich möchte jetzt in Zeile 63 und 76 für den Absendebutton und den Text "Archiv" Grafiken einbinden.
Habe ich auch gemacht, nur konnten dann einige, nicht alle, nichts mehr in die Shoutbox schreiben, nach Absenden wurde es einfach nicht übernommen.
Dazu habe ich
echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">';
durch
echo '<input type="image" src="/include/images/boxes/absenden.jpg" value="'.$lang['formsub'].'" name="shoutbox_submit">';
und
echo '<br><b><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a></b></center>';
durch
echo '<br><b><a class="box" href="index.php?shoutbox"><img src="include/images/boxes/archiv_box.jpg" border="0"></a></b></center>';
ersetzt.
Funktioniert auch, nur leider eben nicht bei allen, unabhängig ob Gast oder reg. User. Nur ab Superuser aufwärts scheint es keine Probleme zu geben.
Wo ist der Fehler? Meine Kenntnisse sind leider nur rudimentär.
betroffene Homepage: externer Link