Ich hab mal wieder ein Problem wo ich einfach nicht weiterkomme.
Ich hatte bisher das alte Captcha ( also das mit 3 Zahlen ), nach dem meine Seite aber immer wieder von Spambots heimgesucht wird, die das anscheinend problemlos überwinden, hab ich nun das Captcha von der Version 1.1P übernommen, welches natürlich nicht zum Design passt.
Ich hab bisher alles wo diese Captcha- Abfrage auftaucht angepasst aber an der Shoutbox vom Design, beiß ich mir die Zähne aus. Ich bekomm es einfach nicht hin, dass das Captchabild, Eingabefeld und der Absende- Button in einer Reihe sind.
Ich weiß auch nicht so genau, ob das nun in der php von der originalen Shoutbox geändert wird oder in der Shoutbox php vom Design.....
Hier mal die beiden Bilder, die phps häng ich drunter dran.
Design- Shoutbox -->
Originale Shoutbox -->
Originale PHP
<?php // Copyright by Manuel // Support www.ilch.de defined ('main') or die ('no direct access'); if (loggedin()) { $shoutbox_VALUE_name = $_SESSION['authname']; } else { $shoutbox_VALUE_name = 'Nickname'; } if (has_right($allgAr['sb_recht'])) { 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 . '" , "' . $shoutbox_textarea . '" ) '); header('Location: index.php?' . $menu->get_complete()); } } echo '<form action="index.php?' . $menu->get_complete() . '" 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 style="width: 80%" cols="15" rows="2" name="shoutbox_textarea"></textarea><br />'; $antispam = get_antispam ('shoutbox', 0); echo $antispam; if (!empty($antispam)) { echo '<br />'; } 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>'; ?>
Design- Shoutbox
<?php defined ('main') or die ( 'no direct access' ); function shoutboxsmileys($string){ $smileys = array( ':-)' => ':smilie:#@#-_-_-#@#smile.gif', ':-$' => ':unknow:#@#-_-_-#@#dntknw.gif', ':-(' => ':sad:#@#-_-_-#@#sad.gif', ';-)' => ':blinking:#@#-_-_-#@#blinking.gif', '8-)' => ':cool:#@#-_-_-#@#cool.gif', ':-P' => ':tongueout:#@#-_-_-#@#tongueout.gif', 'cray' => ':cray:#@#-_-_-#@#cray.gif', 'lol' => ':*lol*:#@#-_-_-#@#lol.gif', 'joke' => ':joke:#@#-_-_-#@#jokingly.gif', 'tease' => ':tease:#@#-_-_-#@#tease.gif' , 'yahoo' => ':yahoo:#@#-_-_-#@#yahoo.gif', 'happy' => ':happy:#@#-_-_-#@#happy.gif', 'good' => ':good:#@#-_-_-#@#good.gif', 'quiet' => ':quiet:#@#-_-_-#@#quiet.gif', 'blush' => ':blush:#@#-_-_-#@#blush.gif', 'give_rose' => ':give_rose:#@#-_-_-#@#give_rose.gif', 'give_heart' => ':give_heart:#@#-_-_-#@#give_heart.gif', 'n8' => ':n8:#@#-_-_-#@#n8.gif', 'help' => ':help:#@#-_-_-#@#help.gif', 'spam' => ':spam:#@#-_-_-#@#spam.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; } $datum=date(" j.n.Y"); $zeit=date(" H:i"); 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, 25); $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) AND $insert) { db_query('DELETE FROM `prefix_shoutbox` WHERE nickname = "'.$shoutbox_VALUE_name.'" AND textarea = "'.$shoutbox_textarea.'"' ); db_query('INSERT INTO `prefix_shoutbox` VALUES ( "" , "'.$shoutbox_VALUE_name.'" , "'.$shoutbox_textarea.'" ) ' ); } } ?> <script type="text/javascript"> function opensmiliespopup() { smiliespopup = window.open('about:blank','smiliespopup','width=300,height=400,left=300,top=200'); smiliespopup.document.open(); smiliespopup.document.write('<script>function put_sb(toWrite) {\n' +' top.opener.put_sb(toWrite); window.focus(); \n' +' }<\/script>'); smiliespopup.document.write(' <hr>Smilies<hr>\n' +' <a href="javascript:put_sb(\':)\')"><img src="include\/images\/smiles\/web-smilies_big0054.gif" border ="0"\/><\/a>\n' +' <a href="javascript:put_sb(\'Oh\')"><img src="include\/images\/smiles\/web-smilies_big0029.gif" border ="0"\/><\/a>\n' +' <a href="javascript:put_sb(\':(\')"><img src="include\/images\/smiles\/web-smilies_big0024.gif" border ="0"\/><\/a>\n' +' <a href="javascript:put_sb(\';)\')"><img src="include\/images\/smiles\/web-smilies_big0017.gif" border ="0"\/><\/a>\n' +' <a href="javascript:put_sb(\'Öm\')"><img src="include\/images\/smiles\/grosse-big-smilies-0774.gif" border ="0"\/><\/a>\n' +' <a href="javascript:put_sb(\'wow\')"><img src="include\/images\/smiles\/grosse-big-smilies-0787.gif" border ="0"\/><\/a>\n' +' <a href="javascript:put_sb(\'grrr\')"><img src="include\/images\/smiles\/grosse-big-smilies-0789.gif" border ="0"\/><\/a>\n' +' <a href="javascript:put_sb(\'heul\')"><img src="include\/images\/smiles\/web-smilies_big0025.gif" border ="0"\/><\/a>\n' +' <a href="javascript:put_sb(\'hä\')"><img src="include\/images\/smiles\/web-smilies_big0074.gif" border ="0"\/><\/a>\n' +' <hr>\n' +' <div class="Cnorm"><a href="javascript:put_sb(\'spam\')"><img src="include\/images\/smiles\/exclamation.png" border ="0"\/><\/a><\/div>\n' +' <hr><a href="javascript:void(0)" onclick="window.close();">Fenster schließen<\/a>'); smiliespopup.document.close(); } // S-Box-Smileys START function simple_insert_sb(aTag,eTag) { var input = document.forms['shoutbox'].elements['shoutbox_textarea']; input.focus(); /* für Internet Explorer */ if(typeof document.selection != 'undefined') { /* Einfügen des Formatierungscodes */ var range = document.selection.createRange(); var insText = range.text; range.text = aTag + insText + eTag; /* Anpassen der Cursorposition */ range = document.selection.createRange(); if (insText.length == 0) { range.move('character', -eTag.length); } else { range.moveStart('character', aTag.length + insText.length + eTag.length); } range.select(); } /* für neuere auf Gecko basierende Browser */ else if(typeof input.selectionStart != 'undefined') { /* Einfügen des Formatierungscodes */ var start = input.selectionStart; var end = input.selectionEnd; var insText = input.value.substring(start, end); input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end); /* Anpassen der Cursorposition */ var pos; if (insText.length == 0) { pos = start + aTag.length; } else { pos = start + aTag.length + insText.length + eTag.length; } input.selectionStart = pos; input.selectionEnd = pos; } /* für die übrigen Browser */ else { /* Abfrage der Einfügeposition */ var pos = input.value.length; /* Einfügen des Formatierungscodes */ var insText = prompt("Bitte geben Sie den zu formatierenden Text ein:"); input.value = input.value.substr(0, pos) + aTag + insText + eTag + input.value.substr(pos); } } function put_sb ( towrite ) { simple_insert_sb ( towrite, '' ); } // S-Box-Smileys END </script> <?php echo ' <div style="width:551px; height:60px; overflow:auto; border:1px solid #0094FF; margin:0px;"> <table width="100%" cellpadding="2" cellspacing="1" border="0">'; $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 style="font-size:10px;"><b>'.$row->nickname.' : <br/></b></td><td style="font-size:10px;"> '.shoutboxsmileys($time.preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", bbcode($row->textarea))).'</td> </tr>'; } echo '</table></div>'; if (has_right($allgAr['sb_recht'])) { echo '<div style="padding-top:3px;"> <form method="post" name="shoutbox" action="index.php"> <input type="text" style="height: 13px;overflow:hidden;" name="shoutbox_textarea" value="" size="90"></textarea>'; echo' <input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit"><br/>'; echo get_antispam ('shoutbox', 0); echo ' <input type="text" size="1" style="visibility:hidden;" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="15"> <a href="javascript:void(0)" onclick="opensmiliespopup()">Smilies einfügen</a> | <a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a> </form></div>'; }
Schon mal danke für die Hilfe, ich häng nämlich wirklich fest....:S
verwendete ilch Version: 1.1 P
betroffene Homepage: externer Link
Zuletzt modifiziert von supernuke am 08.12.2013 - 11:47:00