mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Implementing the total topics/posts/last post in forums table thing
git-svn-id: file:///svn/phpbb/trunk@20 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
4317bbe9be
commit
acfee8f3f1
3 changed files with 34 additions and 29 deletions
|
@ -69,6 +69,9 @@ $dbname = "mydbname";
|
||||||
$dbuser = "imanidiot";
|
$dbuser = "imanidiot";
|
||||||
$dbpasswd = "imanidiotspassword";
|
$dbpasswd = "imanidiotspassword";
|
||||||
|
|
||||||
|
// Date format (needs to go into DB)
|
||||||
|
$date_format = "M d, Y h:i:s a";
|
||||||
|
|
||||||
// DB table config
|
// DB table config
|
||||||
$banlist_table = "phpbb_banlist";
|
$banlist_table = "phpbb_banlist";
|
||||||
$categories_table = "phpbb_categories";
|
$categories_table = "phpbb_categories";
|
||||||
|
@ -89,4 +92,4 @@ $users_table = "phpbb_users";
|
||||||
$whosonline_table = "phpbb_whosonline";
|
$whosonline_table = "phpbb_whosonline";
|
||||||
$words_table = "phpbb_words";
|
$words_table = "phpbb_words";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -70,35 +70,36 @@ if($total_rows)
|
||||||
$template->parse("cats", "catrow", true);
|
$template->parse("cats", "catrow", true);
|
||||||
for($y = 0; $y < $total_forums; $y++)
|
for($y = 0; $y < $total_forums; $y++)
|
||||||
{
|
{
|
||||||
$folder_image = "<img src=\"images/folder.gif\">";
|
$folder_image = "<img src=\"images/folder.gif\">";
|
||||||
$posts = 150;
|
$posts = $forum_rows[$y]["forum_posts"];
|
||||||
$topics = 35;
|
$topics = $forum_rows[$y]["forum_topics"];
|
||||||
$last_post = "05-10-2000 12:34:33pm<br>by theFinn";
|
$last_post = $forum_rows[$y]["forum_last_post"];
|
||||||
$moderators = "<a href=\"profile.$phpEx?mode=viewprofile&user_id=1\">theFinn</a>";
|
$last_post = date($date_format, $last_post);
|
||||||
if($row_color == "#DDDDDD")
|
$moderators = "<a href=\"profile.$phpEx?mode=viewprofile&user_id=1\">theFinn</a>";
|
||||||
{
|
if($row_color == "#DDDDDD")
|
||||||
$row_color = "#CCCCCC";
|
{
|
||||||
}
|
$row_color = "#CCCCCC";
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
$row_color = "#DDDDDD";
|
{
|
||||||
}
|
$row_color = "#DDDDDD";
|
||||||
$template->set_var(array("FOLDER" => $folder_image,
|
}
|
||||||
"FORUM_NAME" => stripslashes($forum_rows[$y]["forum_name"]),
|
$template->set_var(array("FOLDER" => $folder_image,
|
||||||
"FORUM_ID" => $forum_rows[$y]["forum_id"],
|
"FORUM_NAME" => stripslashes($forum_rows[$y]["forum_name"]),
|
||||||
"FORUM_DESC" => stripslashes($forum_rows[$y]["forum_desc"]),
|
"FORUM_ID" => $forum_rows[$y]["forum_id"],
|
||||||
"ROW_COLOR" => $row_color,
|
"FORUM_DESC" => stripslashes($forum_rows[$y]["forum_desc"]),
|
||||||
"PHPEX" => $phpEx,
|
"ROW_COLOR" => $row_color,
|
||||||
"POSTS" => $posts,
|
"PHPEX" => $phpEx,
|
||||||
"TOPICS" => $topics,
|
"POSTS" => $posts,
|
||||||
"LAST_POST" => $last_post,
|
"TOPICS" => $topics,
|
||||||
"MODERATORS" => $moderators));
|
"LAST_POST" => $last_post,
|
||||||
$template->parse("forums", "forumrow", true);
|
"MODERATORS" => $moderators));
|
||||||
|
$template->parse("forums", "forumrow", true);
|
||||||
}
|
}
|
||||||
$template->parse("cats", "forums", true);
|
$template->parse("cats", "forums", true);
|
||||||
$template->set_var("forums", "");
|
$template->set_var("forums", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$template->pparse("output", "body");
|
$template->pparse("output", "body");
|
||||||
|
|
||||||
|
|
|
@ -39,5 +39,6 @@ $template->set_var(array("PHPBB_VERSION" => "2.0-alpha",
|
||||||
"ADMIN_LINK" => $admin_link));
|
"ADMIN_LINK" => $admin_link));
|
||||||
$template->pparse("output", "overall_footer");
|
$template->pparse("output", "overall_footer");
|
||||||
|
|
||||||
|
// Close our DB connection.
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue