1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-17 22:28:46 +01: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:
James Atkinson 2001-02-22 21:40:02 +00:00
parent 4317bbe9be
commit acfee8f3f1
3 changed files with 34 additions and 29 deletions

View File

@ -69,6 +69,9 @@ $dbname = "mydbname";
$dbuser = "imanidiot";
$dbpasswd = "imanidiotspassword";
// Date format (needs to go into DB)
$date_format = "M d, Y h:i:s a";
// DB table config
$banlist_table = "phpbb_banlist";
$categories_table = "phpbb_categories";
@ -89,4 +92,4 @@ $users_table = "phpbb_users";
$whosonline_table = "phpbb_whosonline";
$words_table = "phpbb_words";
?>
?>

View File

@ -70,35 +70,36 @@ if($total_rows)
$template->parse("cats", "catrow", true);
for($y = 0; $y < $total_forums; $y++)
{
$folder_image = "<img src=\"images/folder.gif\">";
$posts = 150;
$topics = 35;
$last_post = "05-10-2000 12:34:33pm<br>by theFinn";
$moderators = "<a href=\"profile.$phpEx?mode=viewprofile&user_id=1\">theFinn</a>";
if($row_color == "#DDDDDD")
{
$row_color = "#CCCCCC";
}
else
{
$row_color = "#DDDDDD";
}
$template->set_var(array("FOLDER" => $folder_image,
"FORUM_NAME" => stripslashes($forum_rows[$y]["forum_name"]),
"FORUM_ID" => $forum_rows[$y]["forum_id"],
"FORUM_DESC" => stripslashes($forum_rows[$y]["forum_desc"]),
"ROW_COLOR" => $row_color,
"PHPEX" => $phpEx,
"POSTS" => $posts,
"TOPICS" => $topics,
"LAST_POST" => $last_post,
"MODERATORS" => $moderators));
$template->parse("forums", "forumrow", true);
$folder_image = "<img src=\"images/folder.gif\">";
$posts = $forum_rows[$y]["forum_posts"];
$topics = $forum_rows[$y]["forum_topics"];
$last_post = $forum_rows[$y]["forum_last_post"];
$last_post = date($date_format, $last_post);
$moderators = "<a href=\"profile.$phpEx?mode=viewprofile&user_id=1\">theFinn</a>";
if($row_color == "#DDDDDD")
{
$row_color = "#CCCCCC";
}
else
{
$row_color = "#DDDDDD";
}
$template->set_var(array("FOLDER" => $folder_image,
"FORUM_NAME" => stripslashes($forum_rows[$y]["forum_name"]),
"FORUM_ID" => $forum_rows[$y]["forum_id"],
"FORUM_DESC" => stripslashes($forum_rows[$y]["forum_desc"]),
"ROW_COLOR" => $row_color,
"PHPEX" => $phpEx,
"POSTS" => $posts,
"TOPICS" => $topics,
"LAST_POST" => $last_post,
"MODERATORS" => $moderators));
$template->parse("forums", "forumrow", true);
}
$template->parse("cats", "forums", true);
$template->set_var("forums", "");
$template->parse("cats", "forums", true);
$template->set_var("forums", "");
}
}
}
}
$template->pparse("output", "body");

View File

@ -39,5 +39,6 @@ $template->set_var(array("PHPBB_VERSION" => "2.0-alpha",
"ADMIN_LINK" => $admin_link));
$template->pparse("output", "overall_footer");
// Close our DB connection.
$db->close();
?>