ForumsV2: Show number of replies, unread topics

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   ForumsV2: Show number of replies, unread topics
Peter-CH
CZ Newbie
Peter-CH has been a member for over 19 year's 19 Year Member
switzerland.gif
Gender: Male
Website:
Status: Offline
Joined: May 27, 2005
0.00 posts per day
Posts: 12
Points: 299
   
I have installed your nice ForumsV2 Block on my website [ Register or login to view links on this board. ] Although I like it very much icon_biggrin.gif , some improvements will be appriciated. Here is what I want:

1. Insert number of replies between topic and author, like this:

New developments in the community (3) Peter Community Forum Jun 4 2005 at 15:42:22


2. Indicate unread topics in a different color, say, red color, with a different topic icon.

If this is not the right forum for posting the query, pls forgive me and tell me where I should go.

[code]<?php
/************************************************************************/
/* ForumsV2 Block for phpBB 2.0.0-6 port to PHP Nuke 6.5+ */
/* ==================================================== */
/* Copyright (c) 2003-2004 by Telli (telli@codezwiz.com) */
/* [ Register or login to view links on this board. ] */
/* Last Edited - 20 Aug 2004 */
/* */
/* This Block shows the last x # topics where a message was posted, */
/* along with the username of the last poster and the day and time */
/* of the post. */
/* It will also show smileys in the topic titles thanks to the */
/* smileys.php file found in Leo Tan Block Forums version */
/* (http://www.cybercomp.d2g.com). */
/* Used in Wenhui now! */
/************************************************************************/

if (eregi("block-ForumsV2.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.html");
die();
}

//# TO SHOW
$toshow = 7;

define("_BBFORUM_TOTTOPICS","Topics ");
define("_BBFORUM_TOTPOSTS","Posts ");
define("_BBFORUM_TOTVIEWS","Views ");
define("_BBFORUM_TOTREPLIES","Replies ");
define("_BBFORUM_TOTMEMBERS","Members");
define("_BBFORUM_FORUM","Forums");
define("_BBFORUM_SEARCH","Search");

include_once ('blocks/smileys.php');
$cz_theme = get_theme();
global $prefix, $user_prefix, $db, $dbi, $sitename, $user, $cookie, $group_id;

$content .= "<br />";
$content .= "<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">";
//1 QUERY
$result = $db->sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id, u.username, u.user_id, p.poster_id, FROM_UNIXTIME(p.post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f LEFT JOIN ".$prefix."_bbposts p ON (p.post_id = t.topic_last_post_id) LEFT JOIN ".$prefix."_users u ON (u.user_id = p.poster_id) WHERE t.forum_id=f.forum_id AND f.auth_view=0 ORDER BY t.topic_last_post_id DESC LIMIT $toshow");
while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id, $username, $user_id, $poster_id, $post_time) = $db->sql_fetchrow($result1)) {

$topic_title=parseEmoticons($topic_title);
$content .= "<tr><td width=\"100%\"><img src=\"themes/$cz_theme/forums/images/icon_minipost.gif\" border=\"0\" alt=\"\">&nbsp;&nbsp;<a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\">$topic_title</a>&nbsp; <A HREF=\"forum-userprofile-.html$poster_id\">$username</a> <a href=\"modules.php?name=Forums&amp;file=viewforum&amp;f=$forum_id\">$forum_name</a> $post_time</font></td></tr>";
$count = $count + 1;
}
$content .= "</table>";
?>[/code



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum