ilch Forum » Ilch Clan 1.1 » Fehlersuche und Probleme » 2 shoutbox.php zusammenfügen

Geschlossen
  1. #1
    User Pic
    N_8_11 Mitglied
    Registriert seit
    05.09.2011
    Beiträge
    57
    Beitragswertungen
    5 Beitragspunkte
    Guten Morgen

    Gerade habe ich die Sprechblasen Shoutbox 1.2 zur HP hinzugefügt nur leider ist die Funktion der vorher installierten No Fake Shoutbox nicht mehr gegeben. Klar die .php wurde ersetzt.
    Könnte mir jemand die beiden .php´s zusammenfügen so das ich in der Sprechblasen Shoutbox auch die No Fake Funktion habe?

    Danke schonmal im voraus

    <?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(#b8db29), to(#5a8f00));
    	background:-moz-linear-gradient(top, #b8db29, #5a8f00);
    	background:-o-linear-gradient(top, #b8db29, #5a8f00);
    	background:linear-gradient(top, #b8db29, #5a8f00);
    }
    /* 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 #5a8f00;
    }
    -->
    </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 '&nbsp;&nbsp;&nbsp;<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>' . bbcode(preg_replace('/([^\s]{' . $allgAr['sb_maxwordlength'] . '})(?=[^\s])/', "$1\n", $row->textarea)) . '</p></blockquote><p>' . $row->nickname . '</p>';
    }
    echo '<a class="box" href="index.php?shoutbox">' . $lang['archiv'] . '</a>';
    
    ?>


    <center>
    <?php 
    
    #   Copyright by Manuel Staechele
    #   Support www.ilch.de
    
    
    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, 20);
    	  $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 ( "" , "'.$datum.'<br>'.$zeit.'<br>'.$shoutbox_VALUE_name.' :</b>" , "<br>'.$shoutbox_textarea.'"  ) ' );
    	  }
      }
      echo '<form action="index.php" method="POST">';
      echo '<input type="text" size="30" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="20">';
      echo '<br /><textarea cols="30" rows="7" 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><table width="90%" 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 '<tr class="'.$class.'"><td><b>'.$row->nickname.'</b> '.preg_replace( '/([^\s]{20})(?=[^\s])/', "$1\n", $row->textarea).'</td></tr>';
      }
      echo '</table><center><a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>';
    echo "<br>Heute ist der<br><b> $datum</b><br>Es ist<br><b> $zeit Uhr</b><br>Und Deine IP (Name)ist:<br><b> $shoutbox_VALUE_name</b><br>";
    ?>
    </center>


    verwendete ilch Version: 1.1 P

    betroffene Homepage: fbam.eu


    Zuletzt modifiziert von N_8_11 am 20.01.2017 - 08:38:18
    Intelligenz, behaupten die Intelligenten, ist die Fähigkeit, sich der Situation anzupassen. Wenn du ein Buch verkehrt in die Hand genommen hast, lerne, es verkehrt zu lesen.

    ---Wieslaw Brudzinski--
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Fehlersuche und Probleme

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten