Hi there Assensvej!
I've been trying to get this issue to work for quite som time now:
If you look at the picture below you see a yellow "paper" next to the last post author of that forum category. I would like that when you click that yellow "paper" that would take you to the last post of the category (the post that was posted by the name accuring in this view)
To make that yellow "paper" appear next to last post author I edited forum/index.php:
After the line:
Kode echo "<span class='small'>".$locale['406']."<a href='".BASEDIR."profile.php?lookup=".$data['forum_lastuser']."'>".$data['user_name']."</a></span></td>\n";
(remove </span></td>)
add:
Kode echo "<a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['thread_lastpostid']."#post_".$data['thread_lastpostid']."'><img src='http://my_site/images/forum/icon_minipost_new.gif' alt='' border='0'></a></span></td>\n";
The link would be something like the one I type below (I have taken this from a forum_thread_lists_panel mod. However, I guess this line of code/link should have a database search from which it finds its data:
Kode a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['thread_lastpostid']."#post_".$data['thread_lastpostid']."
In forum/index.php there is a database search and array which looks like this:
Kode $result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name, u.user_id, u.user_name
FROM ".DB_FORUMS." f
LEFT JOIN ".DB_FORUMS." f2 ON f.forum_cat = f2.forum_id
LEFT JOIN ".DB_USERS." u ON f.forum_lastuser = u.user_id
WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' GROUP BY forum_id ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
If I add $data=dbarray($result);
Could this code be developed so that it includes a search which makes the above link possible (thread ID and post ID, pid#)?
Well, a terribly long question, sorry about that. I just cannot find a way to explain what I want with less sentences :)
Sincerely,
Henrik |