+ Changed generating last post and post count in forum and topic.php

+ Deleted not used template file: post_add_body.tpl
+ Replaced MCP images

git-svn-id: https://svn.pioder.pl/uf-svn/uF@21 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
pioder
2009-05-03 21:00:21 +00:00
parent b1f37b6ea5
commit c2ba3eb804
70 changed files with 371 additions and 395 deletions

View File

@@ -52,18 +52,19 @@ $skin = array_push_associative($skin,GenerateHeader($lng['showforum'].': '.$foru
//do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/forum_body.tpl');
$sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE f_id='$fid' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;";
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain topics information');
$sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".*, ".TOPICS_TABLE.".posts AS `postcount`, ".TOPICS_TABLE.".lastpost AS `topic_lastpost` FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE f_id='$fid' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;";
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain topics information');
$value = DataBase::num_rows($query);
if ($value>0)
{
while($record = DataBase::fetch($query))
{
$last_post = explode(':', $record['topic_lastpost']);
$skin = array(
't_id'=>$record['t_id'],
'fname'=>($record['sticky']=='1') ? '<b>'.$lng['sticky'].'</b>'.$record['name'] : $record['name'],
'author'=>Topic::TopicAuthor($record['author']),
'tposts'=>$count_topic[$record['t_id']],
'tposts'=>$record['postcount'],
'new_post'=>Topic::LastPostImg(),
'lastpost'=>Topic::LastPostInTopic($record['t_id'])
);