ilch Forum » Ilch Clan 1.1 » Fehlersuche und Probleme » Text nicht angezeigt

Geschlossen
  1. #1
    User Pic
    xerin Mitglied
    Registriert seit
    16.10.2012
    Beiträge
    7
    Beitragswertungen
    0 Beitragspunkte
    Hallo User,

    ich habe folgendes problem wenn ich was im Forum poste oder News poste wird der geschriebene text nicht angezeigt.

    jemand ein plan woran dann liegen kann?

    danke im vorraus.

    Mit freundlichen Grüßen

    YO

    betroffene Homepage: externer Link
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    BigEasy Mitglied
    Registriert seit
    09.09.2012
    Beiträge
    149
    Beitragswertungen
    11 Beitragspunkte
    zeig mal die showposts.htm in templates, sowie show_posts.php in contents
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    xerin Mitglied
    Registriert seit
    16.10.2012
    Beiträge
    7
    Beitragswertungen
    0 Beitragspunkte
    hier
    Showposts.htm in templates/forum ordner
    <br />
    
    
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="60%">{SITELINK}</td>
        <td width="40%" align="right">{ANTWORTEN}</td>
      </tr>
    </table>
    <table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
      <tr class="Chead"> 
        <th colspan="2" height="30"><b>{TOPICNAME}</b></td>
      </tr>
    	{EXPLODE}
      <tr class="{class}"> 
        <td width="20%" valign="top"><a name="{id}"></a>{erst}<br /><font class="smalfont">{rang}{avatar}{posts}</font></td>
        <td width="80%" valign="top">
    		  <div style="float: left; width:50%;" class="smalfont"><a class="smallfont" href="index.php?forum-showposts-{TID}#{id}" title="{i}. Post in diesem Thema">#</a>&nbsp;{date}</div>
          <div style="float: right; width: 50%; text-align:right;">{delete} &nbsp; {change} &nbsp; <a href="index.php?forum-newpost-{TID}-z{id}">{_lang_quote}</a></div>
          <br />
          <hr />      
    			<br />
    									
    									{txt}
    					        {sig}
    
    		</td>
      </tr>
      <tr> 
        <td colspan="2" class="Cdark" height="10"></td>
      </tr>
    	{EXPLODE}
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="60%">{SITELINK}</td>
        <td width="40%" align="right">{ANTWORTEN}</td>
      </tr>
    </table>
    {EXPLODE}
    <br />
    <strong>{_lang_administrattopic}</strong><br />
    <a href="javascript:renametopic()">{_lang_rename}</a>
    &nbsp;,&nbsp;
    <a href="index.php?forum-edittopic-{tid}-2">{_lang_delete}</a>
    &nbsp;,&nbsp;
    <a href="index.php?forum-edittopic-{tid}-3">{_lang_shift}</a>
    &nbsp;,&nbsp;
    <a href="index.php?forum-edittopic-{tid}-4-2">{status}</a>
    &nbsp;,&nbsp;
    <a href="index.php?forum-edittopic-{tid}-5">{festnorm}</a>
    
    <script language="JavaScript" type="text/javascript">
    <!--
      function renametopic () {
    	  var x = prompt ( "Bitte den neuen Namen vom Thema eintragen" , "" );
    		if ( x ) {
    		  document.location.href="index.php?forum-edittopic-{tid}-1=0&newTopic="+x;
    		}
    	}
    	
    //-->
    </script>

    <?php
    #   Copyright by: Manuel
    #   Support: www.ilch.de
    
    
    defined ('main') or die ( 'no direct access' );
    
    # check ob ein fehler aufgetreten ist.
    check_forum_failure($forum_failure);
    
    # toipc als gelesen markieren
    $_SESSION['forumSEE'][$fid][$tid] = time();
    
    $title = $allgAr['title'].' :: Forum :: '.$aktTopicRow['name'].' :: Beitr&auml;ge zeigen';
    $hmenu  = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b>'.aktForumCats($aktForumRow['kat']).'<b> &raquo; </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a><b> &raquo; </b>';
    $hmenu .= $aktTopicRow['name'].$extented_forum_menu_sufix;
    $design = new design ( $title , $hmenu, 1);
    $design->header();
    
    
    # Topic Hits werden eins hochgesetzt.
    db_query('UPDATE `prefix_topics` SET hit = hit + 1 WHERE id = "'.$tid.'"');
    
    # mehrere seiten fals gefordert
    $limit = $allgAr['Fpanz'];  // Limit
    $page = ($menu->getA(3) == 'p' ? $menu->getE(3) : 1 );
    $MPL = db_make_sites ($page , "WHERE tid = ".$tid , $limit , 'index.php?forum-showposts-'.$tid , 'posts' );
    $anfang = ($page - 1) * $limit;
    
    $antworten = '';
    if (($aktTopicRow['stat'] == 1 AND $forum_rights['reply'] == TRUE) OR ($_SESSION['authright'] <= '-7' OR $forum_rights['mods'] == TRUE)) {
      $antworten = '<b>[ <a href="index.php?forum-newpost-'.$tid.'">'.$lang['answer'].'</a> ]</b>';
    }
    
    $class = 'Cmite';
    
    $tpl = new tpl ( 'forum/showpost' );
    $ar = array (
      'SITELINK' => $MPL,
      'tid' => $tid,
    	'ANTWORTEN' => $antworten,
    	'TOPICNAME' => $aktTopicRow['name']
    );
    $tpl->set_ar_out($ar,0);
    $i = $anfang +1;
    $ges_ar = array ('wurstegal', 'maennlich', 'weiblich');
    $erg = db_query("SELECT geschlecht, prefix_posts.id,txt,time,erstid,erst,sig,avatar,posts FROM `prefix_posts` LEFT JOIN prefix_user ON prefix_posts.erstid = prefix_user.id WHERE tid = ".$tid." ORDER BY time LIMIT ".$anfang.",".$limit);
    while($row = db_fetch_assoc($erg)) {
    
    	$class = ( $class == 'Cnorm' ? 'Cmite' : 'Cnorm' );
    
    	# define some vars.
    	$row['sig'] = ( empty($row['sig']) ? '' : '<br /><hr style="width: 50%;" align="left">'.bbcode($row['sig']) );
    	$row['TID'] = $tid;
    	$row['class'] = $class;
    	$row['date'] = date ('d.m.Y - H:i:s', $row['time'] );
    	$row['delete'] = '';
    	$row['change'] = '';
    	if (!is_numeric($row['geschlecht'])) { $row['geschlecht'] = 0; }
    	if (file_exists($row['avatar'])) { $row['avatar'] = '<br /><br /><img src="'.$row['avatar'].'" alt="User Pic" border="0" /><br />'; }
    	elseif ($allgAr['forum_default_avatar']) { $row['avatar'] = '<br /><br /><img src="include/images/avatars/'.$ges_ar[$row['geschlecht']].'.jpg" alt="User Pic" border="0" /><br />'; }
     	else { $row['avatar'] = ''; }
        $row['rang']   = userrang ($row['posts'],$row['erstid']);
    	$row['txt']    = (isset($_GET['such']) ? markword(bbcode ($row['txt']),$_GET['such']) : bbcode ($row['txt']) );
    	$row['i']      = $i;
        $row['page']   = $page;
    
    	if ( $row['posts'] != 0 ) {
    		$row['erst'] = '<a href="index.php?user-details-'.$row['erstid'].'"><b>'.$row['erst'].'</b></a>';
    	} elseif ( $row['erstid'] != 0 ) {
            $row['rang'] = 'gel&ouml;schter User';
        }
    
    	if ($forum_rights['mods'] == TRUE AND $i>1) {
    	  $row['delete'] = '<a href="index.php?forum-delpost-'.$tid.'-'.$row['id'].'">'.$lang['delete'].'</a>';
    	}
    	if ( $forum_rights['reply'] == TRUE AND loggedin() ) {
    	  $row['change'] = '&nbsp;<a href="index.php?forum-editpost-'.$tid.'-'.$row['id'].'">'.$lang['change'].'</a>';
    	}
    	$row['posts']  = ($row['posts']?'<br />Posts: '.$row['posts']:'').'<br />';
    	$tpl->set_ar_out($row,1);
    
      $i++;
    }
    
    $tpl->set_ar_out( array ( 'SITELINK' => $MPL, 'ANTWORTEN' => $antworten ) , 2 );
    
    if (loggedin()) {
      if ($menu->get(3) == 'topicalert') {
        if (1 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) {
          db_query("DELETE FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid);
        } else {
          db_query("INSERT INTO prefix_topic_alerts (tid,uid) VALUES (".$tid.", ".$_SESSION['authid'].")");
        }
      }
    
      echo 'Optionen:';
      if (1 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) {
        echo '<br />- <a href="index.php?forum-showposts-'.$tid.'-topicalert">'.$lang['nomailonreply'].'</a><br />';
      } else {
        echo '<br />- <a href="index.php?forum-showposts-'.$tid.'-topicalert">'.$lang['mailonreply'].'</a><br />';
      }
    }
    
    if ( $forum_rights['mods'] == TRUE ) {
      $tpl->set ( 'status', ($aktTopicRow['stat'] == 1 ? $lang['close'] : $lang['open'] ) );
    	$tpl->set ( 'festnorm', ($aktTopicRow['art'] == 0 ? $lang['fixedtopic'] : $lang['normaltopic'] ) );
    	$tpl->set('tid',$tid);
    	$tpl->out(3);
    }
    $design->footer();
    ?>


    !EDIT - Bitte für Codeblöcke nicht Zitat [quote] sondern Code [code] verwenden. Gruß Lord|S.


    Zuletzt modifiziert von Lord|Schirmer am 16.10.2012 - 08:07:54
    0 Mitglieder finden den Beitrag gut.
  4. #4
    User Pic
    BigEasy Mitglied
    Registriert seit
    09.09.2012
    Beiträge
    149
    Beitragswertungen
    11 Beitragspunkte
    also bezüglich textausgabe sieht das erstmal normal aus was die variablen angeht. kann es mir aber heute abend erst genau ansehen.
    1 Mitglieder finden den Beitrag gut.
  5. #5
    User Pic
    xerin Mitglied
    Registriert seit
    16.10.2012
    Beiträge
    7
    Beitragswertungen
    0 Beitragspunkte
    wenns hilft habe vollen root zugriff^^
    0 Mitglieder finden den Beitrag gut.
  6. #6
    User Pic
    blakedj06 gelöschter User
    Jo wie ich sehe nutzt Du PHP 5.4.7 dafür bitte mal folgenden Beitrag lesen und die Einstellungen so übernehmen. Danach haut alles wieder hin!

    www.ilch.de/forum-showposts-47361.html#337043

    Für die Texte ist die class/bbcode.php relevant bzw. die htmlentities was Du aber mit dem o.g. Link allein hinbekommen solltest.

    greetz: BLaKe


    PS: Warum nutzt auf Du auf einem Windows Server Apache? Der IIS ist doch da viel besser vorausgesetzt Du nutzt min. win 2008


    Zuletzt modifiziert von blakedj06 am 16.10.2012 - 23:49:33
    1 Mitglieder finden den Beitrag gut.
  7. #7
    User Pic
    xerin Mitglied
    Registriert seit
    16.10.2012
    Beiträge
    7
    Beitragswertungen
    0 Beitragspunkte
    Danke habe Probleme mit mein IIS plaesk will da net mitspielen ^^ aber danke
    0 Mitglieder finden den Beitrag gut.
  8. #8
    User Pic
    xerin Mitglied
    Registriert seit
    16.10.2012
    Beiträge
    7
    Beitragswertungen
    0 Beitragspunkte
    Hat immer noch nicht geklappt immer noch dass gleiche problem
    0 Mitglieder finden den Beitrag gut.
  9. #9
    User Pic
    blakedj06 gelöschter User
    poste mal deine include/includes/class/bbcode.php
    0 Mitglieder finden den Beitrag gut.
  10. #10
    User Pic
    xerin Mitglied
    Registriert seit
    16.10.2012
    Beiträge
    7
    Beitragswertungen
    0 Beitragspunkte
    <?php
    #   Copyright by Thomas Bowe [Funjoy]
    #   Support bbcode@phpline.de
    #   link www.phpline.de
    
    /* Module - Information
    * -------------------------------------------------------
    * Hier könnt ihr eure Module includieren lassen.
    * Wenn Ihr selber Module zum Highlight programmiert
    * denkt daran das ihr auch noch das Parsen hier definieren müsst.
    * und in der bbcode_config.php Datei müsstet ihr die Option auch noch einstellen.
    * um ein Beispiel zu haben schaut euch die Funktion _htmlblock() am besten mal an.
    * und in Zeile 308 und Zeile 490 habt ihr ein Beispiel wie ihr die Parsebefehle schreiben könnt.
    */
    
    //> Bitte denkt daran das, dass Modul html.php immer unter dem Modul css.php sein muss.
    //> Modul [css.php]
    	if(file_exists("include/includes/class/highlight/css.php")) {
    		require_once("include/includes/class/highlight/css.php");
    	}
    
    //> Modul [html.php]
    	if(file_exists("include/includes/class/highlight/html.php")) {
    		require_once("include/includes/class/highlight/html.php");
    	}
    
    
    class bbcode {
    	//> Tags die geparsed werden dürfen.
    	var $permitted = array();
    
    	//> Verschlüsselte codeblocks.
    	var $codecblocks = array();
    
    	//> Badwords!
    	var $badwords = array();
    
    	//> Informationen für die Klasse!
    	var $info = array();
    
    	//> Patter befehle!
    	var $pattern = array();
    
    	//> Replace strings!
    	var $replace = array();
    
    	//> Smilies die in Grafik umgewandelt werden sollen.
    	var $smileys = array();
    
    	//> Cache für Quotes Header!
    	var $ayCacheQuoteOpen = array();
    
    	//> Cache fürQuotes Footer!
    	var $ayCacheQuoteClose = array();
    
    	//> Cache für Quotes Header!
    	var $ayCacheKtextOpen = array();
    
    	//> Cache fürQuotes Footer!
    	var $ayCacheKtextClose = array();
    
    	//> Codeblock verschlüsseln und wieder ausgeben.
    	function encode_codec($string,$tag,$file=NULL) {
    		$file = ($file == NULL) ? "":"=".$file;
    		$crypt = md5(count($this->codecblocks));
    		$this->codecblocks[$crypt.":".$tag] = $string;
    		return "[".$tag.$file."]".$crypt."[/".$tag."]";
    	}
    
    	//> Codeblock entschlüsseln und parsen!
    	function _codeblock($codecid,$file=NULL,$firstline=1) {
    		$string = $this->codecblocks[$codecid.':code'];
    		$string = htmlentities($string);
    
    		//> Datei pfad mit angegeben?
    		$file = ($file == NULL) ? "":" von Datei <em>".$file."</em>";
    
    		//> Zeilen zählen.
    		$lines = explode("\n",$string);
    
    		/*for($no=1;$no<=count($lines);$no++) {
    			$line .= "".$no.":<br />";
    		}*/
    
    		for($no=$firstline;$no<(count($lines)+$firstline);$no++) {
    			$line .= "".$no.":<br />";
    		}
    		$string = str_replace("\t", '&nbsp; &nbsp;', $string);
    		$string = str_replace('  ', '&nbsp; ', $string);
    		$string = str_replace('  ', ' &nbsp;', $string);
    		$string = nl2br($string);
    
    		//> Hier könnt ihr den Header und Footer für HTML editieren.
    		$header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tr><td valgin=\"top\">"
    				 ."<div style=\"overflow: auto; height: ".(37+(count($lines)*14))."px; width: {$this->info['BlockTabelleBreite']}px;\">"
    				 ."<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID ".$this->info['BlockRandFarbe'].";\" width=\"100%\">"
    				 ."<tr><td colspan=\"3\" style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:12px;FONT-WEIGHT:BOLD;COLOR:".$this->info['BlockSchriftfarbe'].";BACKGROUND-COLOR:".$this->info['BlockHintergrundfarbe'].";\">&nbsp;Code".$file."</td></tr>"
    				 ."<tr bgcolor=\"".$this->info['BlockHintergrundfarbeIT']."\"><td style=\"color:".$this->info['BlockSchriftfarbe'].";padding-left:2px;padding-right:2px;border-right:1px solid ".$this->info['BlockHintergrundfarbe'].";font-family:Arial, Helvetica, sans-serif;\" align=\"right\" width=\"20\" valign=\"top\"><code>"
    				 .$line
    				 ."</code></td><td width=\"5\">&nbsp;</td><td valign=\"top\" style=\"BACKGROUND-COLOR:".$this->info['BlockHintergrundfarbeIT'].";Color:".$this->info['BlockCodeFarbe'].";\" nowrap><code>";
    		$footer = "</code></td></tr></table></div></td></tr></table>";
    
    		return $header.stripslashes($string).$footer;
    	}
    
    	//> htmlblock entschlüsseln und parsen!
    	function _htmlblock($codecid,$file=NULL,$firstline=1) {
    		$string = $this->codecblocks[$codecid.':html'];
    		$string = htmlentities($string);
    
    		//> Highlight Modul Funktion checken ob sie existerit.
    		if(function_exists("highlight_html")) {
    			$string = highlight_html($string,$this->info['BlockCodeFarbe']);
    		}
    
    		//> Datei pfad mit angegeben?
    		$file = ($file == NULL) ? "":" von Datei <em>".$file."</em>";
    
    		//> Zeilen zählen.
    		$lines = explode("\n",$string);
    
        for($no=$firstline;$no<(count($lines)+$firstline);$no++) {
    			$line .= "".$no.":<br />";
    		}
    
    		$string = str_replace("\t", '&nbsp; &nbsp;', $string);
    		$string = str_replace('  ', '&nbsp; ', $string);
    		$string = str_replace('  ', ' &nbsp;', $string);
    		$string = nl2br($string);
    
    		//> Hier könnt ihr den Header und Footer für HTML editieren.
    		$header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tr><td valgin=\"top\">"
    				 ."<div style=\"overflow: auto; width: {$this->info['BlockTabelleBreite']}px;\">"
    				 ."<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID ".$this->info['BlockRandFarbe'].";\" width=\"100%\">"
    				 ."<tr><td colspan=\"3\" style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:12px;FONT-WEIGHT:BOLD;COLOR:".$this->info['BlockSchriftfarbe'].";BACKGROUND-COLOR:".$this->info['BlockHintergrundfarbe'].";\">&nbsp;Html".$file."</td></tr>"
    				 ."<tr bgcolor=\"".$this->info['BlockHintergrundfarbeIT']."\"><td style=\"color:".$this->info['BlockSchriftfarbe'].";padding-left:2px;padding-right:2px;border-right:1px solid ".$this->info['BlockHintergrundfarbe'].";font-family:Arial, Helvetica, sans-serif;\" align=\"right\" width=\"20\" valign=\"top\"><code>"
    				 .$line
    				 ."</code></td><td width=\"5\">&nbsp;</td><td valign=\"top\" style=\"BACKGROUND-COLOR:".$this->info['block_contentbgcolor'].";color:#000000;\" nowrap><code>";
    		$footer = "</code></td></tr></table></div></td></tr></table>";
    
    		return $header.$string.$footer;
    	}
    
    	//> cssblock entschlüsseln und parsen!
    	function _cssblock($codecid,$file=NULL,$firstline=1) {
    		$string = $this->codecblocks[$codecid.':css'];
    		$string = htmlentities($string);
    
    		//> Highlight Modul Funktion checken ob sie existerit.
    		if(function_exists("highlight_css")) {
    			$string = highlight_css($string);
    		}
    
    		//> Datei pfad mit angegeben?
    		$file = ($file == NULL) ? "":" von Datei <em>".$file."</em>";
    
    		//> Zeilen zählen.
    		$lines = explode("\n",$string);
    
        for($no=$firstline;$no<(count($lines)+$firstline);$no++) {
    			$line .= "".$no.":<br />";
    		}
    
    		$string = str_replace("\t", '&nbsp; &nbsp;', $string);
    		$string = str_replace('  ', '&nbsp; ', $string);
    		$string = str_replace('  ', ' &nbsp;', $string);
    		$string = nl2br($string);
    
    		//> Hier könnt ihr den Header und Footer für HTML editieren.
    		$header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tr><td valgin=\"top\">"
    				 ."<div style=\"overflow: auto;width: {$this->info['BlockTabelleBreite']}px;\">"
    				 ."<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID ".$this->info['BlockRandFarbe'].";\" width=\"100%\">"
    				 ."<tr><td colspan=\"3\" style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:12px;FONT-WEIGHT:BOLD;COLOR:".$this->info['BlockSchriftfarbe'].";BACKGROUND-COLOR:".$this->info['BlockHintergrundfarbe'].";\">&nbsp;Css".$file."</td></tr>"
    				 ."<tr bgcolor=\"".$this->info['BlockHintergrundfarbeIT']."\"><td style=\"color:".$this->info['BlockSchriftfarbe'].";padding-left:2px;padding-right:2px;border-right:1px solid ".$this->info['BlockHintergrundfarbe'].";font-family:Arial, Helvetica, sans-serif;\" align=\"right\" width=\"20\" valign=\"top\"><code>"
    				 .$line
    				 ."</code></td><td width=\"5\">&nbsp;</td><td valign=\"top\" style=\"BACKGROUND-COLOR:".$this->info['block_contentbgcolor'].";color:#000000;\" nowrap><code>";
    		$footer = "</code></td></tr></table></div></td></tr></table>";
    
    		return $header.$string.$footer;
    	}
    
    	//> phpblock entschlüsseln und parsen!
    	function _phpblock($codecid,$file=NULL,$firstline=1) {
    		$string = $this->codecblocks[$codecid.':php'];
    
    		//> Datei pfad mit angegeben?
    		$file = ($file == NULL) ? "":" von Datei <em>".$file."</em>";
    
    		//> Zeilen zählen.
    		$lines = explode("\n",$string);
    
        for($no=$firstline;$no<(count($lines)+$firstline);$no++) {
    			$line .= "".$no.":<br />";
    		}
    
    		ob_start();
       		highlight_string(trim(stripslashes($string)));
        	$php = ob_get_contents();
        	ob_end_clean();
    
    		//> Hier könnt ihr den Header und Footer für HTML editieren.
    		$header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tr><td valgin=\"top\">"
    				 ."<div style=\"overflow: auto;width: {$this->info['BlockTabelleBreite']}px;\">"
    				 ."<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID ".$this->info['BlockRandFarbe'].";\" width=\"100%\">"
    				 ."<tr><td colspan=\"3\" style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:12px;FONT-WEIGHT:BOLD;COLOR:".$this->info['BlockSchriftfarbe'].";BACKGROUND-COLOR:".$this->info['BlockHintergrundfarbe'].";\">&nbsp;Php".$file."</td></tr>"
    				 ."<tr bgcolor=\"".$this->info['BlockHintergrundfarbeIT']."\"><td style=\"color:".$this->info['BlockSchriftfarbe'].";padding-left:2px;padding-right:2px;border-right:1px solid ".$this->info['BlockHintergrundfarbe'].";font-family:Arial, Helvetica, sans-serif;\" align=\"right\" width=\"20\" valign=\"top\"><code>"
    				 .$line
    				 ."</code></td><td width=\"5\">&nbsp;</td><td valign=\"top\" style=\"BACKGROUND-COLOR:".$this->info['block_contentbgcolor']."\" nowrap><code>";
    		$footer = "</code></td></tr></table></div></td></tr></table>";
    
    		return $header.$php.$footer;
    	}
    
    	//> Smilies aus dem Array auslesen.
    	function _smileys($string) {
    		if(!is_null($this->smileys) && is_array($this->smileys)) {
    			if($this->permitted['smileys'] == true) {
    				foreach ($this->smileys as $icon => $info) {
    					list($emo, $url) = explode('#@#-_-_-#@#', $info);
    					$string = str_replace($icon,'<img src="include/images/smiles/'.$url.'" border="0" alt="'.$emo.'" title="'.$emo.'" />',$string);
    				}
    			}
    			return $string;
    		} else {
    			return $string;
    		}
    	}
    
    	//> Badwords Filtern.
    	function _badwords($string) {
    		//> Badwords aus der Datenbank laden!
    		$cfgBBCodeSql = db_query("SELECT
    									fcBadPatter,
    									fcBadReplace
    								  FROM
    									prefix_bbcode_badword");
    
    		while ($row = db_fetch_object($cfgBBCodeSql) ) {
    			$pattern[] = "%".addcslashes($row->fcBadPatter,"[]{}%/$^()+.*\"\\")."%iU";
    			$replace[] = $row->fcBadReplace;
    		}
    		if(isset($pattern)) {
    			$string = preg_replace($pattern,$replace,$string);
    		}
    
    		return $string;
    	}
    
    	//> Liste formatieren.
    	function _list($codecid) {
    		$string = $this->codecblocks[$codecid.':list'];
    		$array = explode("[*]",$string);
    		for($no=1;$no<=(count($array)-1);$no++) {
    			$li .= "<li>".$this->parse($array[$no])."</li>";
    		}
    
    		return "<ul>".$li."</ul>";
    	}
    
    	//> Auf Maximale Schriftgröße überprüfen.
    	function _size($size,$string) {
    		$max = $this->info['SizeMax'];
    		if($size <= $max) {
    			$fontsize = "<span style=\"font-size:".$size."px\">$string</span>";
    		} else {
    			$fontsize = "<span style=\"font-size:".$max."px\">$string</span>";
    		}
    
    		return $fontsize;
    	}
    
      //> Bilder auf Verkleinern via Javascript überprüfen.
      function _img($string,$float='') {
        if ($float == 'none' OR $float == 'left' OR $float == 'right') {
          $float = 'style="float:'.$float.'; margin: 5px;" ';
        } else {
          $float = '';
        }
        $image = '<img src="'.$string.'" alt="" title="" border="0" class="bbcode_image" '.$float.'/>';
        return $image;
      }
    
    	//> Screenshots darstellen.
    	function _screenshot($string,$float='none') {
    	  if ($float == 'none' OR $float == 'left' OR $float == 'right') {
          $float = 'style="float:'.$float.'; margin: 5px;" ';
        } else {
          $float = '';
        }
        $image = '<a href="'.$string.'" target="_blank"><img src="'.$string.'" alt="" title="" border="0" width="'.$this->info['ScreenMaxBreite'].'" height="'.$this->info['ScreenMaxHoehe'].'" '.$float.'/></a>';
        return $image;
    	}
    
    	//> Urls Filtern um XSS vorzubeugen
    	function _filterurl($url) {
        str_replace(
          array('<','>','(',')','#'),
          array('&lt;','&gt;','&#40;','&#41;','&#35'),
          $url
        );
        return $url;
      }
    
    	//> Links darstellen und ggf. kürzen
    	function _shorturl($string,$caption=null) {
    		if ($caption == null) { $caption = $string; }
        $string = trim($this->_filterurl($string));
        $caption = trim($this->_filterurl($caption));
        $server = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
        if (preg_match('%^((http|ftp|https)://)|^/%i',$string) == 0) { $string = 'http://'.$string; }
        if (substr($string,0,1) == '/' OR strpos($string,$server) !== false) {
          $target = '_self';
        } else {
          $target = '_blank';
        }
    
    		$count = strlen($caption);
        if($count >= $this->info['UrlMaxLaenge']) {
    			$string = "<a href=\"".$string."\" target=\"".$target."\">".$this->_shortcaptions($caption)."</a>";
    		} else {
    			$string = "<a href=\"".$string."\" target=\"".$target."\">".$caption."</a>";
    		}
    		return $string;
    	}
    
    	//> Linkbeschreibung kürzen
    	function _shortcaptions($string) {
    		$words = explode(" ",$string);
    		foreach($words as $word)
          if(strlen($word) > $this->info['WortMaxLaenge'] && !preg_match('%(\[img\](.*)\[/img\])%i',$word)) {
    				$maxd2 = sprintf("%00d",($this->info['WortMaxLaenge']/2));
    				$string = str_replace($word,substr($word,0,$maxd2)."...".substr($word,-$maxd2),$string);
    			}
    		return $string;
    	}
    
    	//> Zu lange Wörter kürzen.
    	function _shortwords($string) {
    		//> Zeichenkette in einzelne Array elemente zerlegen.
    		$lines = explode("\n",$string);
    
    		//> Patter Befehle die nicht gekürzt werden dürfen !!!
    		$pattern = array("url1" => "%^(www)(.[-a-zA-Z0-9@:;\%_\+.~#?&//=]+?)%i",
    						 "url2" => "%^(http|https|ftp)://{1}[-a-zA-Z0-9@:;\%_\+.~#?&//=]+?%i",
    						 "tags" => "%(\[(url|img(=(left|right))?|shot(=(left|right))?)\](.*)\[/(url|img|shot)\])|(\[url=(.*)\])%i");
    
    		foreach($lines as $line) {
    			$words = explode(" ",$line);
    			foreach($words as $word)
            if(strlen($word) > $this->info['WortMaxLaenge'] && !preg_match($pattern['url1'],$word) && !preg_match($pattern['url2'],$word) && !preg_match($pattern['tags'],$word)) {
    					$maxd2 = sprintf("%00d",($this->info['WortMaxLaenge']/2));
    					$string = str_replace($word,substr($word,0,$maxd2)."...".substr($word,-$maxd2),$string);
    				}
        }
    		return $string;
    	}
    
    	//> Geöffnete Ktext- Tags Nummerieren.
    	function _addKtextOpen($Titel=Null) {
    		$this->ayCacheKtextOpen[count($this->ayCacheKtextOpen)+1] = true;
    		$intCountKtext = count($this->ayCacheKtextOpen);
    
    		$string = "[ktext:".$intCountKtext."=".$Titel."]";
    
    		return $string;
    	}
    
    	//> Geschlossene Ktext- Tags Nummerieren.
    	function _addKtextClose() {
    		$this->ayCacheKtextClose[count($this->ayCacheKtextClose)+1] = true;
    		$intCountKtext = count($this->ayCacheKtextClose);
    
    		return "[/ktext:".$intCountKtext."]";
    	}
    
    	//> Ktext- Tags umwandeln..
    	function _ktext($string) {
    		$Random = rand(1,10000000);
    
    		//> Html- Muster für geöffnete Tags mit Titel.
    		$HeaderTitel = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"".$this->info['KtextTabelleBreite']."\" align=\"center\">"
    					  ."<tr><td><a href=\"javascript:Klapptext('__ID__')\">"
    					  ."<img src=\"include/images/icons/plus.gif\" id=\"image___ID__\" border=0 alt=\"Aus/Ein-klappen\" title=\"Aus/Ein-klappen\"> ";
    
    		$FooterTitel = "</a></td></tr>"
    					  ."<tr><td><div id=\"layer___ID__\" style=\"display:none;border:1px ".$this->info['KtextRandFormat']." ".$this->info['KtextRandFarbe'].";\">";
    
    		//> Html- Muster für geschlossene Tags.
    		$KtextClose = "</div></td></tr></table>\n";
    
    		//> Geöffnete Tags umwandeln.
    		for($c=1;$c <= count($this->ayCacheKtextOpen);$c++) {
    			if(count($this->ayCacheKtextClose) == count($this->ayCacheKtextOpen)) {
    				//> Format: [ktext=xxx]
    				$this->ktext_pattern[] = "%\[ktext:".$c."=([^]]*)\]%siU";
    				$this->ktext_replace[] = str_replace("__ID__",$c."@".$Random,$HeaderTitel)."\$1".str_replace("__ID__",$c."@".$Random,$FooterTitel);
    				//> Format: [/ktext]
    				$this->ktext_pattern[] = "%\[/ktext:".$c."\]%siU";
    				$this->ktext_replace[] = $KtextClose;
    			} else {
    				//> Format: [ktext=xxx]xxx[/ktext]
    				$this->ktext_pattern[] = "%\[ktext:([0-9]*)=([^]](.*)\[/ktext:([0-9]*)\]%siU";
    				$this->ktext_replace[] = str_replace("__ID__","\$1@".$Random,$HeaderTitel)."\$2".str_replace("__ID__","\$1@".$Random,$FooterTitel)."\$3".$KtextClose;
    			}
    		}
    
    		//> Nicht gefundene Paare wieder darstellen.
    		//> Format: [ktext=xxx]
    		$this->ktext_pattern[] = "%\[ktext:([0-9]*)=([^[/]*)\]%siU";
    		$this->ktext_replace[] = "[ktext=\$1]";
    
    		//> Format: [/ktext]
    		$this->ktext_pattern[] = "%\[/ktext:([0-9]*)\]%siU";
    		$this->ktext_replace[] = "[/ktext]";
    
    		//> String parsen
    		$string = preg_replace($this->ktext_pattern,$this->ktext_replace,$string);
    
    
    		return $string;
    	}
    
    	//> Geöffnete Quote- Tags Nummerieren.
    	function _addQuoteOpen($User=Null) {
    		$this->ayCacheQuoteOpen[count($this->ayCacheQuoteOpen)+1] = $User;
    		$intCountQuote = count($this->ayCacheQuoteOpen);
    
    		if($User != NULL) {
    			$string = "[quote:".$intCountQuote."=".$User."]";
    		} else {
    			$string = "[quote:".$intCountQuote."]";
    		}
    
    		return $string;
    	}
    
    	//> Geschlossene Quote- Tags Nummerieren.
    	function _addQuoteClose() {
    		$this->ayCacheQuoteClose[count($this->ayCacheQuoteClose)+1] = true;
    		$intCountQuote = count($this->ayCacheQuoteClose);
    
    		return "[/quote:".$intCountQuote."]";
    	}
    
    
    	//> Quote- Tags umwandeln.
    	function _quote($string) {
    		//> überprüfen ob Bod gesetzt ist.
    		if(strtolower($this->info['QuoteSchriftformatIT']) == "bold") {
    			$Schriftformat = "font-weight:bold;";
    		} else {
    			$Schriftformat = "font-style:".$this->info['QuoteSchriftformatIT'].";";
    		}
    
    		//> Html- Muster für geöffnete Quote- Tags.
    		$Header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID ".$this->info['QuoteRandFarbe'].";\" width=\"".$this->info['QuoteTabelleBreite']."\" align=\"center\">"
    				 ."<tr><td style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:13px;FONT-WEIGHT:BOLD;COLOR:".$this->info['QuoteSchriftfarbe'].";BACKGROUND-COLOR:".$this->info['QuoteHintergrundfarbe'].";\">&nbsp;Zitat</td></tr>"
    				 ."<tr bgcolor=\"".$this->info['QuoteHintergrundfarbeIT']."\"><td><table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"98%\"><tr><td style=\"".$Schriftformat."FONT-SIZE:10px;COLOR:".$this->info['QuoteSchriftfarbeIT'].";\">";
    
    		//> Html- Muster für geöffnete Quote- Tags mit User.
    		$HeaderUser = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID ".$this->info['QuoteRandFarbe'].";\" width=\"".$this->info['QuoteTabelleBreite']."\" align=\"center\">"
    					  	 ."<tr><td style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:13px;FONT-WEIGHT:BOLD;COLOR:".$this->info['QuoteSchriftfarbe'].";BACKGROUND-COLOR:".$this->info['QuoteHintergrundfarbe'].";\">&nbsp;Zitat von ";
    
    		$FooterUser = "</td></tr><tr bgcolor=\"".$this->info['QuoteHintergrundfarbeIT']."\"><td><table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"98%\"><tr><td style=\"".$Schriftformat."FONT-SIZE:10px;COLOR:".$this->info['QuoteSchriftfarbeIT'].";\">";
    
    		//> Html- Muster für geschlossene Quote- Tags.
    		$QuoteClose = "</td></tr></table></td></tr></table>";
    
    		$string = stripslashes($string);
    
    		//> Geöffnete Tags umwandeln.
    		for($c=1;$c <= count($this->ayCacheQuoteOpen);$c++) {
    			if(count($this->ayCacheQuoteClose) == count($this->ayCacheQuoteOpen)) {
    				//> Format: [quote=xxx]
    				$this->quote_pattern[] = "%\[quote:".$c."=([^[/]*)\]%siU";
    				$this->quote_replace[] = $HeaderUser."\$1".$FooterUser;
    
    				//> Format: [quote]
    				$this->quote_pattern[] = "%\[quote:".$c."\]%siU";
    				$this->quote_replace[] = $Header;
    
    				//> Format: [/quote]
    				$this->quote_pattern[] = "%\[/quote:".$c."\]%siU";
    				$this->quote_replace[] = $QuoteClose;
    			} else {
    				//> Format: [quote=xxx]xxx[/quote]
    				$this->quote_pattern[] = "%\[quote:([0-9]*)=([^[/]*)\[/quote:([0-9]*)\]%siU";
    				$this->quote_replace[] = $HeaderUser."\$2".$FooterUser."\$3".$QuoteClose;
    
    				//> Format: [quote]xxx[/quote]
    				$this->quote_pattern[] = "%\[quote:([0-9]*)\](.*)\[/quote:\\1\]%siU";
    				$this->quote_replace[] = $Header."\$2".$QuoteClose;
    			}
    		}
    
    		//> Nicht gefundene Paare wieder darstellen.
    		//> Format: [quote=xxx]
    		$this->quote_pattern[] = "%\[quote:([0-9]*)=([^[/]*)\]%siU";
    		$this->quote_replace[] = "[quote=\$2]";
    
    		//> Format: [quote]
    		$this->quote_pattern[] = "%\[quote:([0-9])\]%siU";
    		$this->quote_replace[] = "[quote]";
    
    		//> Format: [/quote]
    		$this->quote_pattern[] = "%\[/quote:([0-9])\]%siU";
    		$this->quote_replace[] = "[/quote]";
    
    		//> String parsen
    		$string = preg_replace($this->quote_pattern,$this->quote_replace,$string);
    
    
    		return $string;
    	}
    
    	//> Video intergration.
    	function _video($typ,$id) {
    		$typ = strtolower($typ);
    
    		if($typ == "google") {
    			$str = "<embed style=\"width:".$this->info['GoogleBreite']."px; height:".$this->info['GoogleHoehe']."px;\" id=\"VideoPlayback\" align=\"middle\" type=\"application/x-shockwave-flash\" src=\"http://video.google.com/googleplayer.swf?docId=".$id."\" allowScriptAccess=\"sameDomain\" quality=\"best\" bgcolor=\"".$this->info['GoogleHintergrundfarbe']."\" scale=\"noScale\" salign=\"TL\" FlashVars=\"playerMode=embedded\"/>";
    		}
    
    		if($typ == "youtube") {
    			$str = "<object width=\"".$this->info['YoutubeBreite']."\" height=\"".$this->info['YoutubeHoehe']."\"><param name=\"movie\" value=\"http://www.youtube.com/v/".$id."\"></param><embed src=\"http://www.youtube.com/v/".$id."\" type=\"application/x-shockwave-flash\"  width=\"".$this->info['YoutubeBreite']."\" height=\"".$this->info['YoutubeHoehe']."\" bgcolor=\"".$this->info['YoutubeHintergrundfarbe']."\"></embed></object>";
    		}
    
    		if($typ == "myvideo") {
    			$str = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"".$this->info['MyvideoBreite']."\" height=\"".$this->info['MyvideoHoehe']."\"><param name=\"movie\" value=\"http://www.myvideo.de/movie/".$id."\"></param><embed src=\"http://www.myvideo.de/movie/".$id."\" width=\"".$this->info['MyvideoBreite']."\" height=\"".$this->info['MyvideoHoehe']."\" type=\"application/x-shockwave-flash\"></embed></object>";
    		}
    
    		if($typ == "gametrailers") {
          $str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="gtembed" width="'.$this->info['YoutubeBreite'].'" height="'.$this->info['YoutubeHoehe'].'">	<param name="allowScriptAccess" value="sameDomain" /> 	<param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid='.$id.'"/> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid='.$id.'" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$this->info['YoutubeBreite'].'" height="'.$this->info['YoutubeHoehe'].'"></embed> </object>';
        }
    
    		return $str;
    	}
    
    	//> Countdown berechnen.
    	function _countdown($date,$time=NULL) {
    		$date = explode(".",$date);
    
    		if ($time != NULL) {
          $timechk = explode(':',$time);
          if ($timechk[0] <= 23 && $timechk[1] <= 59 && $timechk[2] <= 59) $timechk = TRUE;
          else $timechk = FALSE;
          }
        else $timechk = TRUE;
    
    		//> Html Design.
    			$Header =  "<div style=\"width:".$this->info['CountdownTabelleBreite'].";padding:5px;font-family:Verdana;font-size:".$this->info['CountdownSchriftsize']."px;".$Font."color:".$this->info['CountdownSchriftfarbe'].";border:2px dotted ".$this->info['CountdownRandFarbe'].";text-align:center\">";
    			$Footer = "</div>";
    
    		//> Überprüfen ob die angaben stimmen.
    		if($date[0] <= 31 && $date[1] <= 12 && $date[2] /*>= date("Y")*/ && checkdate($date[1],$date[0],$date[2]) && $timechk) {
    			if(isset($time)) {
    				$time = explode(":",$time);
    				$intStd = $time[0];
    				$intMin = $time[1];
    				$intSek = $time[2];
    			} else {
    				$intStd = 0;
    				$intMin = 0;
    				$intSek = 0;
    			}
    
    			$Timestamp = @mktime($intStd, $intMin, $intSek, $date[1], $date[0], $date[2]);
    			$Diff = $Timestamp - time();
    
    			$Font =($this->info['CountdownSchriftformat'] == "bold") ? "font-wight:bold;":"font-style:".$this->info['CountdownSchriftformat'].";";
    
    			if($Diff > 1) {
    				$Tage = sprintf("%00d",($Diff / 86400));
    				$Stunden = sprintf("%00d",(($Diff - ($Tage * 86400)) / 3600));
    				$Minuten = sprintf("%00d",(($Diff - (($Tage * 86400)+($Stunden*3600))) / 60));
    				$Sekunden = ($Diff - (($Tage * 86400)+($Stunden*3600)+($Minuten*60)));
    
    				//> Bei höheren Wert wie 1 als Mehrzahl ausgeben.
    				$mzTg = ($Tage == 1) ? "":"e";
    				$mzStd = ($Stunden == 1) ? "":"n";
    				$mzMin = ($Minuten == 1) ? "":"n";
    				$mzSek = ($Sekunden == 1) ? "":"n";
    
    				//> Datum zusamstellen.
    				$str = $Header.$Tage." Tag".$mzTg.", ".$Stunden." Stunde".$mzStd.", ".$Minuten." Minute".$mzMin." und ".$Sekunden." Sekunde".$mzSek.$Footer;
    			} else {
    				//> Datum zusamstellen wenn Datum unmittelbar bevor steht.
    				$str = $Header.(is_array($time) ? implode(':',$time) : $time).' '.implode('.',$date)." !!!".$Footer;
    			}
    		} else {
    			/*if($time == NULL) {
    				$str = "[countdown]".implode('.',$date)."[/countdown]";
    			} else {
    				$str = "[countdown=".$time."]".implode('.',$date)."[/countdown]";
    			}*/
    			$str =  $Header."Der Countdown ist falsch definiert".$Footer;
    
    		}
    
    		return $str;
    	}
    
    	function _ws($ws) {
        return $ws;
      }
    
    	function parse($string) {
    		//> Die Blocks werden codiert um sie vor dem restlichen parsen zu schützen.
    		if($this->permitted['php'] == true) {
    			$string = preg_replace("%\[php\](.+)\[\/php\]%esiU","\$this->encode_codec('\$1','php')",$string);
    			$string = preg_replace("%\[php=(.*)\](.+)\[\/php\]%esiU","\$this->encode_codec('\$2','php','\$1')",$string);
    		}
    
    		if($this->permitted['html'] == true) {
    			$string = preg_replace("%\[html\](.+)\[\/html\]%esiU","\$this->encode_codec('\$1','html')",$string);
    			$string = preg_replace("%\[html=(.*)\](.+)\[\/html\]%esiU","\$this->encode_codec('\$2','html','\$1')",$string);
    		}
    
    		if($this->permitted['css'] == true) {
    			$string = preg_replace("%\[css\](.+)\[\/css\]%esiU","\$this->encode_codec('\$1','css')",$string);
    			$string = preg_replace("%\[css=(.*)\](.+)\[\/css\]%esiU","\$this->encode_codec('\$2','css','\$1')",$string);
    		}
    
    		if($this->permitted['code'] == true) {
    			$string = preg_replace("%\[code\](.+)\[\/code\]%esiU","\$this->encode_codec('\$1','code')",$string);
    			$string = preg_replace("%\[code=(.*)\](.+)\[\/code\]%esiU","\$this->encode_codec('\$2','code','\$1')",$string);
    		}
    
    		if($this->permitted['list'] == true) {
    			$string = preg_replace("%\[list\](.+)\[\/list\]%esiU","\$this->encode_codec('\$1','list')",$string);
    		}
    
    		//> BB Code der den Codeblock nicht betrifft.
    		//> Überprüfen ob die wörter nicht die maximal länge überschrieten.
    		$string = $this->_shortwords($string);
    		$string = htmlentities($string);
    		$string = nl2br($string);
    
    		if($this->permitted['url'] == true) {
    			if($this->permitted['autourl'] == true) {
    				//> Format: www.xxx.de
    				$this->pattern[] = "%(( |\n|^)(www.[a-zA-Z\-0-9@:\%_\+.~#?&//=,;]+?))%eUi";
    				$this->replace[] = "\$this->_ws('\$2').\$this->_shorturl('\$3')";
    
    				//> Format: http://www.xxx.de
    				$this->pattern[] = "%(( |\n|^)((http|https|ftp)://{1}[a-zA-Z\-0-9@:\%_\+.~#?&//=,;]+?))%eUi";
    				$this->replace[] = "\$this->_ws('\$2').\$this->_shorturl('\$3')";
    
    				//> Format xxx@xxx.de
    				$this->pattern[] = "%(( |\n|^)[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3})%i";
    				$this->replace[] = "<a href=\"mailto:$1\">$1</a>";
    			}
    
    			//> Format: [url=xxx]xxx[/url]
    			$this->pattern[] = "%\[url=([^\]]*)\](.+)\[\/url\]%eUis";
    			$this->replace[] = "\$this->_shorturl('\$1','\$2')";
    
    			//> Format: [url]xxx[/url]
    			$this->pattern[] = "%\[url\](.+)\[\/url\]%esiU";
    			$this->replace[] = "\$this->_shorturl('\$1')";
    		}
    
    		//> Darf BB Code [MAIL] dekodiert werden?
    		if($this->permitted['email'] == true) {
    			//> Format: [mail]xxx@xxx.de[/mail]
    			$this->pattern[] = "%\[mail\]([_\.0-9a-z-]+\@([0-9a-z\-]+)\.[a-z]{2,3})\[\/mail\]%Uis";
    			$this->replace[] = "<a href=\"mailto:$1\">$1</a>";
    
    			//> Format: [mail=xxx@xxx.de]xxx[/mail]
    			$this->pattern[] = "%\[mail=([_\.0-9a-z-]+\@([0-9a-z\-]+)\.[a-z]{2,3})\](.+)\[\/mail\]%Uis";
    			$this->replace[] = "<a href=\"mailto:$1\">$3</a>";
    		}
    
    
    
    		//> Darf BB Code [B] dekodiert werden?
    		if($this->permitted['b'] == true) {
    			//> Format: [b]xxx[/b]
    			$this->pattern[] = "%\[b\](.+)\[\/b\]%Uis";
    			$this->replace[] = "<b>\$1</b>";
    		}
    
    		//> Darf BB Code [I] dekodiert werden?
    		if($this->permitted['i'] == true) {
    			//> Format: [i]xxx[/i]
    			$this->pattern[] = "%\[i\](.+)\[\/i\]%Uis";
    			$this->replace[] = "<i>\$1</i>";
    		}
    
    		//> Darf BB Code [U] dekodiert werden?
    		if($this->permitted['u'] == true) {
    			//> Format: [u]xxx[/u]
    			$this->pattern[] = "%\[u\](.+)\[\/u\]%Uis";
    			$this->replace[] = "<u>\$1</u>";
    		}
    
    		//> Darf BB Code [S] dekodiert werden?
    		if($this->permitted['s'] == true) {
    			//> Format: [s]xxx[/s]
    			$this->pattern[] = "%\[s\](.+)\[\/s\]%Uis";
    			$this->replace[] = "<strike>\$1</strike>";
    		}
    
    
    		###############################################
    
    
    		//> Darf BB Code [LEFT] dekodiert werden?
    		if($this->permitted['left'] == true) {
    			//> Format: [left]xxx[/left]
    			$this->pattern[] = "%\[left\](.+)\[\/left\]%Uis";
    			$this->replace[] = "<div align=\"left\">\$1</div>";
    		}
    
    		//> Darf BB Code [CENTER] dekodiert werden?
    		if($this->permitted['center'] == true) {
    			//> Format: [center]xxx[/center]
    			$this->pattern[] = "%\[center\](.+)\[\/center\]%Uis";
    			$this->replace[] = "<div align=\"center\">\$1</div>";
    		}
    
    		//> Darf BB Code [RIGHT] dekodiert werden?
    		if($this->permitted['right'] == true) {
    			//> Format: [right]xxx[/right]
    			$this->pattern[] = "%\[right\](.+)\[\/right\]%Uis";
    			$this->replace[] = "<div align=\"right\">\$1</div>";
    		}
    
    
    		###############################################
    
    		//> Darf BB Code [EMPH] dekodiert werden?
    		if($this->permitted['emph'] == true) {
    			//> Format: [emph]xxx[/emph]
    			$this->pattern[] = "%\[emph\](.+)\[\/emph\]%Uis";
    			$this->replace[] = "<span style=\"background-color:".$this->info['EmphHintergrundfarbe'].";color:".$this->info['EmphSchriftfarbe'].";\">$1</span>";
    		}
    
    		//> Darf BB Code [COLOR] dekodiert werden?
    		if($this->permitted['color'] == true) {
    			//> Format: [color=#xxxxxx]xxx[/color]
    			$this->pattern[] = "%\[color=(#{1}[0-9a-zA-Z]+?)\](.+)\[\/color\]%Uis";
    			$this->replace[] = "<font color=\"$1\">$2</font>";
    		}
    
    		//> Darf BB Code [SIZE] dekodiert werden?
    		if($this->permitted['size'] == true) {
    			//> Format: [size=xx]xxx[/size]
    			$this->pattern[] = "%\[size=([0-9]+?)\](.+)\[\/size\]%eUi";
    			$this->replace[] = "\$this->_size('\$1','\$2')";
    		}
    
    		//> Darf BB Code [KTEXT] decodiert werden?
    		if($this->permitted['ktext'] == true) {
    			//> Format: [ktext=xxx]
    			$this->pattern[] = "%\[ktext=([^[/]*)\]%esiU";
    			$this->replace[] = "\$this->_addKtextOpen('\\1')";
    
    			//> Format: [/ktext]
    			$this->pattern[] = "%\[/ktext\]%esiU";
    			$this->replace[] = "\$this->_addKtextClose()";
    		}
    
    		//> Darf BB Code [IMG] dekodiert werden?
    		if($this->permitted['img'] == true) {
    			//> Format: [img]xxx.de[/img]
    			$this->pattern[] = "%\[img\]([-a-zA-Z0-9@:\%_\+,.~#?&//=]+?)\[\/img\]%eUi";
    			$this->replace[] = "\$this->_img('\$1')";
          //> Format: [img=left|right]xxx.de[/img]
          $this->pattern[] = "%\[img=(left|right)\]([-a-zA-Z0-9@:\%_\+,.~#?&//=]+?)\[\/img\]%eUi";
    		  $this->replace[] = "\$this->_img('\$2','\$1')";
        }
    
    		//> Darf BB Code [SCREENSHOT] dekodiert werden?
    		if($this->permitted['screenshot'] == true) {
    			//> Format: [shot]xxx.de[/screenshot]
    			$this->pattern[] = "%\[shot\]([-a-zA-Z0-9@:\%_\+.~#?&//=]+?)\[\/shot\]%eUi";
    			$this->replace[] = "\$this->_screenshot('\$1')";
          //> Format: [shot=left|right]xxx.de[/screenshot]
    			$this->pattern[] = "%\[shot=(left|right)\]([-a-zA-Z0-9@:\%_\+.~#?&//=]+?)\[\/shot\]%eUi";
    			$this->replace[] = "\$this->_screenshot('\$2','\$1')";
    
    		}
    
    		//> Farf BB Code [VIDEO] dekodiert werden?
            if($this->permitted['video'] == true) {
                //> Format: [video=xxx]xxx[/video]
                $this->pattern[] = "%\[video=(google|youtube|myvideo|gametrailers)\](.+)\[\/video\]%eUis";
                $this->replace[] = "\$this->_video('\$1','\$2')";
            }
    
    		//> Darf BB Code [COUNTDOWN] dekodiert werden?
    		if($this->permitted['countdown'] == true) {
    			//> Format: [countdown=Std:Min:Sek]TT.MM.JJJJ[/countdown]
    			$this->pattern[] = "%\[countdown=(([0-9]{2}):([0-9]{2}):([0-9]{2}))\](([0-9]{2})\.([0-9]{2})\.([0-9]{4}))\[\/countdown\]%eUis";
    			$this->replace[] = "\$this->_countdown('\$5','\$1')";
    
    			//> Format: [countdown]TT.MM.JJJJ[/countdown]
    			$this->pattern[] = "%\[countdown\](([0-9]{2})\.([0-9]{2})\.([0-9]{4}))\[\/countdown\]%eUis";
    			$this->replace[] = "\$this->_countdown('\$1')";
    		}
    
    		###############################################
    
    		//> Darf BB Code [QUOTE] dekodiert werden?
    		if($this->permitted['quote'] == true) {
    
    			//> Format: [quote]
    			$this->pattern[] = "%\[quote\]%esiU";
    			$this->replace[] = "\$this->_addQuoteOpen()";
    
    			//> Format: [quote=xxx]
    			$this->pattern[] = "%\[quote=([^[/]*)\]%esiU";
    			$this->replace[] = "\$this->_addQuoteOpen('\\1')";
    
    			//> Format: [/quote]
    			$this->pattern[] = "%\[/quote\]%esiU";
    			$this->replace[] = "\$this->_addQuoteClose()";
    		}
    
    		//> String parsen
    		$string = preg_replace($this->pattern,$this->replace,$string);
    
    		//> Darf BB Code [QUOTE] dekodiert werden?
    		if($this->permitted['quote'] == true) {
    			$string = $this->_quote($string);
    		}
    
    		//> Darf BB Code [KTEXT] decodiert werden?
    		if($this->permitted['ktext'] == true) {
    			$string = $this->_ktext($string);
    		}
    
    		//> Smilies Filtern.
    		$string = $this->_smileys($string);
    
    		//> Zum schluss die blöcke die verschlüsselt wurden wieder entschlüsseln und Parsen.
    		if($this->permitted['php'] == true) {
    			$string = preg_replace("%\[php\](.+)\[\/php\]%esiU","\$this->_phpblock('\$1')",$string);
    			$string = preg_replace("%\[php=([^;]*);(\d+)\](.+)\[\/php\]%esiU","\$this->_phpblock('\$3','\$1','\$2')",$string);
          $string = preg_replace("%\[php=(.*)\](.+)\[\/php\]%esiU","\$this->_phpblock('\$2','\$1')",$string);
    		}
    
    		if($this->permitted['html'] == true) {
    			$string = preg_replace("%\[html\](.+)\[\/html\]%esiU","\$this->_htmlblock('\$1')",$string);
    			$string = preg_replace("%\[html=([^;]*);(\d+)\](.+)\[\/html\]%esiU","\$this->_htmlblock('\$3','\$1','\$2')",$string);
          $string = preg_replace("%\[html=(.*)\](.+)\[\/html\]%esiU","\$this->_htmlblock('\$2','\$1')",$string);
    		}
    
    		if($this->permitted['css'] == true) {
    			$string = preg_replace("%\[css\](.+)\[\/css\]%esiU","\$this->_cssblock('\$1')",$string);
    			$string = preg_replace("%\[css=([^;]*);(\d+)\](.+)\[\/css\]%esiU","\$this->_cssblock('\$3','\$1','\$2')",$string);
          $string = preg_replace("%\[css=(.*)\](.+)\[\/css\]%esiU","\$this->_cssblock('\$2','\$1')",$string);
    		}
    
    		if($this->permitted['code'] == true) {
    			$string = preg_replace("%\[code\](.+)\[\/code\]%esiU","\$this->_codeblock('\$1')",$string);
    			$string = preg_replace("%\[code=([^;]*);(\d+)\](.+)\[\/code\]%esiU","\$this->_codeblock('\$3','\$1','\$2')",$string);
          $string = preg_replace("%\[code=(.*)\](.+)\[\/code\]%esiU","\$this->_codeblock('\$2','\$1')",$string);
    		}
    
    		if($this->permitted['list'] == true) {
    			$string = preg_replace("%\[list\](.+)\[\/list\]%esiU","\$this->_list('\$1')",$string);
    		}
    
    		//> Badwors Filtern.
    		$string = $this->_badwords($string);
    
    		unset($this->pattern);
    		unset($this->replace);
    
    		unset($this->ayCacheQuoteOpen);
    		unset($this->ayCacheQuoteClose);
    
    		unset($this->ayCacheKtextOpen);
    		unset($this->ayCacheKtextClose);
    
    		return $string;
    	}
    }
    ?>
    0 Mitglieder finden den Beitrag gut.
  11. #11
    User Pic
    blakedj06 gelöschter User
    Also Du hast Dir schon den Link angeschaut den ich gepostet habe ja?

    Du hast da noch gar nichts drin verändert!

    include/include/class/bbcode.php Zeile 664

    $string = htmlentities($string);

    ersetzen durch

    $string = htmlentities($string, ENT_DISALLOWED, 'ISO-8859-1');

    Das musst Du machen dann wird auch dein Text angezeigt!

    Aber die anderen Änderungen gerade die der escape.php auch noch übernehmen.

    Die sind zwar nicht für die Anzeige des Textes verantwortlich aber dennoch wichtig!
    1 Mitglieder finden den Beitrag gut.
  12. #12
    User Pic
    blakedj06 gelöschter User
    Hier geht schneller ^^

    <?php
        #   Copyright by Thomas Bowe [Funjoy]
        #   Support bbcode@phpline.de
        #   link www.phpline.de
    
        /* Module - Information
        * -------------------------------------------------------
        * Hier könnt ihr eure Module includieren lassen.
        * Wenn Ihr selber Module zum Highlight programmiert
        * denkt daran das ihr auch noch das Parsen hier definieren müsst.
        * und in der bbcode_config.php Datei müsstet ihr die Option auch noch einstellen.
        * um ein Beispiel zu haben schaut euch die Funktion _htmlblock() am besten mal an.
        * und in Zeile 308 und Zeile 490 habt ihr ein Beispiel wie ihr die Parsebefehle schreiben könnt.
        */
    
        //> Bitte denkt daran das, dass Modul html.php immer unter dem Modul css.php sein muss.
        //> Modul [css.php]
        if (file_exists("include/includes/class/highlight/css.php")){
            require_once("include/includes/class/highlight/css.php");
        }
    
        //> Modul [html.php]
        if (file_exists("include/includes/class/highlight/html.php")){
            require_once("include/includes/class/highlight/html.php");
        }
    
        class bbcode{
            //> Tags die geparsed werden dürfen.
            var $permitted = array();
            //> Verschlüsselte codeblocks.
            var $codecblocks = array();
            //> Badwords!
            var $badwords = array();
            //> Informationen für die Klasse!
            var $info = array();
            //> Patter befehle!
            var $pattern = array();
            //> Replace strings!
            var $replace = array();
            //> Smilies die in Grafik umgewandelt werden sollen.
            var $smileys = array();
            //> Cache für Quotes Header!
            var $ayCacheQuoteOpen = array();
            //> Cache fürQuotes Footer!
            var $ayCacheQuoteClose = array();
            //> Cache für Quotes Header!
            var $ayCacheKtextOpen = array();
            //> Cache fürQuotes Footer!
            var $ayCacheKtextClose = array();
    
            //> Codeblock verschlüsseln und wieder ausgeben.
            function encode_codec($string, $tag, $file = NULL){
                $file                                   = ($file == NULL) ? "" : "=" . $file;
                $crypt                                  = md5(count($this->codecblocks));
                $this->codecblocks[$crypt . ":" . $tag] = $string;
                return "[" . $tag . $file . "]" . $crypt . "[/" . $tag . "]";
            }
    
            //> Codeblock entschlüsseln und parsen!
            function _codeblock($codecid, $file = NULL, $firstline = 1){
                $string = $this->codecblocks[$codecid . ':code'];
                $string = htmlentities($string);
    
                //> Datei pfad mit angegeben?
                $file = ($file == NULL) ? "" : " von Datei <em>" . $file . "</em>";
    
                //> Zeilen zählen.
                $lines = explode("\n", $string);
    
                /*for($no=1;$no<=count($lines);$no++) {
                    $line .= "".$no.":<br />";
                }*/
    
                for ($no = $firstline; $no < (count($lines) + $firstline); $no++){
                    $line .= "" . $no . ":<br />";
                }
                $string = str_replace("\t", '&nbsp; &nbsp;', $string);
                $string = str_replace('  ', '&nbsp; ', $string);
                $string = str_replace('  ', ' &nbsp;', $string);
                $string = nl2br($string);
    
                //> Hier könnt ihr den Header und Footer für HTML editieren.
                $header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tr><td valgin=\"top\">" . "<div style=\"overflow: auto; height: " . (37 + (count($lines) * 14)) . "px; width: {$this->info['BlockTabelleBreite']}px;\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID " . $this->info['BlockRandFarbe'] . ";\" width=\"100%\">" . "<tr><td colspan=\"3\" style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:12px;FONT-WEIGHT:BOLD;COLOR:" . $this->info['BlockSchriftfarbe'] . ";BACKGROUND-COLOR:" . $this->info['BlockHintergrundfarbe'] . ";\">&nbsp;Code" . $file . "</td></tr>" . "<tr bgcolor=\"" . $this->info['BlockHintergrundfarbeIT'] . "\"><td style=\"color:" . $this->info['BlockSchriftfarbe'] . ";padding-left:2px;padding-right:2px;border-right:1px solid " . $this->info['BlockHintergrundfarbe'] . ";font-family:Arial, Helvetica, sans-serif;\" align=\"right\" width=\"20\" valign=\"top\"><code>" . $line . "</code></td><td width=\"5\">&nbsp;</td><td valign=\"top\" style=\"BACKGROUND-COLOR:" . $this->info['BlockHintergrundfarbeIT'] . ";Color:" . $this->info['BlockCodeFarbe'] . ";\" nowrap><code>";
                $footer = "</code></td></tr></table></div></td></tr></table>";
    
                return $header . stripslashes($string) . $footer;
            }
    
            //> htmlblock entschlüsseln und parsen!
            function _htmlblock($codecid, $file = NULL, $firstline = 1){
                $string = $this->codecblocks[$codecid . ':html'];
                $string = htmlentities($string);
    
                //> Highlight Modul Funktion checken ob sie existerit.
                if (function_exists("highlight_html")){
                    $string = highlight_html($string, $this->info['BlockCodeFarbe']);
                }
    
                //> Datei pfad mit angegeben?
                $file = ($file == NULL) ? "" : " von Datei <em>" . $file . "</em>";
    
                //> Zeilen zählen.
                $lines = explode("\n", $string);
    
                for ($no = $firstline; $no < (count($lines) + $firstline); $no++){
                    $line .= "" . $no . ":<br />";
                }
    
                $string = str_replace("\t", '&nbsp; &nbsp;', $string);
                $string = str_replace('  ', '&nbsp; ', $string);
                $string = str_replace('  ', ' &nbsp;', $string);
                $string = nl2br($string);
    
                //> Hier könnt ihr den Header und Footer für HTML editieren.
                $header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tr><td valgin=\"top\">" . "<div style=\"overflow: auto; width: {$this->info['BlockTabelleBreite']}px;\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID " . $this->info['BlockRandFarbe'] . ";\" width=\"100%\">" . "<tr><td colspan=\"3\" style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:12px;FONT-WEIGHT:BOLD;COLOR:" . $this->info['BlockSchriftfarbe'] . ";BACKGROUND-COLOR:" . $this->info['BlockHintergrundfarbe'] . ";\">&nbsp;Html" . $file . "</td></tr>" . "<tr bgcolor=\"" . $this->info['BlockHintergrundfarbeIT'] . "\"><td style=\"color:" . $this->info['BlockSchriftfarbe'] . ";padding-left:2px;padding-right:2px;border-right:1px solid " . $this->info['BlockHintergrundfarbe'] . ";font-family:Arial, Helvetica, sans-serif;\" align=\"right\" width=\"20\" valign=\"top\"><code>" . $line . "</code></td><td width=\"5\">&nbsp;</td><td valign=\"top\" style=\"BACKGROUND-COLOR:" . $this->info['block_contentbgcolor'] . ";color:#000000;\" nowrap><code>";
                $footer = "</code></td></tr></table></div></td></tr></table>";
    
                return $header . $string . $footer;
            }
    
            //> cssblock entschlüsseln und parsen!
            function _cssblock($codecid, $file = NULL, $firstline = 1){
                $string = $this->codecblocks[$codecid . ':css'];
                $string = htmlentities($string);
    
                //> Highlight Modul Funktion checken ob sie existerit.
                if (function_exists("highlight_css")){
                    $string = highlight_css($string);
                }
    
                //> Datei pfad mit angegeben?
                $file = ($file == NULL) ? "" : " von Datei <em>" . $file . "</em>";
    
                //> Zeilen zählen.
                $lines = explode("\n", $string);
    
                for ($no = $firstline; $no < (count($lines) + $firstline); $no++){
                    $line .= "" . $no . ":<br />";
                }
    
                $string = str_replace("\t", '&nbsp; &nbsp;', $string);
                $string = str_replace('  ', '&nbsp; ', $string);
                $string = str_replace('  ', ' &nbsp;', $string);
                $string = nl2br($string);
    
                //> Hier könnt ihr den Header und Footer für HTML editieren.
                $header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tr><td valgin=\"top\">" . "<div style=\"overflow: auto;width: {$this->info['BlockTabelleBreite']}px;\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID " . $this->info['BlockRandFarbe'] . ";\" width=\"100%\">" . "<tr><td colspan=\"3\" style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:12px;FONT-WEIGHT:BOLD;COLOR:" . $this->info['BlockSchriftfarbe'] . ";BACKGROUND-COLOR:" . $this->info['BlockHintergrundfarbe'] . ";\">&nbsp;Css" . $file . "</td></tr>" . "<tr bgcolor=\"" . $this->info['BlockHintergrundfarbeIT'] . "\"><td style=\"color:" . $this->info['BlockSchriftfarbe'] . ";padding-left:2px;padding-right:2px;border-right:1px solid " . $this->info['BlockHintergrundfarbe'] . ";font-family:Arial, Helvetica, sans-serif;\" align=\"right\" width=\"20\" valign=\"top\"><code>" . $line . "</code></td><td width=\"5\">&nbsp;</td><td valign=\"top\" style=\"BACKGROUND-COLOR:" . $this->info['block_contentbgcolor'] . ";color:#000000;\" nowrap><code>";
                $footer = "</code></td></tr></table></div></td></tr></table>";
    
                return $header . $string . $footer;
            }
    
            //> phpblock entschlüsseln und parsen!
            function _phpblock($codecid, $file = NULL, $firstline = 1){
                $string = $this->codecblocks[$codecid . ':php'];
    
                //> Datei pfad mit angegeben?
                $file = ($file == NULL) ? "" : " von Datei <em>" . $file . "</em>";
    
                //> Zeilen zählen.
                $lines = explode("\n", $string);
    
                for ($no = $firstline; $no < (count($lines) + $firstline); $no++){
                    $line .= "" . $no . ":<br />";
                }
    
                ob_start();
                highlight_string(trim(stripslashes($string)));
                $php = ob_get_contents();
                ob_end_clean();
    
                //> Hier könnt ihr den Header und Footer für HTML editieren.
                $header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tr><td valgin=\"top\">" . "<div style=\"overflow: auto;width: {$this->info['BlockTabelleBreite']}px;\">" . "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID " . $this->info['BlockRandFarbe'] . ";\" width=\"100%\">" . "<tr><td colspan=\"3\" style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:12px;FONT-WEIGHT:BOLD;COLOR:" . $this->info['BlockSchriftfarbe'] . ";BACKGROUND-COLOR:" . $this->info['BlockHintergrundfarbe'] . ";\">&nbsp;Php" . $file . "</td></tr>" . "<tr bgcolor=\"" . $this->info['BlockHintergrundfarbeIT'] . "\"><td style=\"color:" . $this->info['BlockSchriftfarbe'] . ";padding-left:2px;padding-right:2px;border-right:1px solid " . $this->info['BlockHintergrundfarbe'] . ";font-family:Arial, Helvetica, sans-serif;\" align=\"right\" width=\"20\" valign=\"top\"><code>" . $line . "</code></td><td width=\"5\">&nbsp;</td><td valign=\"top\" style=\"BACKGROUND-COLOR:" . $this->info['block_contentbgcolor'] . "\" nowrap><code>";
                $footer = "</code></td></tr></table></div></td></tr></table>";
    
                return $header . $php . $footer;
            }
    
            //> Smilies aus dem Array auslesen.
            function _smileys($string){
                if (!is_null($this->smileys) && is_array($this->smileys)){
                    if ($this->permitted['smileys'] == true){
                        foreach ($this->smileys as $icon => $info){
                            list($emo, $url) = explode('#@#-_-_-#@#', $info);
                            $string = str_replace($icon, '<img src="include/images/smiles/' . $url . '" border="0" alt="' . $emo . '" title="' . $emo . '" />', $string);
                        }
                    }
                    return $string;
                } else{
                    return $string;
                }
            }
    
            //> Badwords Filtern.
            function _badwords($string){
                //> Badwords aus der Datenbank laden!
                $cfgBBCodeSql = db_query("SELECT
                                        fcBadPatter,
                                        fcBadReplace
                                      FROM
                                        prefix_bbcode_badword");
    
                while ($row = db_fetch_object($cfgBBCodeSql)){
                    $pattern[] = "%" . addcslashes($row->fcBadPatter, "[]{}%/$^()+.*\"\\") . "%iU";
                    $replace[] = $row->fcBadReplace;
                }
                if (isset($pattern)){
                    $string = preg_replace($pattern, $replace, $string);
                }
    
                return $string;
            }
    
            //> Liste formatieren.
            function _list($codecid){
                $string = $this->codecblocks[$codecid . ':list'];
                $array  = explode("[*]", $string);
                for ($no = 1; $no <= (count($array) - 1); $no++){
                    $li .= "<li>" . $this->parse($array[$no]) . "</li>";
                }
    
                return "<ul>" . $li . "</ul>";
            }
    
            //> Auf Maximale Schriftgröße überprüfen.
            function _size($size, $string){
                $max = $this->info['SizeMax'];
                if ($size <= $max){
                    $fontsize = "<span style=\"font-size:" . $size . "px\">$string</span>";
                } else{
                    $fontsize = "<span style=\"font-size:" . $max . "px\">$string</span>";
                }
    
                return $fontsize;
            }
    
            //> Bilder auf Verkleinern via Javascript überprüfen.
            function _img($string, $float = ''){
                if ($float == 'none' OR $float == 'left' OR $float == 'right'){
                    $float = 'style="float:' . $float . '; margin: 5px;" ';
                } else{
                    $float = '';
                }
                $image = '<img src="' . $string . '" alt="" title="" border="0" class="bbcode_image" ' . $float . '/>';
                return $image;
            }
    
            //> Screenshots darstellen.
            function _screenshot($string, $float = 'none'){
                if ($float == 'none' OR $float == 'left' OR $float == 'right'){
                    $float = 'style="float:' . $float . '; margin: 5px;" ';
                } else{
                    $float = '';
                }
                $image = '<a href="' . $string . '" target="_blank"><img src="' . $string . '" alt="" title="" border="0" width="' . $this->info['ScreenMaxBreite'] . '" height="' . $this->info['ScreenMaxHoehe'] . '" ' . $float . '/></a>';
                return $image;
            }
    
            //> Urls Filtern um XSS vorzubeugen
            function _filterurl($url){
                str_replace(array(
                                 '<',
                                 '>',
                                 '(',
                                 ')',
                                 '#'
                            ), array(
                                    '&lt;',
                                    '&gt;',
                                    '&#40;',
                                    '&#41;',
                                    '&#35'
                               ), $url);
                return $url;
            }
    
            //> Links darstellen und ggf. kürzen
            function _shorturl($string, $caption = null){
                if ($caption == null){
                    $caption = $string;
                }
                $string  = trim($this->_filterurl($string));
                $caption = trim($this->_filterurl($caption));
                $server  = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
                if (preg_match('%^((http|ftp|https)://)|^/%i', $string) == 0){
                    $string = 'http://' . $string;
                }
                if (substr($string, 0, 1) == '/' OR strpos($string, $server) !== false){
                    $target = '_self';
                } else{
                    $target = '_blank';
                }
    
                $count = strlen($caption);
                if ($count >= $this->info['UrlMaxLaenge']){
                    $string = "<a href=\"" . $string . "\" target=\"" . $target . "\">" . $this->_shortcaptions($caption) . "</a>";
                } else{
                    $string = "<a href=\"" . $string . "\" target=\"" . $target . "\">" . $caption . "</a>";
                }
                return $string;
            }
    
            //> Linkbeschreibung kürzen
            function _shortcaptions($string){
                $words = explode(" ", $string);
                foreach ($words as $word){
                    if (strlen($word) > $this->info['WortMaxLaenge'] && !preg_match('%(\[img\](.*)\[/img\])%i', $word)){
                        $maxd2  = sprintf("%00d", ($this->info['WortMaxLaenge'] / 2));
                        $string = str_replace($word, substr($word, 0, $maxd2) . "..." . substr($word, -$maxd2), $string);
                    }
                }
                return $string;
            }
    
            //> Zu lange Wörter kürzen.
            function _shortwords($string){
                //> Zeichenkette in einzelne Array elemente zerlegen.
                $lines = explode("\n", $string);
    
                //> Patter Befehle die nicht gekürzt werden dürfen !!!
                $pattern = array(
                    "url1" => "%^(www)(.[-a-zA-Z0-9@:;\%_\+.~#?&//=]+?)%i",
                    "url2" => "%^(http|https|ftp)://{1}[-a-zA-Z0-9@:;\%_\+.~#?&//=]+?%i",
                    "tags" => "%(\[(url|img(=(left|right))?|shot(=(left|right))?)\](.*)\[/(url|img|shot)\])|(\[url=(.*)\])%i"
                );
    
                foreach ($lines as $line){
                    $words = explode(" ", $line);
                    foreach ($words as $word){
                        if (strlen($word) > $this->info['WortMaxLaenge'] && !preg_match($pattern['url1'], $word) && !preg_match($pattern['url2'], $word) && !preg_match($pattern['tags'], $word)){
                            $maxd2  = sprintf("%00d", ($this->info['WortMaxLaenge'] / 2));
                            $string = str_replace($word, substr($word, 0, $maxd2) . "..." . substr($word, -$maxd2), $string);
                        }
                    }
                }
                return $string;
            }
    
            //> Geöffnete Ktext- Tags Nummerieren.
            function _addKtextOpen($Titel = Null){
                $this->ayCacheKtextOpen[count($this->ayCacheKtextOpen) + 1] = true;
                $intCountKtext                                              = count($this->ayCacheKtextOpen);
    
                $string = "[ktext:" . $intCountKtext . "=" . $Titel . "]";
    
                return $string;
            }
    
            //> Geschlossene Ktext- Tags Nummerieren.
            function _addKtextClose(){
                $this->ayCacheKtextClose[count($this->ayCacheKtextClose) + 1] = true;
                $intCountKtext                                                = count($this->ayCacheKtextClose);
    
                return "[/ktext:" . $intCountKtext . "]";
            }
    
            //> Ktext- Tags umwandeln..
            function _ktext($string){
                $Random = rand(1, 10000000);
    
                //> Html- Muster für geöffnete Tags mit Titel.
                $HeaderTitel = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"" . $this->info['KtextTabelleBreite'] . "\" align=\"center\">" . "<tr><td><a href=\"javascript:Klapptext('__ID__')\">" . "<img src=\"include/images/icons/plus.gif\" id=\"image___ID__\" border=0 alt=\"Aus/Ein-klappen\" title=\"Aus/Ein-klappen\"> ";
    
                $FooterTitel = "</a></td></tr>" . "<tr><td><div id=\"layer___ID__\" style=\"display:none;border:1px " . $this->info['KtextRandFormat'] . " " . $this->info['KtextRandFarbe'] . ";\">";
    
                //> Html- Muster für geschlossene Tags.
                $KtextClose = "</div></td></tr></table>\n";
    
                //> Geöffnete Tags umwandeln.
                for ($c = 1; $c <= count($this->ayCacheKtextOpen); $c++){
                    if (count($this->ayCacheKtextClose) == count($this->ayCacheKtextOpen)){
                        //> Format: [ktext=xxx]
                        $this->ktext_pattern[] = "%\[ktext:" . $c . "=([^]]*)\]%siU";
                        $this->ktext_replace[] = str_replace("__ID__", $c . "@" . $Random, $HeaderTitel) . "\$1" . str_replace("__ID__", $c . "@" . $Random, $FooterTitel);
                        //> Format: [/ktext]
                        $this->ktext_pattern[] = "%\[/ktext:" . $c . "\]%siU";
                        $this->ktext_replace[] = $KtextClose;
                    } else{
                        //> Format: [ktext=xxx]xxx[/ktext]
                        $this->ktext_pattern[] = "%\[ktext:([0-9]*)=([^]](.*)\[/ktext:([0-9]*)\]%siU";
                        $this->ktext_replace[] = str_replace("__ID__", "\$1@" . $Random, $HeaderTitel) . "\$2" . str_replace("__ID__", "\$1@" . $Random, $FooterTitel) . "\$3" . $KtextClose;
                    }
                }
    
                //> Nicht gefundene Paare wieder darstellen.
                //> Format: [ktext=xxx]
                $this->ktext_pattern[] = "%\[ktext:([0-9]*)=([^[/]*)\]%siU";
                $this->ktext_replace[] = "[ktext=\$1]";
    
                //> Format: [/ktext]
                $this->ktext_pattern[] = "%\[/ktext:([0-9]*)\]%siU";
                $this->ktext_replace[] = "[/ktext]";
    
                //> String parsen
                $string = preg_replace($this->ktext_pattern, $this->ktext_replace, $string);
    
                return $string;
            }
    
            //> Geöffnete Quote- Tags Nummerieren.
            function _addQuoteOpen($User = Null){
                $this->ayCacheQuoteOpen[count($this->ayCacheQuoteOpen) + 1] = $User;
                $intCountQuote                                              = count($this->ayCacheQuoteOpen);
    
                if ($User != NULL){
                    $string = "[quote:" . $intCountQuote . "=" . $User . "]";
                } else{
                    $string = "[quote:" . $intCountQuote . "]";
                }
    
                return $string;
            }
    
            //> Geschlossene Quote- Tags Nummerieren.
            function _addQuoteClose(){
                $this->ayCacheQuoteClose[count($this->ayCacheQuoteClose) + 1] = true;
                $intCountQuote                                                = count($this->ayCacheQuoteClose);
    
                return "[/quote:" . $intCountQuote . "]";
            }
    
            //> Quote- Tags umwandeln.
            function _quote($string){
                //> überprüfen ob Bod gesetzt ist.
                if (strtolower($this->info['QuoteSchriftformatIT']) == "bold"){
                    $Schriftformat = "font-weight:bold;";
                } else{
                    $Schriftformat = "font-style:" . $this->info['QuoteSchriftformatIT'] . ";";
                }
    
                //> Html- Muster für geöffnete Quote- Tags.
                $Header = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID " . $this->info['QuoteRandFarbe'] . ";\" width=\"" . $this->info['QuoteTabelleBreite'] . "\" align=\"center\">" . "<tr><td style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:13px;FONT-WEIGHT:BOLD;COLOR:" . $this->info['QuoteSchriftfarbe'] . ";BACKGROUND-COLOR:" . $this->info['QuoteHintergrundfarbe'] . ";\">&nbsp;Zitat</td></tr>" . "<tr bgcolor=\"" . $this->info['QuoteHintergrundfarbeIT'] . "\"><td><table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"98%\"><tr><td style=\"" . $Schriftformat . "FONT-SIZE:10px;COLOR:" . $this->info['QuoteSchriftfarbeIT'] . ";\">";
    
                //> Html- Muster für geöffnete Quote- Tags mit User.
                $HeaderUser = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"BORDER: 1px SOLID " . $this->info['QuoteRandFarbe'] . ";\" width=\"" . $this->info['QuoteTabelleBreite'] . "\" align=\"center\">" . "<tr><td style=\"font-family:Arial, Helvetica, sans-serif;FONT-SIZE:13px;FONT-WEIGHT:BOLD;COLOR:" . $this->info['QuoteSchriftfarbe'] . ";BACKGROUND-COLOR:" . $this->info['QuoteHintergrundfarbe'] . ";\">&nbsp;Zitat von ";
    
                $FooterUser = "</td></tr><tr bgcolor=\"" . $this->info['QuoteHintergrundfarbeIT'] . "\"><td><table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"98%\"><tr><td style=\"" . $Schriftformat . "FONT-SIZE:10px;COLOR:" . $this->info['QuoteSchriftfarbeIT'] . ";\">";
    
                //> Html- Muster für geschlossene Quote- Tags.
                $QuoteClose = "</td></tr></table></td></tr></table>";
    
                $string = stripslashes($string);
    
                //> Geöffnete Tags umwandeln.
                for ($c = 1; $c <= count($this->ayCacheQuoteOpen); $c++){
                    if (count($this->ayCacheQuoteClose) == count($this->ayCacheQuoteOpen)){
                        //> Format: [quote=xxx]
                        $this->quote_pattern[] = "%\[quote:" . $c . "=([^[/]*)\]%siU";
                        $this->quote_replace[] = $HeaderUser . "\$1" . $FooterUser;
    
                        //> Format: [quote]
                        $this->quote_pattern[] = "%\[quote:" . $c . "\]%siU";
                        $this->quote_replace[] = $Header;
    
                        //> Format: [/quote]
                        $this->quote_pattern[] = "%\[/quote:" . $c . "\]%siU";
                        $this->quote_replace[] = $QuoteClose;
                    } else{
                        //> Format: [quote=xxx]xxx[/quote]
                        $this->quote_pattern[] = "%\[quote:([0-9]*)=([^[/]*)\[/quote:([0-9]*)\]%siU";
                        $this->quote_replace[] = $HeaderUser . "\$2" . $FooterUser . "\$3" . $QuoteClose;
    
                        //> Format: [quote]xxx[/quote]
                        $this->quote_pattern[] = "%\[quote:([0-9]*)\](.*)\[/quote:\\1\]%siU";
                        $this->quote_replace[] = $Header . "\$2" . $QuoteClose;
                    }
                }
    
                //> Nicht gefundene Paare wieder darstellen.
                //> Format: [quote=xxx]
                $this->quote_pattern[] = "%\[quote:([0-9]*)=([^[/]*)\]%siU";
                $this->quote_replace[] = "[quote=\$2]";
    
                //> Format: [quote]
                $this->quote_pattern[] = "%\[quote:([0-9])\]%siU";
                $this->quote_replace[] = "[quote]";
    
                //> Format: [/quote]
                $this->quote_pattern[] = "%\[/quote:([0-9])\]%siU";
                $this->quote_replace[] = "[/quote]";
    
                //> String parsen
                $string = preg_replace($this->quote_pattern, $this->quote_replace, $string);
    
                return $string;
            }
    
            //> Video intergration.
            function _video($typ, $id){
                $typ = strtolower($typ);
    
                if ($typ == "google"){
                    $str = "<embed style=\"width:" . $this->info['GoogleBreite'] . "px; height:" . $this->info['GoogleHoehe'] . "px;\" id=\"VideoPlayback\" align=\"middle\" type=\"application/x-shockwave-flash\" src=\"http://video.google.com/googleplayer.swf?docId=" . $id . "\" allowScriptAccess=\"sameDomain\" quality=\"best\" bgcolor=\"" . $this->info['GoogleHintergrundfarbe'] . "\" scale=\"noScale\" salign=\"TL\" FlashVars=\"playerMode=embedded\"/>";
                }
    
                if ($typ == "youtube"){
                    $str = "<object width=\"" . $this->info['YoutubeBreite'] . "\" height=\"" . $this->info['YoutubeHoehe'] . "\"><param name=\"movie\" value=\"http://www.youtube.com/v/" . $id . "\"></param><embed src=\"http://www.youtube.com/v/" . $id . "\" type=\"application/x-shockwave-flash\"  width=\"" . $this->info['YoutubeBreite'] . "\" height=\"" . $this->info['YoutubeHoehe'] . "\" bgcolor=\"" . $this->info['YoutubeHintergrundfarbe'] . "\"></embed></object>";
                }
    
                if ($typ == "myvideo"){
                    $str = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"" . $this->info['MyvideoBreite'] . "\" height=\"" . $this->info['MyvideoHoehe'] . "\"><param name=\"movie\" value=\"http://www.myvideo.de/movie/" . $id . "\"></param><embed src=\"http://www.myvideo.de/movie/" . $id . "\" width=\"" . $this->info['MyvideoBreite'] . "\" height=\"" . $this->info['MyvideoHoehe'] . "\" type=\"application/x-shockwave-flash\"></embed></object>";
                }
    
                if ($typ == "gametrailers"){
                    $str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="gtembed" width="' . $this->info['YoutubeBreite'] . '" height="' . $this->info['YoutubeHoehe'] . '">  <param name="allowScriptAccess" value="sameDomain" />     <param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid=' . $id . '"/> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid=' . $id . '" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' . $this->info['YoutubeBreite'] . '" height="' . $this->info['YoutubeHoehe'] . '"></embed> </object>';
                }
    
                return $str;
            }
    
            //> Countdown berechnen.
            function _countdown($date, $time = NULL){
                $date = explode(".", $date);
    
                if ($time != NULL){
                    $timechk = explode(':', $time);
                    if ($timechk[0] <= 23 && $timechk[1] <= 59 && $timechk[2] <= 59){
                        $timechk = TRUE;
                    } else{
                        $timechk = FALSE;
                    }
                } else {
                    $timechk = TRUE;
                }
    
                //> Html Design.
                $Header = "<div style=\"width:" . $this->info['CountdownTabelleBreite'] . ";padding:5px;font-family:Verdana;font-size:" . $this->info['CountdownSchriftsize'] . "px;" . $Font . "color:" . $this->info['CountdownSchriftfarbe'] . ";border:2px dotted " . $this->info['CountdownRandFarbe'] . ";text-align:center\">";
                $Footer = "</div>";
    
                //> Überprüfen ob die angaben stimmen.
                if ($date[0] <= 31 && $date[1] <= 12 && $date[2] /*>= date("Y")*/ && checkdate($date[1], $date[0], $date[2]) && $timechk){
                    if (isset($time)){
                        $time   = explode(":", $time);
                        $intStd = $time[0];
                        $intMin = $time[1];
                        $intSek = $time[2];
                    } else{
                        $intStd = 0;
                        $intMin = 0;
                        $intSek = 0;
                    }
    
                    $Timestamp = @mktime($intStd, $intMin, $intSek, $date[1], $date[0], $date[2]);
                    $Diff      = $Timestamp - time();
    
                    $Font = ($this->info['CountdownSchriftformat'] == "bold") ? "font-wight:bold;" : "font-style:" . $this->info['CountdownSchriftformat'] . ";";
    
                    if ($Diff > 1){
                        $Tage     = sprintf("%00d", ($Diff / 86400));
                        $Stunden  = sprintf("%00d", (($Diff - ($Tage * 86400)) / 3600));
                        $Minuten  = sprintf("%00d", (($Diff - (($Tage * 86400) + ($Stunden * 3600))) / 60));
                        $Sekunden = ($Diff - (($Tage * 86400) + ($Stunden * 3600) + ($Minuten * 60)));
    
                        //> Bei höheren Wert wie 1 als Mehrzahl ausgeben.
                        $mzTg  = ($Tage == 1) ? "" : "e";
                        $mzStd = ($Stunden == 1) ? "" : "n";
                        $mzMin = ($Minuten == 1) ? "" : "n";
                        $mzSek = ($Sekunden == 1) ? "" : "n";
    
                        //> Datum zusamstellen.
                        $str = $Header . $Tage . " Tag" . $mzTg . ", " . $Stunden . " Stunde" . $mzStd . ", " . $Minuten . " Minute" . $mzMin . " und " . $Sekunden . " Sekunde" . $mzSek . $Footer;
                    } else{
                        //> Datum zusamstellen wenn Datum unmittelbar bevor steht.
                        $str = $Header . (is_array($time) ? implode(':', $time) : $time) . ' ' . implode('.', $date) . " !!!" . $Footer;
                    }
                } else{
                    /*if($time == NULL) {
                        $str = "[countdown]".implode('.',$date)."[/countdown]";
                    } else {
                        $str = "[countdown=".$time."]".implode('.',$date)."[/countdown]";
                    }*/
                    $str = $Header . "Der Countdown ist falsch definiert" . $Footer;
                }
    
                return $str;
            }
    
            function _ws($ws){
                return $ws;
            }
    
            function parse($string){
                //> Die Blocks werden codiert um sie vor dem restlichen parsen zu schützen.
                if ($this->permitted['php'] == true){
                    $string = preg_replace("%\[php\](.+)\[\/php\]%esiU", "\$this->encode_codec('\$1','php')", $string);
                    $string = preg_replace("%\[php=(.*)\](.+)\[\/php\]%esiU", "\$this->encode_codec('\$2','php','\$1')", $string);
                }
    
                if ($this->permitted['html'] == true){
                    $string = preg_replace("%\[html\](.+)\[\/html\]%esiU", "\$this->encode_codec('\$1','html')", $string);
                    $string = preg_replace("%\[html=(.*)\](.+)\[\/html\]%esiU", "\$this->encode_codec('\$2','html','\$1')", $string);
                }
    
                if ($this->permitted['css'] == true){
                    $string = preg_replace("%\[css\](.+)\[\/css\]%esiU", "\$this->encode_codec('\$1','css')", $string);
                    $string = preg_replace("%\[css=(.*)\](.+)\[\/css\]%esiU", "\$this->encode_codec('\$2','css','\$1')", $string);
                }
    
                if ($this->permitted['code'] == true){
                    $string = preg_replace("%\[code\](.+)\[\/code\]%esiU", "\$this->encode_codec('\$1','code')", $string);
                    $string = preg_replace("%\[code=(.*)\](.+)\[\/code\]%esiU", "\$this->encode_codec('\$2','code','\$1')", $string);
                }
    
                if ($this->permitted['list'] == true){
                    $string = preg_replace("%\[list\](.+)\[\/list\]%esiU", "\$this->encode_codec('\$1','list')", $string);
                }
    
                //> BB Code der den Codeblock nicht betrifft.
                //> Überprüfen ob die wörter nicht die maximal länge überschrieten.
                $string = $this->_shortwords($string);
                $string = htmlentities($string, ENT_DISALLOWED, 'ISO-8859-1');
                $string = nl2br($string);
    
                if ($this->permitted['url'] == true){
                    if ($this->permitted['autourl'] == true){
                        //> Format: www.xxx.de
                        $this->pattern[] = "%(( |\n|^)(www.[a-zA-Z\-0-9@:\%_\+.~#?&//=,;]+?))%eUi";
                        $this->replace[] = "\$this->_ws('\$2').\$this->_shorturl('\$3')";
    
                        //> Format: http://www.xxx.de
                        $this->pattern[] = "%(( |\n|^)((http|https|ftp)://{1}[a-zA-Z\-0-9@:\%_\+.~#?&//=,;]+?))%eUi";
                        $this->replace[] = "\$this->_ws('\$2').\$this->_shorturl('\$3')";
    
                        //> Format xxx@xxx.de
                        $this->pattern[] = "%(( |\n|^)[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3})%i";
                        $this->replace[] = "<a href=\"mailto:$1\">$1</a>";
                    }
    
                    //> Format: [url=xxx]xxx[/url]
                    $this->pattern[] = "%\[url=([^\]]*)\](.+)\[\/url\]%eUis";
                    $this->replace[] = "\$this->_shorturl('\$1','\$2')";
    
                    //> Format: [url]xxx[/url]
                    $this->pattern[] = "%\[url\](.+)\[\/url\]%esiU";
                    $this->replace[] = "\$this->_shorturl('\$1')";
                }
    
                //> Darf BB Code [MAIL] dekodiert werden?
                if ($this->permitted['email'] == true){
                    //> Format: [mail]xxx@xxx.de[/mail]
                    $this->pattern[] = "%\[mail\]([_\.0-9a-z-]+\@([0-9a-z\-]+)\.[a-z]{2,3})\[\/mail\]%Uis";
                    $this->replace[] = "<a href=\"mailto:$1\">$1</a>";
    
                    //> Format: [mail=xxx@xxx.de]xxx[/mail]
                    $this->pattern[] = "%\[mail=([_\.0-9a-z-]+\@([0-9a-z\-]+)\.[a-z]{2,3})\](.+)\[\/mail\]%Uis";
                    $this->replace[] = "<a href=\"mailto:$1\">$3</a>";
                }
    
                //> Darf BB Code [B] dekodiert werden?
                if ($this->permitted['b'] == true){
                    //> Format: [b]xxx[/b]
                    $this->pattern[] = "%\[b\](.+)\[\/b\]%Uis";
                    $this->replace[] = "<b>\$1</b>";
                }
    
                //> Darf BB Code [I] dekodiert werden?
                if ($this->permitted['i'] == true){
                    //> Format: [i]xxx[/i]
                    $this->pattern[] = "%\[i\](.+)\[\/i\]%Uis";
                    $this->replace[] = "<i>\$1</i>";
                }
    
                //> Darf BB Code [U] dekodiert werden?
                if ($this->permitted['u'] == true){
                    //> Format: [u]xxx[/u]
                    $this->pattern[] = "%\[u\](.+)\[\/u\]%Uis";
                    $this->replace[] = "<u>\$1</u>";
                }
    
                //> Darf BB Code [S] dekodiert werden?
                if ($this->permitted['s'] == true){
                    //> Format: [s]xxx[/s]
                    $this->pattern[] = "%\[s\](.+)\[\/s\]%Uis";
                    $this->replace[] = "<strike>\$1</strike>";
                }
    
                ###############################################
    
                //> Darf BB Code [LEFT] dekodiert werden?
                if ($this->permitted['left'] == true){
                    //> Format: [left]xxx[/left]
                    $this->pattern[] = "%\[left\](.+)\[\/left\]%Uis";
                    $this->replace[] = "<div align=\"left\">\$1</div>";
                }
    
                //> Darf BB Code [CENTER] dekodiert werden?
                if ($this->permitted['center'] == true){
                    //> Format: [center]xxx[/center]
                    $this->pattern[] = "%\[center\](.+)\[\/center\]%Uis";
                    $this->replace[] = "<div align=\"center\">\$1</div>";
                }
    
                //> Darf BB Code [RIGHT] dekodiert werden?
                if ($this->permitted['right'] == true){
                    //> Format: [right]xxx[/right]
                    $this->pattern[] = "%\[right\](.+)\[\/right\]%Uis";
                    $this->replace[] = "<div align=\"right\">\$1</div>";
                }
    
                ###############################################
    
                //> Darf BB Code [EMPH] dekodiert werden?
                if ($this->permitted['emph'] == true){
                    //> Format: [emph]xxx[/emph]
                    $this->pattern[] = "%\[emph\](.+)\[\/emph\]%Uis";
                    $this->replace[] = "<span style=\"background-color:" . $this->info['EmphHintergrundfarbe'] . ";color:" . $this->info['EmphSchriftfarbe'] . ";\">$1</span>";
                }
    
                //> Darf BB Code [COLOR] dekodiert werden?
                if ($this->permitted['color'] == true){
                    //> Format: [color=#xxxxxx]xxx[/color]
                    $this->pattern[] = "%\[color=(#{1}[0-9a-zA-Z]+?)\](.+)\[\/color\]%Uis";
                    $this->replace[] = "<font color=\"$1\">$2</font>";
                }
    
                //> Darf BB Code [SIZE] dekodiert werden?
                if ($this->permitted['size'] == true){
                    //> Format: [size=xx]xxx[/size]
                    $this->pattern[] = "%\[size=([0-9]+?)\](.+)\[\/size\]%eUi";
                    $this->replace[] = "\$this->_size('\$1','\$2')";
                }
    
                //> Darf BB Code [KTEXT] decodiert werden?
                if ($this->permitted['ktext'] == true){
                    //> Format: [ktext=xxx]
                    $this->pattern[] = "%\[ktext=([^[/]*)\]%esiU";
                    $this->replace[] = "\$this->_addKtextOpen('\\1')";
    
                    //> Format: [/ktext]
                    $this->pattern[] = "%\[/ktext\]%esiU";
                    $this->replace[] = "\$this->_addKtextClose()";
                }
    
                //> Darf BB Code [IMG] dekodiert werden?
                if ($this->permitted['img'] == true){
                    //> Format: [img]xxx.de[/img]
                    $this->pattern[] = "%\[img\]([-a-zA-Z0-9@:\%_\+,.~#?&//=]+?)\[\/img\]%eUi";
                    $this->replace[] = "\$this->_img('\$1')";
                    //> Format: [img=left|right]xxx.de[/img]
                    $this->pattern[] = "%\[img=(left|right)\]([-a-zA-Z0-9@:\%_\+,.~#?&//=]+?)\[\/img\]%eUi";
                    $this->replace[] = "\$this->_img('\$2','\$1')";
                }
    
                //> Darf BB Code [SCREENSHOT] dekodiert werden?
                if ($this->permitted['screenshot'] == true){
                    //> Format: [shot]xxx.de[/screenshot]
                    $this->pattern[] = "%\[shot\]([-a-zA-Z0-9@:\%_\+.~#?&//=]+?)\[\/shot\]%eUi";
                    $this->replace[] = "\$this->_screenshot('\$1')";
                    //> Format: [shot=left|right]xxx.de[/screenshot]
                    $this->pattern[] = "%\[shot=(left|right)\]([-a-zA-Z0-9@:\%_\+.~#?&//=]+?)\[\/shot\]%eUi";
                    $this->replace[] = "\$this->_screenshot('\$2','\$1')";
                }
    
                //> Farf BB Code [VIDEO] dekodiert werden?
                if ($this->permitted['video'] == true){
                    //> Format: [video=xxx]xxx[/video]
                    $this->pattern[] = "%\[video=(google|youtube|myvideo|gametrailers)\](.+)\[\/video\]%eUis";
                    $this->replace[] = "\$this->_video('\$1','\$2')";
                }
    
                //> Darf BB Code [COUNTDOWN] dekodiert werden?
                if ($this->permitted['countdown'] == true){
                    //> Format: [countdown=Std:Min:Sek]TT.MM.JJJJ[/countdown]
                    $this->pattern[] = "%\[countdown=(([0-9]{2}):([0-9]{2}):([0-9]{2}))\](([0-9]{2})\.([0-9]{2})\.([0-9]{4}))\[\/countdown\]%eUis";
                    $this->replace[] = "\$this->_countdown('\$5','\$1')";
    
                    //> Format: [countdown]TT.MM.JJJJ[/countdown]
                    $this->pattern[] = "%\[countdown\](([0-9]{2})\.([0-9]{2})\.([0-9]{4}))\[\/countdown\]%eUis";
                    $this->replace[] = "\$this->_countdown('\$1')";
                }
    
                ###############################################
    
                //> Darf BB Code [QUOTE] dekodiert werden?
                if ($this->permitted['quote'] == true){
    
                    //> Format: [quote]
                    $this->pattern[] = "%\[quote\]%esiU";
                    $this->replace[] = "\$this->_addQuoteOpen()";
    
                    //> Format: [quote=xxx]
                    $this->pattern[] = "%\[quote=([^[/]*)\]%esiU";
                    $this->replace[] = "\$this->_addQuoteOpen('\\1')";
    
                    //> Format: [/quote]
                    $this->pattern[] = "%\[/quote\]%esiU";
                    $this->replace[] = "\$this->_addQuoteClose()";
                }
    
                //> String parsen
                $string = preg_replace($this->pattern, $this->replace, $string);
    
                //> Darf BB Code [QUOTE] dekodiert werden?
                if ($this->permitted['quote'] == true){
                    $string = $this->_quote($string);
                }
    
                //> Darf BB Code [KTEXT] decodiert werden?
                if ($this->permitted['ktext'] == true){
                    $string = $this->_ktext($string);
                }
    
                //> Smilies Filtern.
                $string = $this->_smileys($string);
    
                //> Zum schluss die blöcke die verschlüsselt wurden wieder entschlüsseln und Parsen.
                if ($this->permitted['php'] == true){
                    $string = preg_replace("%\[php\](.+)\[\/php\]%esiU", "\$this->_phpblock('\$1')", $string);
                    $string = preg_replace("%\[php=([^;]*);(\d+)\](.+)\[\/php\]%esiU", "\$this->_phpblock('\$3','\$1','\$2')", $string);
                    $string = preg_replace("%\[php=(.*)\](.+)\[\/php\]%esiU", "\$this->_phpblock('\$2','\$1')", $string);
                }
    
                if ($this->permitted['html'] == true){
                    $string = preg_replace("%\[html\](.+)\[\/html\]%esiU", "\$this->_htmlblock('\$1')", $string);
                    $string = preg_replace("%\[html=([^;]*);(\d+)\](.+)\[\/html\]%esiU", "\$this->_htmlblock('\$3','\$1','\$2')", $string);
                    $string = preg_replace("%\[html=(.*)\](.+)\[\/html\]%esiU", "\$this->_htmlblock('\$2','\$1')", $string);
                }
    
                if ($this->permitted['css'] == true){
                    $string = preg_replace("%\[css\](.+)\[\/css\]%esiU", "\$this->_cssblock('\$1')", $string);
                    $string = preg_replace("%\[css=([^;]*);(\d+)\](.+)\[\/css\]%esiU", "\$this->_cssblock('\$3','\$1','\$2')", $string);
                    $string = preg_replace("%\[css=(.*)\](.+)\[\/css\]%esiU", "\$this->_cssblock('\$2','\$1')", $string);
                }
    
                if ($this->permitted['code'] == true){
                    $string = preg_replace("%\[code\](.+)\[\/code\]%esiU", "\$this->_codeblock('\$1')", $string);
                    $string = preg_replace("%\[code=([^;]*);(\d+)\](.+)\[\/code\]%esiU", "\$this->_codeblock('\$3','\$1','\$2')", $string);
                    $string = preg_replace("%\[code=(.*)\](.+)\[\/code\]%esiU", "\$this->_codeblock('\$2','\$1')", $string);
                }
    
                if ($this->permitted['list'] == true){
                    $string = preg_replace("%\[list\](.+)\[\/list\]%esiU", "\$this->_list('\$1')", $string);
                }
    
                //> Badwors Filtern.
                $string = $this->_badwords($string);
    
                unset($this->pattern);
                unset($this->replace);
    
                unset($this->ayCacheQuoteOpen);
                unset($this->ayCacheQuoteClose);
    
                unset($this->ayCacheKtextOpen);
                unset($this->ayCacheKtextClose);
    
                return $string;
            }
        }
    
    ?>


    Den Code mit dem deiner include/includes/class/bbcode.php ersetzen.
    1 Mitglieder finden den Beitrag gut.
  13. #13
    User Pic
    xerin Mitglied
    Registriert seit
    16.10.2012
    Beiträge
    7
    Beitragswertungen
    0 Beitragspunkte
    Ich danke dir jetzt hat es geklappt lachen
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Fehlersuche und Probleme

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten