Ja ich habe deine shoutbox.php komplett so wie du sie hier rein gepostet hast bei mir eingefügt!
Ich habe die Smilies dann im ordner angepasst, vom namen, und dann funktionierte alles außer, das die smilies per klick in der Shoutbox stehen!:( ich habe echt keine ahnung woran das liegen kann!
Hier die Shoutbox.php in include/boxen/shoutbox.php
<?php
# Copyright by Manuel Staechele
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
function shoutboxsmileys($string){
$smileys = array( ':)' => ':happy:#@#-_-_-#@#smile.gif', ':(' => ':sad:#@#-_-_-#@#beee.gif', ':-O' => ':eek:#@#-_-_-#@#boredom.gif', ':D' => ':biggrin:#@#-_-_-#@#biggrin.gif', ':/' => ':evil:#@#-_-_-#@#help.gif', ':\'(' => ':frown:#@#-_-_-#@#cray.gif', ':P' => ':*g*:#@#-_-_-#@#lol.gif', ':X' => ':face:#@#-_-_-#@#wink.gif' );
foreach ($smileys as $icon => $info) {
list($emo, $url) = explode('#@#-_-_-#@#', $info);
$string = str_replace($icon,'<img src="include/images/sBsmileys/'.$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 ");
if ( $_SESSION['authright'] <= -1 ) {
// registrierte User
if ( loggedin() ) {
$shoutbox_VALUE_name = $_SESSION['authname'];
} else {
$shoutbox_VALUE_name = 'Nickname';
}
if ( !empty($_POST['shoutbox_submit']) AND chk_antispam ('shoutbox')) {
$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 ( "" , "am '.$datum.' um '.$zeit.'<br>von '.$shoutbox_VALUE_name.':<br>" , "'.$shoutbox_textarea.'" ) ' );
}
}
if (has_right($allgAr['sb_recht'])){
echo '<form action="index.php" method="POST" name="shoutbox">';
echo '<input type="text" size="25" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="20">';
echo '<br /><textarea cols="28" rows="5" name="shoutbox_textarea"></textarea><br />';
echo '<a href="javascript:put_sb(\':)\')"><img src="include/images/sBsmileys/smile.gif" border ="0"/></a>';
echo '<a href="javascript:put_sb(\':(\')"><img src="include/images/sBsmileys/beee.gif" border ="0"/></a>';
echo '<a href="javascript:put_sb(\':-O\')"><img src="include/images/sBsmileys/boredom.gif" border ="0"/></a>';
echo '<a href="javascript:put_sb(\':D\')"><img src="include/images/sBsmileys/biggrin.gif" border ="0"/></a>';
echo '<a href="javascript:put_sb(\':P\')"><img src="include/images/sBsmileys/lol.gif" border ="0"/></a>';
echo '<a href="javascript:put_sb(\':\\\'(\')"><img src="include/images/sBsmileys/cray.gif" border ="0"/></a>';
echo '<a href="javascript:put_sb(\':X\')"><img src="include/images/sBsmileys/wink.gif" border ="0"/></a></ br>';
echo '<center><input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit"> <a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a></center>';
echo '</form>';
}
}
else {
//Gaeste
echo "<font><b>Hallo Gast,<br>zum Posten<br>bitte Einloggen!<p></p></b></font>";
echo '</form><table width="100%" align="center" class="border" cellpadding="2" cellspacing="1" border="0">';
}
echo '
<MARQUEE behavior= "scroll" align= "center" direction= "up" height="200" scrolldelay="3" scrollamount="1" onmouseover=this.stop() onmouseout=this.start()>
<table width="90%" 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></marquee><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>';
?>
Muss ich vllt in der include/contents/shoutbox.php auch was ändern?
Wer kämpft kann verlieren, wer nicht kämpft, hat schon verloren!