Ok, hab die Box jetzt eingebaut (atm nur für admins anzeigbar),
Das grosse Banner überm Header funzt atm immer noch nicht (Seite wird immer noch wie beschrieben zerrissen -.-)
EDIT:
Habs mit der neuen Shoutbox gefunden, nicht grad die ideallösung -.-
Nix gegen die Autoren, die haben gute Arbeit geleistet, aber wie bekomme ich jetzt wieder die Sachen raus, die ich garnich drin haben möchte?
z.B. Soll ein Gast seinen Namen einfragen können und nicht als "gast + ip" da stehn (bei uns logt man sich nicht extra ein, um schnell was in die sb zu kritzeln ...)
und den quatsch davor a lá "es ist jetzt soundso spät und draussen ist es dunkel" würd ich auch gern wieder raushaben ^^
hier mal das, worauf ich mich beziehe:
>>>link<<<
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <!--
####################2006#####################################
### Shoutbox Modifiziert in einer engen Partnerschaft von ###
### ###
### ###
### ETW-Deathzone.de Webby[ETW-DZ] info@etw-dz.de ###
### JFF-Funclan.de Trubel [JFF] Joerg_Boehle@web.de ###
### ###
#############################################################
-->
<?php
defined ('main') or die ( 'no direct access' );
$shoutbox_VALUE_name = getenv("REMOTE_ADDR");
$shoutbox_VALUE_name2 = 'Gast';
$datum=date("j.n.Y");
$zeit=date("@H:i");
if ( isset ( $_GET['delete']) ) {
if ( $_SESSION['authright'] == -5 ) {
db_query("DELETE FROM prefix_shoutbox WHERE id = ".$_GET['delete']);
$_GET['archiv'] = 1;
}
}
if ( empty($_GET['archiv']) ) {
if ( $_SESSION['authright'] <= -1 ) {
$shoutbox_VALUE_name3 = $_SESSION['authname'];
} else {
}
if ( !empty($_POST['shoutbox_submit']) ) {
$_SESSION['shoutbox_shouted'] = TRUE;
$shoutbox_nickname = escape($_POST['shoutbox_nickname'],'string');
$shoutbox_textarea = escape($_POST['shoutbox_textarea'],'textarea');
$shoutbox_textarea = str_replace('[b]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('[/b]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('[i]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('[/i]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('[u]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('[/u]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('[img]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('[img]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('[code]','',$shoutbox_textarea);
$shoutbox_textarea = str_replace('
|
','',$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.'" , "'.$shoutbox_textarea.'" ) ' );
}
}
if ( $_SESSION['authright'] <= -1 ) {
echo '<form action="index.php" method="POST">';
echo "<center>Es ist der<br> $datum $zeit <br>Deine IP:<br><b> $shoutbox_VALUE_name</b><br>";
echo '<input readonly type="text" size="20" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name3.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="30">';
echo '<br /><textarea rows="4" cols="25" name="shoutbox_textarea"></textarea>';
echo '<br><input type="submit" value="...und wech" name="shoutbox_submit"></center>';
echo '</form><table width="100%" align="center" class="border" cellpadding="2" cellspacing="1" border="0">';
} else {
echo '<form action="index.php" method="POST">';
echo "<center>Es ist der<br> $datum $zeit <br>Deine IP:<br><b> $shoutbox_VALUE_name</b><br>";
echo '<input readonly type="text" size="4" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name2.' '.$shoutbox_VALUE_name.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="30">';
echo '<br /><textarea rows="4" cols="25" name="shoutbox_textarea"></textarea>';
echo '<br><input type="submit" value="...und wech" name="shoutbox_submit"></center>';
echo '</form><table width="100%" align="center" 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 "<b><font style=\"background-color: #2E4C2E\">$row->nickname</font></b>";
$shout = '<tr class="'.$class.'"<td>'.bbcode($row->textarea).'</td></tr>';
$shoutneu = wordwrap( $shout, 20, "\n",1);
echo "$shoutneu\n";
}
echo '</table><a class="box" href="?m=boxes/shoutbox&archiv=1" onClick="window.open(\'#\', \'external\',\'width=500,height=400,scrollbars=yes,resizable=no\')" target="external">Archiv</a>';
} else {
$title = $allgAr['title'].' :: Shoutbox Archiv';
$hmenu = 'Shoutbox Archiv';
$design = new design ( $title , $hmenu , 0 );
$design->header();
$class = 'Cnorm';
echo '<table width="100%" align="center" class="border" cellpadding="2" cellspacing="1" border="0"><tr class="Chead"><td><b>Shoutbox Archiv</b></td></tr>';
$erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC');
while ($row = db_fetch_object($erg) ) {
$class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
echo '<tr class="'.$class.'"><td>';
if ( $_SESSION['authright'] == -5 ) {
echo '<b><a href="?m=boxes/shoutbox&delete='.$row->id.'">Loeschen</a> </b>';
}
echo ''.$row->nickname.':</b> '.bbcode($row->textarea).'</td></tr>';
}
echo '</table>';
$design->footer();
}
?>[/code]
Zuletzt modifiziert von steylar am 05.03.2006 - 23:55:59