get_row($result_posts))
{
$post_num_id++;
if (!$row['user_group']) $row['user_group'] = 5;
if ($ajax_adds) $post_num_id = "--";
if ($row['hidden'] == "1")
{
if ($check_moderator)
{
$row['post_text'] = "
{$f_lang['h_post']}:
".$row['post_text']."
";
}
else
{
$row['post_text'] = "{$f_lang['h_post']}
";
}
}
if ($search_text)
{
$row['post_text'] = hilites($search_text, $row['post_text']);
}
//start Õàê ÒÑ by SaNcHeS
if($row['post_author'] == $row_topic['author_topic'])
{
$ts = "Àâòîð òåìû
";
}
//end Õàê ÒÑ by SaNcHeS
// ********************************************************************************
// LOAD TEMPLATE
// ********************************************************************************
$tpl->load_template($tpl_dir.'post.tpl');
if ($row['pid'] == $first_post){
$tpl->set('{post_id}', "1");
} else {
$tpl->set('{post_id}', "{$post_num_id}");
}
if ($row['edit_time'] and $show_edit_info)
$tpl->set('{edit-info}', "
{$f_lang['edit_info']} {$row['edit_user']} - ".show_date($row['edit_time'])."");
else $tpl->set('{edit-info}', "");
$go_page = "onClick=\"return dropdownmenu(this, event, FUserMenu('".urlencode($row['name'])."', '".$row['user_id']."', '".$member_id['user_group']."', '$a_forum_url'), '170px')\" onMouseout=\"delayhidemenu()\"";
if ($row['is_register'])
$tpl->set('{author}', "{$row['post_author']}");
else $tpl->set('{author}', "{$row['post_author']}");
$tpl->set( '{topic_url}', "");
if( $row['foto'] and (file_exists( ROOT_DIR . "/uploads/fotos/" . $row['foto'] )) ) $tpl->set( '{foto}', $config['http_home_url'] . "uploads/fotos/" . $row['foto'] );
else $tpl->set( '{foto}', "{THEME}/images/noavatar.png" );
if ($row['icq']) $tpl->set('{icq}', stripslashes($row['icq']));
else $tpl->set('{icq}', '--');
//start Õàê ÒÑ by SaNcHeS
if ($ts) $tpl->set('{ts}', '');
if($row['post_author'] == $row_topic['author_topic']){
if ($ts) $tpl->set('{ts}', $ts);
else $tpl->set('{ts}');
}
//end Õàê ÒÑ by SaNcHeS
if ($row['land']) $tpl->set('{land}', stripslashes($row['land']));
else $tpl->set('{land}', '--');
if ($row['fullname']) $tpl->set('{fullname}', stripslashes($row['fullname']));
else $tpl->set('{fullname}', '--');
if ($row['reg_date']) $tpl->set('{registration}', langdate("j.m.Y", $row['reg_date']));
else $tpl->set('{registration}', '--');
if ($row['is_register'] AND $row['signature'])
{
$tpl->set_block("'\\[signature\\](.*?)\\[/signature\\]'si","\\1");
$tpl->set('{signature}', stripslashes($row['signature']));
}
else $tpl->set_block("'\\[signature\\](.*?)\\[/signature\\]'si","");
if ($user_group[$row['user_group']]['colour']){
$group_span = $user_group[$row['user_group']]['colour'];
$group_name = "".$user_group[$row['user_group']]['group_name']."";
}else{
$group_name = $user_group[$row['user_group']]['group_name'];
}
if ($row['banned']){$group_name = "BANNED";}
$tpl->set('{group-name}', $group_name);
$tpl->set('{post-num}', intval($row['forum_post']));
$tpl->set('{news-num}', intval($row['news_num']));
$tpl->set('{comm-num}', intval($row['comm_num']));
// ********************************************************************************
// POST SELECTED
// ********************************************************************************
if ($check_moderator AND $post_num_id != 1) $tpl->set('{selected}', "");
else $tpl->set('{selected}', "");
// ********************************************************************************
// POST DATE
// ********************************************************************************
$row['post_date'] = strtotime($row['post_date']);
$tpl->set('{post-date}', show_date($row['post_date']));
if (!$forum_config['mod_report'] and $is_logged){
$tpl->set('[report]',"");
$tpl->set('[/report]',"");
} else {
$tpl->set_block("'\\[report\\](.*?)\\[/report\\]'si","");
}
// ********************************************************************************
// FAST
// ********************************************************************************
if ($check_write AND !$row['hidden'])
{
$tpl->set('[fast]',"");
$tpl->set('[/fast]',"");
}
else
{
$tpl->set_block("'\\[fast\\](.*?)\\[/fast\\]'si","");
}
// ********************************************************************************
// REPUTATION
// ********************************************************************************
@include (SYSTEM_DIR.'/modules/reputation.php');
if ($check_moderator)
$tpl->set('{ip}', "IP: {$row['post_ip']}");
else $tpl->set('{ip}', '');
// ********************************************************************************
// POST EDIT
// ********************************************************************************
if (($member_id['name'] == $row['post_author']) AND $group_post_edit AND !$row['hidden'] OR $deny_edit_post){
$tpl->set('[post-edit]',"");
$tpl->set('[/post-edit]',"");
}else{
$tpl->set_block("'\\[post-edit\\](.*?)\\[/post-edit\\]'si","");
}
// ********************************************************************************
// POST DEL
// ********************************************************************************
if (($member_id['name'] == $row['post_author']) AND $group_post_del AND !$row['hidden'] OR $deny_del_post)
{
if ($post_num_id != 1)
{
$tpl->set('[post-del]',"");
$tpl->set('[/post-del]',"");
}
else
{
$tpl->set_block("'\\[post-del\\](.*?)\\[/post-del\\]'si","");
}
}
else
{
$tpl->set_block("'\\[post-del\\](.*?)\\[/post-del\\]'si","");
}
// ********************************************************************************
// POST TEXT
// ********************************************************************************
$tpl->set('{text}', "".stripslashes($row['post_text'])."
");
$tpl->compile('posts');
$tpl->clear();
$posts_found = true;
}
if (stristr ($tpl->result['posts'], "[attachment="))
{
require_once SYSTEM_DIR.'/forum/sources/components/attachment.php';
}
$tpl->result['posts'] .= "\n\n";
?>