Oi sauber schnelle Antwort, kurz, knapp und präsziese..... danke dir. Somit ist Punkt zwei erledigt ^^.
zu punkt 1 ich benutze eigentlich die standard Shoutbox von Ilch, welche ich dann durch diese Modifikation --->
externer Link
erweitert habe.
ich hab dann mittels try & error die on oder andere Sache noch rausgenommen (Datum und Uhrzeitanzeige als Überschrift).
Dann hab ich noch das Datum welches nach dem Nicknamen in der Mitteilungszeile normalerweise noch kommt auch rausgenommen, den Zeilenumbrich aufgehoben und ein zwei Leerzeichen eingesetzt. Das ganze zwar wahrscheinlich nicht wirklich 100%tig, aber es scheint, als wenn es funzen würde *g*, ahjo zentriert habschs auch noch *g* ^^
so siehts derzeit bei mir quasi aus:
include/contents/shoutbox.php
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Shoutbox '.$lang['archiv'];
$hmenu = 'Shoutbox '.$lang['archiv'];
$design = new design ( $title , $hmenu );
$design->header();
if (is_siteadmin()) {
# delete
if ($menu->getA(1) == 'd' AND is_numeric($menu->getE(1))) {
db_query("DELETE FROM prefix_shoutbox WHERE id = ".$menu->getE(1));
}
# delete all
if ($menu->get(1) == 'delall') {
if (is_numeric($menu->get(2))) {
$anz = db_result(db_query("SELECT COUNT(*) FROM `prefix_shoutbox`"),0) - $menu->get(2);
if ($anz > 0) {
db_query("DELETE FROM `prefix_shoutbox` LIMIT $anz");
}
}
else { db_query("DELETE FROM `prefix_shoutbox`"); }
}
}
echo '<script type="text/javascript">
function del() {
if (anz = prompt("Wieviele Einträge sollen erhalten bleiben?\n(Es werden die zuletzt geschriebenen erhalten)", "0")) {
if (anz >= 0) { window.location.href = "index.php?shoutbox-delall-"+anz; }
else alert("Du musst eine Zahl größer gleich 0 eingeben");
}
}
</script>';
$class = 'Cnorm';
echo '<table width="100%" align="center" class="border" cellpadding="2" cellspacing="1" border="0"><tr class="Chead"><td><b>Shoutbox '.$lang['archiv'].'</b></td></tr>';
$erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC');
while ($row = db_fetch_assoc($erg) ) {
$class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
echo '<tr class="'.$class.'"><td>';
if ( is_siteadmin() ) {
echo '<a href="index.php?shoutbox-d'.$row['id'].'"><img src="include/images/icons/del.gif" alt="'.$lang['delete'].'" title="'.$lang['delete'].'"></a> ';
}
echo '<b>'.$row['nickname'].':</b> '.preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row['textarea']).'</td></tr>';
}
echo '</table>';
if (is_siteadmin()) {
echo '<a href="javascript:del();">'.$lang['clearshoutbox'].'</a>';
}
$design->footer();
?>
include/boxes/shoutbox.php
<DIV ALIGN="CENTER">
<?php
# Copyright by Manuel
# Support www.ilch.de
# Modifikation: ZSKing
defined ('main') or die ( 'no direct access' );
$datum=date("j.n.Y");
$zeit=date(" H:i ");
if ( loggedin() ) {
$shoutbox_VALUE_name = $_SESSION['authname'];
} else {
$shoutbox_VALUE_name = 'Gast';
}
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` (`nickname`,`textarea`) VALUES ( "'.$shoutbox_nickname.''." um".''.$zeit.''."Uhr".'" , "'.$shoutbox_textarea.'" ) ' );
}
}
if (has_right($allgAr['sb_recht'])){
echo '<form action="index.php" method="POST">';
echo '<br/>' ;
echo '<input type="text" size="10" 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 style="width: 80%" cols="10" rows="2" name="shoutbox_textarea"></textarea><br />';
echo get_antispam ('shoutbox', 0);
echo '<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">';
echo '</form>';
}
echo '<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> '.preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>';
}
echo '</table><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>';
?>
sodale das wärs, sorry hat was gedauert, aber ich bekomms leider nicht mit Zeilennummern hin
Gruß und Danke nochmal
Zuletzt modifiziert von Stoertebeker am 12.03.2009 - 19:14:52