moniwoll
die smilies kannst du im adminmenue unter smilies hochladen. alle smilies die du da drinn hast siehst nu auch nachher in der shoutbox
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
echo getsmilies ('shoutbox', 0);
<center> <?php # Copyright by Manuel # Support www.ilch.de # # Modulanpassung by Daniel Müller (DeutscheMark) # Support www.grc-clan.6x.to defined ('main') or die ( 'no direct access' ); $shoutbox_VALUE_name = 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']) ) { $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.''.$zeit.''.$datum.'" , "'.$shoutbox_textarea.'" ) ' ); } } echo '<form action="index.php" method="POST">'; echo '<input type="text" size="15" 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">'; } else { //Gaeste echo "<font color=#FFFFFF><b><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 '</form><p><table width="100%" class="border" cellpadding="2" cellspacing="1" border="1" style="border-collapse: collapse" bordercolor="#232323">'; $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT 3'); $class = 'Cnorm'; while ($row = db_fetch_object($erg) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); echo '<tr class="'.$class.'"><td height="20"><p align="center"><b>'.$row->nickname.':</b></td></tr><tr class="'.$class.'"><td><p align="justify"> '.preg_replace( '/([^\s]{10})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>'; } echo '</table><br><b><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</b></a>'; ?> </center>
<center> <?php # Copyright by Manuel # Support www.ilch.de # # Modulanpassung by Daniel Müller (DeutscheMark) # Support www.grc-clan.6x.to defined ('main') or die ( 'no direct access' ); $shoutbox_VALUE_name = 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']) ) { $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.''.$zeit.''.$datum.'" , "'.$shoutbox_textarea.'" ) ' ); } } echo '<form action="index.php" method="POST">'; echo '<input type="text" size="15" 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">'; } else { //Gaeste echo "<font color=#FFFFFF><b><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 '</form><p><table width="100%" class="border" cellpadding="2" cellspacing="1" border="1" style="border-collapse: collapse" bordercolor="#232323">'; $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT 3'); $class = 'Cnorm'; while ($row = db_fetch_object($erg) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); echo '<tr class="'.$class.'"><td height="20"><p align="center"><b>'.$row->nickname.':</b></td></tr><tr class="'.$class.'"><td><p align="justify"> '.BBCode(preg_replace( '/([^\s]{10})(?=[^\s])/', "$1\n", $row->textarea)).'</td></tr>'; } echo '</table><br><b><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</b></a>'; ?> </center>
echo '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b> '.preg_replace( '/([^\s]{10})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>';
echo '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b> '.bbcode(preg_replace( '/([^\s]{20})(?=[^\s])/', "$1\n", $row->textarea)).'</td></tr>';
<?php # Copyright by Manuel # Support www.ilch.de defined ('main') or die ( 'no direct access' ); function shoutboxsmileys($string){ $smileys = array( ':)' => ':happy:#@#-_-_-#@#smile.gif', ':(' => ':sad:#@#-_-_-#@#sad.gif', ':o' => ':eek:#@#-_-_-#@#eek.gif', ':D' => ':biggrin:#@#-_-_-#@#biggrin.gif', ':/' => ':evil:#@#-_-_-#@#evil.gif', ':\'(' => ':frown:#@#-_-_-#@#frown.gif', 'lol' => ':lol:#@#-_-_-#@#lol.gif', ':X' => ':face:#@#-_-_-#@#x-face.gif' ); foreach ($smileys as $icon => $info) { list($emo, $url) = explode('#@#-_-_-#@#', $info); $string = str_replace($icon,'<img src="include/images/smiles2/'.$url.'" border="0" alt="'.$emo.'" title="'.$emo.'" />',$string); } return $string; } if ( loggedin() ) { $shoutbox_VALUE_name = $_SESSION['authname']; } else { $shoutbox_VALUE_name = 'Nickname'; } if ( !empty($_POST['shoutbox_submit']) AND (has_right(-1) OR chk_antispam ('shoutbox')) ) { $shoutbox_nickname = escape($_POST['shoutbox_nickname'],'string'); $shoutbox_nickname = substr($shoutbox_nickname, 0, 15).'@'.date("H:i");; $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.'" , "'.$shoutbox_textarea.'" ) ' ); } } $users = ''; if (has_right(-1)) { $readonly = 'readonly="readonly"'; $user = 'u'; $onfocus = ''; } else { $user = 'g'; $uquery = db_query("SELECT name FROM prefix_user"); while ($uds = db_fetch_object($uquery)) { $username = $uds -> name; if (!empty($users)) $users = $users.', '; $users = $users.'"'.$username.'"'; } $onfocus = 'onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}"'; } echo '<script language="JavaScript" type="text/javascript">'; echo ' user = new Array('.$users.');'; echo ' </script>'; echo ' <script language="JavaScript" src="include/includes/js/comments.js" type="text/javascript"></script>'; echo '<center><form action="index.php" method="POST" name="shoutbox" onsubmit="return chkShoutbox'.$user.'()">'; echo '<input type="text" size="15" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name.'" '.$onfocus.' maxlength="15" '.$readonly.' >'; echo '<br /><textarea style="width: 80%" cols="15" rows="2" name="shoutbox_textarea"></textarea><br />'; echo '<script language="JavaScript" type="text/javascript" src="include/includes/js/bbcode.js"></script>'; echo '<a href="javascript:put_sb(\':)\')"><img src="include/images/smiles2/smile.gif" border ="0"/></a>'; echo '<a href="javascript:put_sb(\':(\')"><img src="include/images/smiles2/sad.gif" border ="0"/></a>'; echo '<a href="javascript:put_sb(\':o\')"><img src="include/images/smiles2/eek.gif" border ="0"/></a>'; echo '<a href="javascript:put_sb(\':D\')"><img src="include/images/smiles2/biggrin.gif" border ="0"/></a>'; echo '<a href="javascript:put_sb(\'lol\')"><img src="include/images/smiles2/lol.gif" border ="0"/></a>'; echo '<a href="javascript:put_sb(\':((\')"><img src="include/images/smiles2/frown.gif" border ="0"/></a>'; echo '<a href="javascript:put_sb(\':X\')"><img src="include/images/smiles2/x-face.gif" border ="0"/></a>'; echo '<a href="javascript:put_sb(\':/\')"><img src="include/images/smiles2/evil.gif" border ="0"/></a><br />'; if (!has_right(-1)) echo get_antispam ('shoutbox', 0); echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">'; echo '</form><table width="90%" class="border" cellpadding="2" cellspacing="1" border="0">'; $erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT 5'); $class = 'Cnorm'; while ($row = db_fetch_object($erg) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); echo '<tr class="'.$class.'"><td><b>'.$row->nickname.':</b><br />'.shoutboxsmileys(preg_replace( '/([^\s]{20})(?=[^\s])/', "$1\n", $row->textarea)).'</td></tr>'; } echo '</table><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a></center>'; ?>
Geschlossen | ||
Zurück zu Module und Modifikationen |