Changeset 155
Author: Mighty Gorgon
(2009/12/17 10:41) About 2 years ago
Bugs fixed: * Missed cache empty when giving cards * Removed one SQL in viewtopic.php when user is not authorized to reply * Fixed a bug for rating images in proSilver Code optimization: * Removed extra unused functions from BBCode class and moved to external file which should be included only where needed

$mod_desc = $bbcode->make_clickable($mod_desc);$warning = $bbcode->make_clickable($warning);{{$message = $bbcode->autolink_text($message, '999999');$article = $bbcode->autolink_text($article, '999999');$article_toc = preg_replace("'\[[\/\!]*?[^\[\]]*?\]'si", "", $article_toc); // Fixed$article_toc = preg_replace("'\[[\/\!]*?[^\[\]]*?\]'si", "", $article_toc); // Fixed$article_toc = $bbcode->make_clickable($article_toc);$preview_text = $bbcode->autolink_text($preview_text, '999999');$template->set_filenames(array('preview' => KB_TPL_PATH . 'kb_post_preview.tpl'));$template->set_filenames(array('preview' => KB_TPL_PATH . 'kb_post_preview.tpl'));$commentrow[$i]['comment_text'] = $bbcode->autolink_text($commentrow[$i]['comment_text'], '999999');$cache->destroy_datafiles(array('_ranks'), MAIN_CACHE_FOLDER, 'data', false);$db->clear_cache('ban_', USERS_CACHE_FOLDER);$db->clear_cache('ban_', USERS_CACHE_FOLDER);$code_text = $bbcode->undo_htmlspecialchars($code_text, true);{{{{$posts[$i]['post_text'] = $bbcode->autolink_text($posts[$i]['post_text'], '999999');$commentsrow[$i]['comment_text'] = $bbcode->autolink_text($commentsrow[$i]['comment_text'], '999999');$pic_sp_link = append_sid(album_append_uid('album_showpage.' . PHP_EXT . '?pic_id=' . $commentsrow[$i]['pic_id']));$pic_sp_link = append_sid(album_append_uid('album_showpage.' . PHP_EXT . '?pic_id=' . $commentsrow[$i]['pic_id']));$pic_dl_link = append_sid(album_append_uid('album_pic.' . PHP_EXT . '?pic_id=' . $commentsrow[$i]['pic_id']));$pic_dl_link = append_sid(album_append_uid('album_pic.' . PHP_EXT . '?pic_id=' . $commentsrow[$i]['pic_id']));if (defined('BBCB_MG_SMALL'))if (defined('BBCB_MG_SMALL')){{if (!function_exists('generate_smilies_row')){$text = $bbcode->autolink_text($text, $forum_id);{{{{{{if (!function_exists('get_attachment_details')){{{if (!function_exists('get_download_details')){););$text = $this->undo_htmlspecialchars($text);{{$text = $this->undo_htmlspecialchars($text);{{$input = str_replace(' ', '', $input);$input = preg_replace("/>/i", ">", $input);$input = preg_replace("/</i", "<", $input);$input = preg_replace("/"/i", "\"", $input);$input = preg_replace("/&/i", "&", $input);{if(preg_match_all('/&\#([0-9]+);/', $input, $matches) && sizeof($matches)){{{}// Autolinks - BEGIN//$bbcode = new bbcode();// Obtain list of autolink words and build preg style replacement arrays for use by the calling script, note that the vars are passed as references this just makes it easier to return both sets of arrays//if (defined('SMILIES_TABLE'))function obtain_autolinks_list($forum_id){$bbcode->allowed_smilies = array();$bbcode->allowed_smilies = $cache->obtain_smileys(false);}// Need to initialize the random numbers only ONCEmt_srand((double) microtime() * 1000000);/*** For display of custom parsed text on user-facing pages* Expects $text to be the value directly from the database (stored value)*/function generate_text_for_display($text, $only_smileys = false, $censor = true, $acro_autolinks = false, $forum_id = '999999'){global $bbcode, $config, $userdata;if (empty($text)){{return '';global $db;}if (defined('IS_ICYPHOENIX') && $censor)$where = ($forum_id) ? ' WHERE link_forum = 0 OR link_forum IN (' . $forum_id . ')' : ' WHERE link_forum = -1';{$sql = "SELECT * FROM " . AUTOLINKS . $where;$text = censor_text($text);$result = $db->sql_query($sql, 0, 'autolinks_', TOPICS_CACHE_FOLDER);}if (!class_exists('bbcode'))$autolinks = array();{while($row = $db->sql_fetchrow($result))include(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);}if (empty($bbcode)){$bbcode = new bbcode();if (!$userdata['session_logged_in']){{$userdata['user_allowhtml'] = $config['allow_html'] ? true : false;// Munge word boundaries to stop autolinks from linking to$userdata['user_allowbbcode'] = $config['allow_bbcode'] ? true : false;// themselves or other autolinks in step 2 in the function below.$userdata['user_allowsmile'] = $config['allow_smilies'] ? true : false;$row['link_url'] = preg_replace('/(\b)/', '\\1ALSPACEHOLDER', $row['link_url']);}$row['link_comment'] = preg_replace('/(\b)/', '\\1ALSPACEHOLDER', $row['link_comment']);$bbcode->allow_html = ($userdata['user_allowhtml'] && $config['allow_html']) ? true : false;$bbcode->allow_bbcode = ($userdata['user_allowbbcode'] && $config['allow_bbcode']) ? true : false;$bbcode->allow_smilies = ($userdata['user_allowsmile'] && $config['allow_smilies']) ? true : false;}if ($only_smileys)if($row['link_style']){$text = $bbcode->parse_only_smilies($text);}else{$text = $bbcode->parse($text);if (defined('IS_ICYPHOENIX') && $acro_autolinks){$text = $bbcode->acronym_pass($text);$text = autolink_text($text, $forum_id);}}return $text;}/** Generate bbcode uid*/function make_bbcode_uid(){// Unique ID for this message..$uid = unique_id();$uid = substr($uid, 0, BBCODE_UID_LEN);return $uid;}/** Generate a single row of smileys* Moved here from functions_post to optimize viewtopic and remove the full include of functions_post*/if (defined('SMILIES_TABLE')){function generate_smilies_row(){global $db, $cache, $config, $template;if (defined('IN_PA_POSTING')){global $pafiledb_template;}$max_smilies = (!empty($config['smilie_single_row']) ? intval($config['smilie_single_row']) : 20);$sql = "SELECT emoticon, code, smile_url FROM " . SMILIES_TABLE . " GROUP BY smile_url ORDER BY smilies_order LIMIT " . $max_smilies;$result = $db->sql_query($sql, 0, 'smileys_');$host = extract_current_hostname();$orig = array();$repl = array();while ($row = $db->sql_fetchrow($result)){$parsing_template = array('CODE' => $row['code'],'URL' => 'http://' . $host . $config['script_path'] . $config['smilies_path'] . '/' . $row['smile_url'],'DESC' => htmlspecialchars($row['emoticon']));if (defined('IN_PA_POSTING')){{$pafiledb_template->assign_block_vars('smilies', $parsing_template);$row['link_style'] = preg_replace('/(\b)/', '\\1ALSPACEHOLDER', $row['link_style']);$style = ' style="' . htmlspecialchars($row['link_style']) . '" ';{{$template->assign_block_vars('smilies', $parsing_template);$style = ' ';}$autolinks['match'][] = '/(?<![\/\w@\.:-])(?!\.\w)(' . phpbb_preg_quote($row['link_keyword'], '/'). ')(?![\/\w@:-])(?!\.\w)/i';$db->sql_freeresult($result);if($row['link_int'])}}/** Undo HTML special chars*/function undo_htmlspecialchars($input, $full_undo = false){if($full_undo){$input = str_replace(' ', '', $input);}$input = preg_replace("/>/i", ">", $input);$input = preg_replace("/</i", "<", $input);$input = preg_replace("/"/i", "\"", $input);$input = preg_replace("/&/i", "&", $input);if($full_undo){if(preg_match_all('/&\#([0-9]+);/', $input, $matches) && sizeof($matches)){$list = array();for($i = 0; $i < sizeof($matches[1]); $i++){{$list[$matches[1][$i]] = true;$autolinks['replace'][] = '<a href="' . append_sid(htmlspecialchars($row['link_url'])) . '" target="_self"' . $style . 'title="' . htmlspecialchars($row['link_comment']) . '">' . htmlspecialchars($row['link_title']) . '</a>';$search = array();else$replace = array();foreach($list as $var => $value){{$search[] = '&#' . $var . ';';$autolinks['replace'][] = '<a href="' . htmlspecialchars($row['link_url']) . '" target="_blank"' . $style . 'title="' . htmlspecialchars($row['link_comment']) . '">' . htmlspecialchars($row['link_title']) . '</a>';$replace[] = chr($var);$input = str_replace($search, $replace, $input);return $input;/**}* Autolinks* Original Author - Jim McDonald - Edited by Mighty Gorgon/**/* Make a link clickablefunction autolink_text($text, $forum_id = '')*/function make_clickable($text){$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);// pad it with a space so we can match things at the start of the 1st line.$ret = ' ' . $text;// matches an "xxxx://yyyy" URL at the start of a line, or after a space.// xxxx can only be alpha characters.// yyyy is anything up to the first space, newline, comma, double quote or <$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing// Must contain at least 2 dots. xxxx contains either alphanum, or "-"// zzzz is optional.. will contain everything up to the first space, newline,// comma, double quote or <.$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);// matches an email@domain type address at the start of a line, or after a space.// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);// Remove our padding..$ret = substr($ret, 1);return($ret);}// Autolinks - BEGIN//// Obtain list of autolink words and build preg style replacement arrays for use by the calling script, note that the vars are passed as references this just makes it easier to return both sets of arrays//function obtain_autolinks_list($forum_id){global $db;$where = ($forum_id) ? ' WHERE link_forum = 0 OR link_forum IN (' . $forum_id . ')' : ' WHERE link_forum = -1';$sql = "SELECT * FROM " . AUTOLINKS . $where;$result = $db->sql_query($sql, 0, 'autolinks_', TOPICS_CACHE_FOLDER);$autolinks = array();while($row = $db->sql_fetchrow($result)){{// Munge word boundaries to stop autolinks from linking tostatic $autolinks;// themselves or other autolinks in step 2 in the function below.$row['link_url'] = preg_replace('/(\b)/', '\\1ALSPACEHOLDER', $row['link_url']);$row['link_comment'] = preg_replace('/(\b)/', '\\1ALSPACEHOLDER', $row['link_comment']);if($row['link_style'])if (empty($text)){{$row['link_style'] = preg_replace('/(\b)/', '\\1ALSPACEHOLDER', $row['link_style']);return $text;$style = ' style="' . htmlspecialchars($row['link_style']) . '" ';elseif (!isset($autolinks) || !is_array($autolinks)){{$style = ' ';$autolinks = $this->obtain_autolinks_list($forum_id);$autolinks['match'][] = '/(?<![\/\w@\.:-])(?!\.\w)(' . phpbb_preg_quote($row['link_keyword'], '/'). ')(?![\/\w@:-])(?!\.\w)/i';if($row['link_int'])if (sizeof($autolinks)){{$autolinks['replace'][] = '<a href="' . append_sid(htmlspecialchars($row['link_url'])) . '" target="_self"' . $style . 'title="' . htmlspecialchars($row['link_comment']) . '">' . htmlspecialchars($row['link_title']) . '</a>';global $config;}// Step 1 - move all tags out of the text and replace them with placeholderselsepreg_match_all('/(<a\s+.*?\/a>|<[^>]+>)/i', $text, $matches);{$matchnum = sizeof($matches[1]);$autolinks['replace'][] = '<a href="' . htmlspecialchars($row['link_url']) . '" target="_blank"' . $style . 'title="' . htmlspecialchars($row['link_comment']) . '">' . htmlspecialchars($row['link_title']) . '</a>';for($i = 0; $i < $matchnum; $i++)}{}$text = preg_replace('/' . preg_quote($matches[1][$i], '/') . '/', "ALPLACEHOLDER{$i}PH", $text, 1);$db->sql_freeresult($result);}return $autolinks;// Step 2 - s/r of the remaining text}if($config['autolink_first']){$text = preg_replace($autolinks['match'], $autolinks['replace'], $text, 1);}else{$text = preg_replace($autolinks['match'], $autolinks['replace'], $text);}/**// Step 3 - replace the spaces we munged in step 1* Autolinks$text = preg_replace('/ALSPACEHOLDER/', '', $text);* Original Author - Jim McDonald - Edited by Mighty Gorgon*/function autolink_text($text, $forum_id = ''){static $autolinks;if (empty($text))// Step 4 - replace the HTML tags that we removed in step 1{for($i = 0; $i < $matchnum; $i++){$text = preg_replace("/ALPLACEHOLDER{$i}PH/", $matches[1][$i], $text, 1);}}if (!isset($autolinks) || !is_array($autolinks))/** Generate bbcode uid*/function make_bbcode_uid(){{$autolinks = obtain_autolinks_list($forum_id);// Unique ID for this message..$uid = unique_id();$uid = substr($uid, 0, BBCODE_UID_LEN);return $uid;if (sizeof($autolinks))/** Make a link clickable*/function make_clickable($text){{global $config;$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);// Step 1 - move all tags out of the text and replace them with placeholders$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);preg_match_all('/(<a\s+.*?\/a>|<[^>]+>)/i', $text, $matches);$matchnum = sizeof($matches[1]);for($i = 0; $i < $matchnum; $i++){$text = preg_replace('/' . preg_quote($matches[1][$i], '/') . '/', "ALPLACEHOLDER{$i}PH", $text, 1);}// Step 2 - s/r of the remaining text// pad it with a space so we can match things at the start of the 1st line.if($config['autolink_first'])$ret = ' ' . $text;{$text = preg_replace($autolinks['match'], $autolinks['replace'], $text, 1);}else{$text = preg_replace($autolinks['match'], $autolinks['replace'], $text);}// Step 3 - replace the spaces we munged in step 1// matches an "xxxx://yyyy" URL at the start of a line, or after a space.$text = preg_replace('/ALSPACEHOLDER/', '', $text);// xxxx can only be alpha characters.// yyyy is anything up to the first space, newline, comma, double quote or <$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);// Step 4 - replace the HTML tags that we removed in step 1// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thingfor($i = 0; $i < $matchnum; $i++)// Must contain at least 2 dots. xxxx contains either alphanum, or "-"{// zzzz is optional.. will contain everything up to the first space, newline,$text = preg_replace("/ALPLACEHOLDER{$i}PH/", $matches[1][$i], $text, 1);// comma, double quote or <.}$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);}return $text;}// Autolinks - END/*// matches an email@domain type address at the start of a line, or after a space.* Get attachment details// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".*/$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);function get_attachment_details($attach_id){global $db;$sql = "SELECT a.*, d.*, s.*, p.forum_idFROM " . ATTACHMENTS_TABLE . " a, " . ATTACHMENTS_DESC_TABLE . " d, " . ATTACHMENTS_STATS_TABLE . " s, " . POSTS_TABLE . " pWHERE a.attach_id = " . $attach_id . "AND d.attach_id = a.attach_idAND s.attach_id = a.attach_idAND a.post_id > 0AND p.post_id = a.post_idLIMIT 1";$db->sql_return_on_error(true);$result = $db->sql_query($sql);$db->sql_return_on_error(false);if ($row = $db->sql_fetchrow($result))// Remove our padding..{$ret = substr($ret, 1);$db->sql_freeresult($result);return $row;}else{return false;}}/*return($ret);* Get download details*/function get_download_details($file_id){global $db, $userdata;$sql = "SELECT f.*, c.*FROM " . PA_FILES_TABLE . " f, " . PA_CATEGORY_TABLE . " cWHERE file_id = " . $file_id . "AND file_approved = '1'AND c.cat_id = f.file_catidLIMIT 1";$db->sql_return_on_error(true);$result = $db->sql_query($sql);$db->sql_return_on_error(false);if ($row = $db->sql_fetchrow($result)){$db->sql_freeresult($result);$allowed = false;if (($row['auth_view_file'] == AUTH_ALL) || ($userdata['user_level'] == ADMIN)){$allowed = true;}elseif (($row['auth_view_file'] == AUTH_REG) && $userdata['session_logged_in']){$allowed = true;}return ($allowed ? $row : false);else{return false;}}/** This function turns HTML into text... strips tags, comments spanning multiple lines including CDATA, and anything else that gets in it's way.*/function html2txt($document){$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA);$text = preg_replace($search, '', $document);return $text;/*$bbcode = new bbcode();* Convert newline to paragraph*/function nl2any($text, $tag = 'p', $feed = ''){// making tags$start_tag = "<$tag" . ($feed ? ' ' . $feed : '') . '>';$end_tag = "</$tag>";// exploding string to linesif (defined('SMILIES_TABLE'))$lines = preg_split('`[\n\r]+`', trim($text));// making new string$string = '';foreach($lines as $line)$string .= "$start_tag$line$end_tag\n";return $string;}/** Convert paragraphs to newline*/function any2nl($text, $tag = 'p'){{//exploding$bbcode->allowed_smilies = array();preg_match_all("`<" . $tag . "[^>]*>(.*)</" . $tag . ">`Ui", $text, $results);$bbcode->allowed_smilies = $cache->obtain_smileys(false);// reimploding without tagsreturn implode("\n", array_filter($results[1]));/** Convert BR to newline*/function br2nl($text, $remove_linebreaks = false){if ($remove_linebreaks){$text = preg_replace("/(\r\n|\n|\r)/", "", $text);}return preg_replace("=<br */?>=i", "\n", $text);}/** Convert newline to BR*/function nl2br_mg($text){/*$text = preg_replace("/\r\n/", "\n", $text);$text = str_replace('<br />', "\n", $text);*/$text = preg_replace(array("/<br \/>\r\n/", "/<br>\r\n/", "/(\r\n|\n|\r)/"), array("\r\n", "\r\n", "<br />\r\n"), $text);return $text;}{{$text = $bbcode->autolink_text($text, '999999');{{$message = $bbcode->autolink_text($message, $forum_id);{{$preview_message = $bbcode->autolink_text($preview_message, '999999');{{$private_message = $bbcode->autolink_text($private_message, '999999');{{$preview_message = $bbcode->autolink_text($preview_message, '999999');{{$prv_msg_review = $bbcode->autolink_text($prv_msg_review, '999999');'BOARD_TITLE' => htmlspecialchars($bbcode->undo_htmlspecialchars(strip_tags($site_name))),'BOARD_DESCRIPTION' => htmlspecialchars($bbcode->undo_htmlspecialchars(strip_tags($site_description))),'BUILD_DATE' => gmdate('D, d M Y H:i:s') . ' GMT','BUILD_DATE' => gmdate('D, d M Y H:i:s') . ' GMT',$author = $bbcode->make_clickable($author);'TOPIC_TITLE' => $bbcode->undo_htmlspecialchars($topic_title),$preview_message = $bbcode->autolink_text($preview_message, '999999');$preview_message = str_replace("\n", '<br />', $preview_message);$preview_message = str_replace("\n", '<br />', $preview_message);$template->set_filenames(array('preview' => 'posting_preview.tpl'));$template->set_filenames(array('preview' => 'posting_preview.tpl'));$shout = str_replace("\n", "\n<br />\n", $shout);$shout = str_replace("\n", "\n<br />\n", $shout);$shout = $bbcode->autolink_text($shout, '999999');{{$shout = (preg_match("/<a/", $shout)) ? str_replace("\">" , "\" target=\"_top\">", $shout) : $shout;$shout = (preg_match("/<a/", $shout)) ? str_replace("\">" , "\" target=\"_top\">", $shout) : $shout;$shout = $bbcode->autolink_text($shout, '999999');$template->assign_block_vars('shoutrow', array($template->assign_block_vars('shoutrow', array({{$message = $bbcode->autolink_text($message, $forum_id);$is_this_locked = ($forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED) ? true : false;$is_this_locked = (($forum_topic_data['forum_status'] == FORUM_LOCKED) || ($forum_topic_data['topic_status'] == TOPIC_LOCKED)) ? true : false;if (($user_warnings > $config['max_user_bancard']) || ($is_banned == true))if (($user_warnings > $config['max_user_bancard']) || $is_banned){{{{$message = $bbcode->autolink_text($message, $forum_id);generate_smilies_row();if($can_reply){if (!function_exists('generate_smilies_row')){include_once(IP_ROOT_PATH . 'includes/functions_bbcode.' . PHP_EXT);}generate_smilies_row();}<td class="row2" valign="middle"><span class="genmed">{L_RATING}:</span></td><td class="row2" valign="middle"><span class="genmed">{L_RATING}:</span></td><td class="row2" colspan="2"><span class="postdetails"><img src="images/rates/rate_{RATING}.png" /></td><td class="row2" colspan="2"><span class="postdetails"><img src="{FULL_SITE_PATH}{RATING_IMAGES_PATH}rate_{RATING}.png" /></td><td class="row2" valign="middle"><span class="genmed">{L_DLS}:</span></td><td class="row2" valign="middle"><span class="genmed">{L_DLS}:</span></td><td class="{topicrow.ROW_CLASS} row-center-small" style="background: none;">{topicrow.VIEWS}</td><td class="{topicrow.ROW_CLASS} row-center-small" style="background: none;">{topicrow.VIEWS}</td><td class="{topicrow.ROW_CLASS} row-center-small" style="background: none;">{topicrow.REPLIES}</td><td class="{topicrow.ROW_CLASS} row-center-small" style="background: none;">{topicrow.REPLIES}</td><td class="{topicrow.ROW_CLASS} row-center-small" style="background: none;"><img src="{FULL_SITE_PATH}{T_TPL_PATH}images/{CSS_COLOR}/rates/rate_{topicrow.TOPIC_RATING}.png" alt="{topicrow.TOPIC_RATING}" /></td><td class="{topicrow.ROW_CLASS} row-center-small" style="background: none;"><img src="{FULL_SITE_PATH}{RATING_IMAGES_PATH}rate_{topicrow.TOPIC_RATING}.png" alt="{topicrow.TOPIC_RATING}" /></td><td class="{topicrow.ROW_CLASS} row-center-small" style="padding-top: 0; padding-left: 2px; padding-right: 2px; background: none;" nowrap="nowrap">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} <!-- IF S_BOT --> <!-- ELSE -->{topicrow.LAST_POST_IMG}<!-- ENDIF --></td><td class="{topicrow.ROW_CLASS} row-center-small" style="padding-top: 0; padding-left: 2px; padding-right: 2px; background: none;" nowrap="nowrap">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} <!-- IF S_BOT --> <!-- ELSE -->{topicrow.LAST_POST_IMG}<!-- ENDIF --></td><td class="row3 row-center-small" style="padding-left:2px;padding-right:2px;" nowrap="nowrap">{topicrow.TOPIC_AUTHOR}</td><td class="row3 row-center-small" style="padding-left:2px;padding-right:2px;" nowrap="nowrap">{topicrow.TOPIC_AUTHOR}</td><td class="row3 row-center-small" style="padding-top:0;" nowrap="nowrap">{topicrow.LAST_POST_TIME}</td><td class="row3 row-center-small" style="padding-top:0;" nowrap="nowrap">{topicrow.LAST_POST_TIME}</td><td class="row3 row-center-small"><img src="images/rates/rate_{topicrow.TOPIC_RATING}.png"></td><td class="row3 row-center-small"><img src="{FULL_SITE_PATH}{RATING_IMAGES_PATH}rate_{topicrow.TOPIC_RATING}.png"></td>