ich habe das Problem auf der Page, dass bei der ShoutBox die Texte bzw Worte mittendrin getrennt werden.
Beispiel:
Registrie rung
Wäre über einen Lösungsansatz sehr dankbar!
Hier das Script:
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | <?php $ILCH_HEADER_ADDITIONS .= ' <style type= "text/css" > <!-- /* Bubble with an isoceles triangle ------------------------------------------ */ .example-right { position:relative; padding:5px 5px; margin:0; color:#fff; background:#5a8f00; /* default background for browsers without gradient support */ /* css3 */ -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; /* NOTE: webkit gradient implementation is not as per spec */ background:-webkit-gradient(linear, left top, left bottom, from(#eb9106), to(#666666)); background:-moz-linear-gradient(top, #eb9106, #666666); background:-o-linear-gradient(top, #eb9106, #666666); background:linear-gradient(top, #eb9106, #666666); } /* display of quote author (alternatively use a class on the element following the blockquote) */ .example-right + p {margin:5px 0 2em 40px; font-style:italic;} /* creates the triangle */ .example-right:after { content: "\00a0" ; display:block; /* reduce the damage in FF3.0 */ position:absolute; bottom:-30px; left:10px; width:0; height:0; border-width:0 20px 30px 0px; border-style:solid; border-color:transparent #666666; } --> </style> <script language= "JavaScript" type= "text/javascript" > <!-- function klapp(div) { with(document.getElementById(div).style) { if (display== "none" ){ display= "inline" ; } else { display= "none" ; }}} //--> <!-- function simple_insert_sb(aTag,eTag) { var input = document.forms[\'shoutbox\'].elements[\'shoutbox_textarea\']; input.focus(); if (typeof document.selection != \'undefined\') { var range = document.selection.createRange(); var insText = range.text; range.text = aTag + insText + eTag; 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(); } else if (typeof input.selectionStart != \'undefined\') { 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 ); 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; } else { var pos = input.value.length; 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 insert_sb ( towrite ) { simple_insert_sb ( towrite, \'\' ); } //--> </script> '; function getsmilies_sb() { global $lang ; $zeilen = 5; $i = 0; $b = '<script language="JavaScript" type="text/javascript">function moreSmilies_sb() { var x = window.open("about:blank", "moreSmilies", "width=250,height=200,status=no,scrollbars=yes,resizable=yes"); ' ; $a = '' ; $erg = db_query( 'SELECT emo, ent, url FROM `prefix_smilies`' ); while ( $row = db_fetch_object( $erg ) ) { $b .= 'x.document.write ("<a href=\"javascript:opener.insert_sb(\'' . addslashes ( addslashes ( $row ->ent)). '\')\">");' ; $b .= 'x.document.write ("<img style=\"border: 0px; padding: 5px;\" src=\"include/images/smiles/' . $row ->url. '\" title=\"' . $row ->emo. '\"></a>");' ; if ( $i <10) { # float einbauen if ( $i % $zeilen == 0 AND $i <> 0) { $a .= '<br /><br />' ; } $a .= '<a href="javascript:insert_sb(\'' . addslashes ( $row ->ent). '\')">' ; $a .= '<img style="margin: 2px;" src="include/images/smiles/' . $row ->url. '" border="0" title="' . $row ->emo. '"></a>' ; } $i ++; } $b .= ' x.document.write("<br /><br /><center><a href=\"javascript:window.close();\">' . $lang [ 'close' ]. '</a></center>"); x.document.close(); }</script>' ; if ( $i >10) { $a .= '<br /><br /><center><a href="javascript:moreSmilies_sb();">' . $lang [ 'more' ]. '</a></center>' ; } $a = $b . $a ; return ( $a ); } // Copyright by Manuel // Support www.ilch.de 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 = '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 ( "<b>' . $shoutbox_nickname . ':</b><br>' . $datum . '|' . $zeit . '" , "' . $shoutbox_textarea . '" ) ' ); } } echo '<form action="index.php?' . $menu ->get_complete() . '" method="POST" name="shoutbox">' ; echo '<input type="text" style="width: 95%" name="shoutbox_nickname" value="' . $shoutbox_VALUE_name . '" onFocus="if (value == \'' . $shoutbox_VALUE_name . '\') {value = \'\'}" onBlur="if (value == \'\') {value = \'' . $shoutbox_VALUE_name . '\'}" maxlength="15">' ; echo '<textarea style="width: 95%;overflow:auto;" rows="2" name="shoutbox_textarea"></textarea>' ; $antispam = get_antispam ( 'shoutbox' , 0); echo $antispam ; if (! empty ( $antispam )) { echo '<br />' ; } echo '<input type="submit" value="' . $lang [ 'formsub' ] . '" name="shoutbox_submit">' ; echo ' <a class="smalfont" href="javascript:void(0)" onfocus="if (this.blur) this.blur()" onclick="javascript:klapp(\'smile\')">Smilies</a>' ; echo '<div id="smile" style="display:none;"><br /><br /><center>' .getsmilies_sb(). '</center></div></form><br />' ; } $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 '<blockquote class="example-right"><p>' . preg_replace( '/([^\s]{' . $allgAr [ 'sb_maxwordlength' ] . '})(?=[^\s])/' , "$1\n" , bbcode( $row ->textarea)) . '</p></blockquote> <p> ' . $row->nickname . ' </p> '; } echo '<a class="box" href="index.php?shoutbox">' . $lang [ 'archiv' ] . '</a>' ; ?> |
betroffene Homepage: externer Link