aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-02-24 23:58:30 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-02-24 23:58:30 +0000
commit2e5030b7f692e755ffd3858cf50a2be2f6142b9e (patch)
treefec1abde943ba48abc6bc9143d5bd5b441bf8c3c /phpBB
parent52c15e54c692b41f62b9074ff787dea0e2d1e73a (diff)
downloadforums-2e5030b7f692e755ffd3858cf50a2be2f6142b9e.tar
forums-2e5030b7f692e755ffd3858cf50a2be2f6142b9e.tar.gz
forums-2e5030b7f692e755ffd3858cf50a2be2f6142b9e.tar.bz2
forums-2e5030b7f692e755ffd3858cf50a2be2f6142b9e.tar.xz
forums-2e5030b7f692e755ffd3858cf50a2be2f6142b9e.zip
Added link to view profile for last post user
git-svn-id: file:///svn/phpbb/trunk@53 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/index.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index e644fdda6d..f7f9cdb580 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -51,7 +51,7 @@ $sql = "SELECT c.*
if(!$q_categories = $db->sql_query($sql))
{
$db_error = $db->sql_error();
- error_die(QUERY_ERROR, $db_error["message"]);
+ error_die($db, QUERY_ERROR, $db_error["message"]);
}
$total_categories = $db->sql_numrows();
@@ -65,7 +65,7 @@ if($total_categories)
{
$limit_forums = " WHERE f.cat_id = $viewcat ";
}
- $sql = "SELECT f.*, u.username, p.post_time
+ $sql = "SELECT f.*, u.username, u.user_id, p.post_time
FROM ".FORUMS_TABLE." f
LEFT JOIN ".POSTS_TABLE." p ON p.post_id = f.forum_last_post_id
LEFT JOIN ".USERS_TABLE." u ON u.user_id = p.poster_id
@@ -115,9 +115,12 @@ if($total_categories)
$topics = $forum_rows[$j]["forum_topics"];
if($forum_rows[$j]["username"] != "" && $forum_rows[$j]["post_time"] > 0)
{
- $last_post_user = $forum_rows[$j]["username"];
- $last_post_time = date($date_format, $forum_rows[$j]["post_time"]);
- $last_post = $last_post_time." by ".$last_post_user;
+ $last_post_user = $forum_rows[$j]["username"];
+ $last_post_userid = $forum_rows[$j]["user_id"];
+ $last_post_time = date($date_format, $forum_rows[$j]["post_time"]);
+ $last_post = $last_post_time."<br>by ";
+ $last_post .= "<a href=\"profile.$phpEx?mode=viewprofile&user_id=".$last_post_userid;
+ $last_post .= "\">".$last_post_user."</a>";
}
else
{