if( $view_template == "rss" ) { $tpl->set( '{rsslink}', $full_link ); $tpl->set( '{rssauthor}', $row['autor'] ); $tpl->set( '{rssdate}', date( "r", $row['date'] ) ); $tpl->set( '{title}', str_replace("&amp;", "&", htmlspecialchars( strip_tags( stripslashes( $row['title'] ) ), ENT_QUOTES, $config['charset'] ) ) ); $row['full_story'] = stripslashes( $row['full_story'] ); if( strlen($row['full_story']) < 13 ) $row['full_story'] = $row['short_story']; $row['short_story'] = preg_replace( "'\[attachment=(.*?)\]'si", "", $row['short_story'] ); $row['short_story'] = preg_replace ( "#\[hide(.*?)\](.+?)\[/hide\]#is", "", $row['short_story'] ); if( $config['rss_format'] != 1 ) { $row['short_story'] = preg_replace( "##is", "", $row['short_story'] ); $tpl->set("", ""); $row['short_story'] = str_replace( "><", "> <", $row['short_story'] ); $row['short_story'] = trim(htmlspecialchars( strip_tags( str_replace( array("
", "
"), " ", $row['short_story'] ) ), ENT_QUOTES, $config['charset'] ) ); $row['short_story'] = preg_replace('/\s+/', ' ', $row['short_story']); $tpl->set( '{short-story}', $row['short_story']); } else { $row['short_story'] = preg_replace( "##is", "", $row['short_story'] ); $tpl->set( '{short-story}', $row['short_story'] ); } if( $config['rss_format'] == 2 ) { $images = array(); $row['full_story'] = stripslashes( $row['full_story'] ); preg_match_all('/(img|src)=("|\')[^"\'>]+/i', $row['full_story'], $media); $data=preg_replace('/(img|src)("|\'|="|=\')(.*)/i',"$3",$media[0]); foreach($data as $url) { $info = pathinfo($url); if (isset($info['extension'])) { if ($info['filename'] == "spoiler-plus" OR $info['filename'] == "spoiler-minus" OR strpos($info['dirname'], 'engine/data/emoticons') !== false) continue; $info['extension'] = strtolower($info['extension']); if (($info['extension'] == 'jpg') || ($info['extension'] == 'jpeg') || ($info['extension'] == 'gif') || ($info['extension'] == 'png')) { if($info['extension'] == 'jpg') $info['extension'] ='jpeg'; array_push($images, ""); } } } if ( count($images) ) { $tpl->set( '{images}', "\n".implode("\n", $images) ); } else { $tpl->set( '{images}', '' ); } } $row['full_story'] = preg_replace( "##is", "", $row['full_story'] ); $row['full_story'] = preg_replace( "'\[attachment=(.*?)\]'si", "", $row['full_story'] ); $row['full_story'] = preg_replace ( "#\[hide(.*?)\](.+?)\[/hide\]#is", "", $row['full_story'] ); $tpl->set("", ""); $row['full_story'] = str_replace( "><", "> <", $row['full_story'] ); $row['full_story'] = trim (htmlspecialchars( strip_tags( stripslashes( str_replace( array("
", "
"), " ", $row['full_story'] ) ) ), ENT_QUOTES, $config['charset'] ) ); $row['full_story'] = preg_replace('/\s+/', ' ', $row['full_story']); $tpl->set( '{full-story}', $row['full_story'] ); } else {