Hello,
I think this mod is neat. I modified it a bit to include more information in the marquee. Namely, to include the Category->Forum Name->Topic instead of just the Topic. It helps the user determine where it came from.
Just wanted to share in case anyone was interested. This is my first post, so hope it's okay.
Changes to
index.php
Changed sql to query Category table and return the cat_title from the cat table and the forum_name fromm the forums table.
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_
id, t.topic_type, t.topic_status, p.post_id, p.poster_id,
p.post_time, u.user_id, u.username, u.user_lastvisit,
c.cat_title,f.forum_name
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_T
ABLE . " p, " . USERS_TABLE . " u, " . CATEGORIES_TABLE . " c
WHERE t.forum_id IN " . $auth_view_forum_sql . " AND t.topic_id = p.topic_id
AND f.forum_id = t.forum_id
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
AND f.cat_id = c.cat_id
ORDER BY t.topic_last_post_id DESC";
Changed the marqueerow variable to include the cat_title and forum_name.
$template->assign_block_vars('marqueerow', array(
'FOLD_URL' => $pic,
'TOPIC_TITLE' => $row[$i]["topic_title"],
'FORUM_NAME' => $row[$i]["forum_name"],
'FORUM_CAT' => $row[$i]["cat_title"],
Modified
templates/subSilver/index_body.tpl
Also changed the sizes of the Category and Forum name displayed to be different so the users eyes focus on the topic first and the rest if they care about it.
<td class="row2" width="352">
<span class="forumlink"><a href="{marqueerow.TOPIC_URL}" onMouseOver="do
cument.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()"
><span class="gensmall">{marqueerow.FORUM_CAT}</span>-><span class="genmed">{marqueerow.FORUM_NAME}</span>->{marqueerow.TOPIC_TITLE}</a></span>
thanks,
--Eli