'','L_COLON'=>'','L_IMAGE'=>'','L_SELECT_ALL_CODE'=>'','L_WROTE'=>'','S_VIEWFLASH'=>'','S_VIEWIMG'=>'','S_VIEWSMILIES'=>'','T_SMILIES_PATH'=>'']; protected function renderNode(\DOMNode $node) { switch($node->nodeName){case'ATTACHMENT':$this->out.='
'.htmlspecialchars($node->getAttribute('filename'),0).'
';break;case'B':$this->out.='';$this->at($node);$this->out.='';break;case'CODE':$this->out.='

'.htmlspecialchars($this->params['L_CODE'].$this->params['L_COLON'],0).' '.htmlspecialchars($this->params['L_SELECT_ALL_CODE'],0).'

';$this->at($node);$this->out.='
';break;case'COLOR':$this->out.='';$this->at($node);$this->out.='';break;case'E':if(empty($this->params['S_VIEWSMILIES']))$this->out.=htmlspecialchars($node->textContent,0);else{switch($node->textContent){case'8-)':$this->out.='8-)';break;case':!:':$this->out.=':!:';break;case':(':$this->out.=':(';break;case':)':$this->out.=':)';break;case':-(':$this->out.=':-(';break;case':-)':$this->out.=':-)';break;case':-?':$this->out.=':-?';break;case':-D':$this->out.=':-D';break;case':-P':$this->out.=':-P';break;case':-o':$this->out.=':-o';break;case':-x':$this->out.=':-x';break;case':-|':$this->out.=':-|';break;case':?':$this->out.=':?';break;case':?:':$this->out.=':?:';break;case':???:':$this->out.=':???:';break;case':D':$this->out.=':D';break;case':P':$this->out.=':P';break;case':arrow:':$this->out.=':arrow:';break;case':cool:':$this->out.=':cool:';break;case':cry:':$this->out.=':cry:';break;case':eek:':$this->out.=':eek:';break;case':evil:':$this->out.=':evil:';break;case':geek:':$this->out.=':geek:';break;case':grin:':$this->out.=':grin:';break;case':idea:':$this->out.=':idea:';break;case':lol:':$this->out.=':lol:';break;case':mad:':$this->out.=':mad:';break;case':mrgreen:':$this->out.=':mrgreen:';break;case':o':$this->out.=':o';break;case':oops:':$this->out.=':oops:';break;case':razz:':$this->out.=':razz:';break;case':roll:':$this->out.=':roll:';break;case':sad:':$this->out.=':sad:';break;case':shock:':$this->out.=':shock:';break;case':smile:':$this->out.=':smile:';break;case':twisted:':$this->out.=':twisted:';break;case':ugeek:':$this->out.=':ugeek:';break;case':wink:':$this->out.=':wink:';break;case':x':$this->out.=':x';break;case':|':$this->out.=':|';break;case';)':$this->out.=';)';break;case';-)':$this->out.=';-)';break;default:$this->out.=htmlspecialchars($node->textContent,0);}}break;case'EMAIL':$this->out.='';$this->at($node);$this->out.='';break;case'EMOJI':if(!empty($this->params['S_VIEWSMILIES']))$this->out.=''.htmlspecialchars($node->textContent,2).'';else$this->out.=htmlspecialchars($node->textContent,0);break;case'FLASH':if(!empty($this->params['S_VIEWFLASH']))$this->out.='';else$this->at($node);break;case'I':$this->out.='';$this->at($node);$this->out.='';break;case'IMG':if(!empty($this->params['S_VIEWIMG']))$this->out.=''.htmlspecialchars($this->params['L_IMAGE'],2).'';else$this->at($node);break;case'LI':$this->out.='
  • ';$this->at($node);$this->out.='
  • ';break;case'LINK_TEXT':$this->out.=htmlspecialchars($node->getAttribute('text'),0);break;case'LIST':if(!$node->hasAttribute('type')){$this->out.='';}elseif((strpos('upperlowerdecim',mb_substr($node->getAttribute('type'),0,5,'utf-8'))!==false)){$this->out.='
      ';$this->at($node);$this->out.='
    ';}else{$this->out.='';}break;case'QUOTE':$this->out.='hasAttribute('author'))$this->out.=' class="uncited"';$this->out.='>
    ';if($node->hasAttribute('author')){$this->out.='';if($node->hasAttribute('url'))$this->out.=''.htmlspecialchars($node->getAttribute('author'),0).'';elseif($node->hasAttribute('profile_url'))$this->out.=''.htmlspecialchars($node->getAttribute('author'),0).'';else$this->out.=htmlspecialchars($node->getAttribute('author'),0);$this->out.=' '.htmlspecialchars($this->params['L_WROTE'].$this->params['L_COLON'],0);if($node->hasAttribute('post_url'))$this->out.=' ';if($node->hasAttribute('date'))$this->out.='
    '.htmlspecialchars($node->getAttribute('date'),0).'
    ';$this->out.='
    ';}$this->at($node);$this->out.='
    ';break;case'SIZE':$this->out.='';$this->at($node);$this->out.='';break;case'U':$this->out.='';$this->at($node);$this->out.='';break;case'URL':$this->out.='';$this->at($node);$this->out.='';break;case'br':$this->out.='
    ';break;case'e':case'i':case's':break;case'p':$this->out.='

    ';$this->at($node);$this->out.='

    ';break;default:$this->at($node);} } /** {@inheritdoc} */ public $enableQuickRenderer=true; /** {@inheritdoc} */ protected $static=['/B'=>'','/CODE'=>'','/COLOR'=>'','/EMAIL'=>'','/I'=>'','/LI'=>'','/QUOTE'=>'','/SIZE'=>'','/U'=>'','/URL'=>'','B'=>'','I'=>'','LI'=>'
  • ','U'=>'']; /** {@inheritdoc} */ protected $dynamic=['COLOR'=>['(^[^ ]+(?> (?!color=)[^=]+="[^"]*")*(?> color="([^"]*)")?.*)s',''],'EMAIL'=>['(^[^ ]+(?> (?!email=)[^=]+="[^"]*")*(?> email="([^"]*)")?.*)s',''],'SIZE'=>['(^[^ ]+(?> (?!size=)[^=]+="[^"]*")*(?> size="([^"]*)")?.*)s',''],'URL'=>['(^[^ ]+(?> (?!url=)[^=]+="[^"]*")*(?> url="([^"]*)")?.*)s','']]; /** {@inheritdoc} */ protected $quickRegexp='(<(?:(?!/)((?:ATTACHMENT|E(?>MOJI)?|LINK_TEXT))(?: [^>]*)?>.*?)[^ />]+)[^>]*?(/)?)>)s'; /** {@inheritdoc} */ protected $quickRenderingTest='(<(?:[!?]|(?>FLASH|IMG)[ />]))'; /** {@inheritdoc} */ protected function renderQuickTemplate($id, $xml) { $attributes=$this->matchAttributes($xml); $html='';switch($id){case'/LIST':$attributes=array_pop($this->attributes);if(!isset($attributes['type']))$html.='';elseif((strpos('upperlowerdecim',mb_substr(htmlspecialchars_decode($attributes['type']),0,5,'utf-8'))!==false))$html.='';else$html.='';break;case'ATTACHMENT':$attributes+=['index'=>null,'filename'=>null];$html.='
    '.str_replace('"','"',$attributes['filename']).'
    ';break;case'CODE':$html.='

    '.htmlspecialchars($this->params['L_CODE'].$this->params['L_COLON'],0).' '.htmlspecialchars($this->params['L_SELECT_ALL_CODE'],0).'

    ';break;case'E':$textContent=$this->getQuickTextContent($xml);if(empty($this->params['S_VIEWSMILIES']))$html.=htmlspecialchars($textContent,0);else{switch($textContent){case'8-)':$html.='8-)';break;case':!:':$html.=':!:';break;case':(':$html.=':(';break;case':)':$html.=':)';break;case':-(':$html.=':-(';break;case':-)':$html.=':-)';break;case':-?':$html.=':-?';break;case':-D':$html.=':-D';break;case':-P':$html.=':-P';break;case':-o':$html.=':-o';break;case':-x':$html.=':-x';break;case':-|':$html.=':-|';break;case':?':$html.=':?';break;case':?:':$html.=':?:';break;case':???:':$html.=':???:';break;case':D':$html.=':D';break;case':P':$html.=':P';break;case':arrow:':$html.=':arrow:';break;case':cool:':$html.=':cool:';break;case':cry:':$html.=':cry:';break;case':eek:':$html.=':eek:';break;case':evil:':$html.=':evil:';break;case':geek:':$html.=':geek:';break;case':grin:':$html.=':grin:';break;case':idea:':$html.=':idea:';break;case':lol:':$html.=':lol:';break;case':mad:':$html.=':mad:';break;case':mrgreen:':$html.=':mrgreen:';break;case':o':$html.=':o';break;case':oops:':$html.=':oops:';break;case':razz:':$html.=':razz:';break;case':roll:':$html.=':roll:';break;case':sad:':$html.=':sad:';break;case':shock:':$html.=':shock:';break;case':smile:':$html.=':smile:';break;case':twisted:':$html.=':twisted:';break;case':ugeek:':$html.=':ugeek:';break;case':wink:':$html.=':wink:';break;case':x':$html.=':x';break;case':|':$html.=':|';break;case';)':$html.=';)';break;case';-)':$html.=';-)';break;default:$html.=htmlspecialchars($textContent,0);}}break;case'EMOJI':$attributes+=['seq'=>null];$textContent=$this->getQuickTextContent($xml);if(!empty($this->params['S_VIEWSMILIES']))$html.=''.htmlspecialchars($textContent,2).'';else$html.=htmlspecialchars($textContent,0);break;case'LINK_TEXT':$attributes+=['text'=>null];$html.=str_replace('"','"',$attributes['text']);break;case'LIST':$attributes+=['type'=>null];if(!isset($attributes['type']))$html.='
      ';elseif((strpos('upperlowerdecim',mb_substr(htmlspecialchars_decode($attributes['type']),0,5,'utf-8'))!==false))$html.='
        ';else$html.='
          ';$this->attributes[]=$attributes;break;case'QUOTE':$attributes+=['url'=>null,'author'=>null,'post_id'=>null];$html.=''.str_replace('"','"',$attributes['author']).'';elseif(isset($attributes['profile_url']))$html.=''.str_replace('"','"',$attributes['author']).'';else$html.=str_replace('"','"',$attributes['author']);$html.=' '.htmlspecialchars($this->params['L_WROTE'].$this->params['L_COLON'],0);if(isset($attributes['post_url']))$html.=' ';if(isset($attributes['date']))$html.='
          '.str_replace('"','"',$attributes['date']).'
          ';$html.='';}} return $html; } }