CZcenterforums block

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   CZcenterforums block
thedon
CZ Super Newbie
thedon has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.01 posts per day
Posts: 38
Points: 2,114
   
just a quick question.

what code would I have to remove from the CZ centerforums block in order to get rid of the 'forum categories' portion on top and JUST display the latest posts?

Thanks for your help.



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
The whole top <table>




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: CZcenterforums block
thedon
CZ Super Newbie
thedon has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.01 posts per day
Posts: 38
Points: 2,114
   
I don't see <table> anywhere. Here is the code I get from that block:

<?php
/********************************************************/
/* Center Forum Block for PHP-Nuke                      */
/* By: Telli (telli@codezwiz.com)                       */
/* http://codezwiz.com/                                 */
/* Copyright © 2000-2003 by Codezwiz                    */
/* Updated 7-24-04                                      */
/********************************************************/

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

// Center block Forums
define("_CZCENTERFORUM_NEWTOPICS","New Topics");
define("_CZCENTERFORUM_POSTER","Poster");
define("_CZCENTERFORUM_VIEWS","Views");
define("_CZCENTERFORUM_REPLIES","Replies");
define("_CZCENTERFORUM_LASTPOSTER","Last Poster");
define("_CZCENTERFORUM_TOTTOPICS","Topics: ");
define("_CZCENTERFORUM_TOTPOSTS","Posts: ");
define("_CZCENTERFORUM_TOTMEMBERS","Members:");
define("_CZCENTERFORUM_FORUM","Enter Forum");
define("_CZCENTERFORUM_SEARCH","Search Forum");
define("_CZCENTERFORUM_TITLE","Latest from");

global $prefix, $user_prefix, $db, $sitename, $bgcolor1, $bgcolor2, $bgcolor3, $ThemeSel;

//When set to 1 then Forums permissions will apply.
$permissionstoread = 0;

//# Of Topics
$toshow  = 5;

//Topic Image
$TopicImage = "<img src=\"themes/$ThemeSel/forums/images/folder.gif\" border=\"0\">";

/**********************/
/* Don't Edit Below ! */
/**********************/

//Total Topics
function cztotal_topics() {
    global $prefix, $db;
    $sql = "SELECT COUNT(*) FROM ".$prefix."_bbtopics";
    list($total_topics) = $db->sql_fetchrow($db->sql_query($sql));
    return $total_topics;
}

//Total Posts
function cztotal_posts() {
    global $prefix, $db;
    $sql = "SELECT COUNT(*) FROM ".$prefix."_bbposts";
    list($total_posts) = $db->sql_fetchrow($db->sql_query($sql));
    return $total_posts;
}

//Total Members
function cznumusers() {
    global $prefix, $db;
    $sql = "SELECT COUNT(*) FROM ".$prefix."_users WHERE user_id > 1";
    list($numrows) = $db->sql_fetchrow($db->sql_query($sql));
    return $numrows;
}

/* Last X New Topics */

      $result = $db->sql_query("SELECT t.topic_id, t.topic_poster, t.topic_views, t.topic_replies, 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_poster, $topic_views, $topic_replies, $topic_last_post_id, $topic_title, $forum_name, $forum_id, $username, $user_id, $poster_id, $post_time) = $db->sql_fetchrow($result)) {

      $LastPoster = "<A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\">$username</a>";
     

      $result2 = $db->sql_query("SELECT username FROM ".$user_prefix."_users where user_id='$topic_poster'");
      list($ouname) = $db->sql_fetchrow($result2);

      $OrigPoster = "<A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$topic_poster\"> $ouname </a>";
   
if(strlen($topic_title) > 25) {
   $topic_title = substr($topic_title,0,25);
        $topic_title .= "...";
}
      $TopicTitleShow = "<a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\">$topic_title</a>";

      $Topic_Buffer .= "<tr height=20><td class=\"row1\" align=\"center\">$TopicImage</td><td class=\"row1\">&nbsp;$TopicTitleShow</td><td class=\"row1\" align=\"center\">$OrigPoster</td><td class=\"row1\" align=\"center\"><b>$topic_views</b></td><td class=\"row1\" align=\"center\"><b>$topic_replies</b></td><td align=\"center\" class=\"row1\">$LastPoster<br><font size=\"-2\"><i>$post_time</i></font></td></tr>";

}

/* Write Table to Screen */
$content  = "<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">";

$content .= "<tr><td width=\"100%\" height=\"24\" colspan=\"6\" align=\"center\"><font class=\"boxtitle\"><b>Forum Categories</b></font></td></tr>";

$content .= "<tr><td width=\"100%\" height=\"24\" colspan=\"6\" align=\"left\" class=\"row1\">";

$cat = $db->sql_query("SELECT * FROM ".$prefix."_bbcategories");
while ($cat_row = $db->sql_fetchrow($cat)) {
   $cat_id = $cat_row[0];
   $cat_title = $cat_row[1];
   $content .= "<br><b>&nbsp<a href=\"modules.php?name=Forums&file=index&c=$cat_id\">$cat_title</a></b><br>";
   $forum = $db->sql_query("SELECT * FROM ".$prefix."_bbforums where cat_id='$cat_id'");
   while ($forum_row = $db->sql_fetchrow($forum)) {
      $forum_id = $forum_row[0];
      $forum_title = $forum_row[2];
      $for_count ++;
      $content .= "&nbsp&nbsp&nbsp&nbsp<a href=\"modules.php?name=Forums&file=viewforum&f=$forum_id\">$forum_title</a>";
   }
}
$content .= "</td></tr>";

$content .= "<tr><td width=\"100%\" height=\"24\" colspan=\"6\" align=\"center\" class=\"row1\><font class=\"boxtitle\"><b>Lastest Posts</b></font></td></tr>";

$content .= "<tr><td>&nbsp;&nbsp;</td><td align=\"center\">"._CZCENTERFORUM_NEWTOPICS."</td><td align=\"center\">"._CZCENTERFORUM_POSTER."</td><td align=\"center\">"._CZCENTERFORUM_VIEWS."</td><td align=\"center\">"._CZCENTERFORUM_REPLIES."</td><td align=\"center\">"._CZCENTERFORUM_LASTPOSTER."</td></tr>";
$content .= "$Topic_Buffer";
$content .= "<tr><td align=\"center\" colspan=\"6\"><font class=\"tiny\">"._CZCENTERFORUM_TOTTOPICS."<b>".cztotal_topics()."</b>&nbsp;<b>|</b>&nbsp;"._CZCENTERFORUM_TOTPOSTS."<b>".cztotal_posts()."</b>&nbsp;<b>|</b>&nbsp;<a href=\"modules.php?name=Members_List\">"._CZCENTERFORUM_TOTMEMBERS."</a>&nbsp;<b>".cznumusers()."</b></center></td></tr>";
$content .= "<tr><td align=\"center\" colspan=\"6\">[ <a href=\"modules.php?name=Forums\">"._CZCENTERFORUM_FORUM."</a> ]&nbsp;&nbsp;&nbsp;[ <a href=\"modules.php?op=modload&name=Forums&file=search\">"._CZCENTERFORUM_SEARCH."</a> ]</center></font></td></tr></td></tr>";
$content .= "</table>";

?>


can you just tell me what lines to delete (#x through #x)?

thanks a bunch


Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Delete this code:

$content .= "<tr><td width=\"100%\" height=\"24\" colspan=\"6\" align=\"center\"><font class=\"boxtitle\"><b>Forum Categories</b></font></td></tr>";

$content .= "<tr><td width=\"100%\" height=\"24\" colspan=\"6\" align=\"left\" class=\"row1\">";

$cat = $db->sql_query("SELECT * FROM ".$prefix."_bbcategories");
while ($cat_row = $db->sql_fetchrow($cat)) {
   $cat_id = $cat_row[0];
   $cat_title = $cat_row[1];
   $content .= "<br><b> ;<a href=\"forum-c.html$cat_id\">$cat_title</a></b><br>";
   $forum = $db->sql_query("SELECT * FROM ".$prefix."_bbforums where cat_id='$cat_id'");
   while ($forum_row = $db->sql_fetchrow($forum)) {
      $forum_id = $forum_row[0];
      $forum_title = $forum_row[2];
      $for_count ++;
      $content .= " ; ; ; ;<a href=\"modules.php?name=Forums&file=viewforum&f=$forum_id\">$forum_title</a>";
   }
}
$content .= "</td></tr>";




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: CZcenterforums block
thedon
CZ Super Newbie
thedon has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.01 posts per day
Posts: 38
Points: 2,114
   
thanks a bunch telli

I don't know what I'd do without you guys - you always come through.



Back to top Reply with quote
#6   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Your Welcome!




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
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