You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 83 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Forums block - limiting the forums displayed [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
jimmyjimjim
Lieutenant
Lieutenant


Joined: Jan 23, 2003
Posts: 258

Location: USA

PostPosted: Wed Apr 23, 2003 8:25 am Reply with quoteBack to top

is there a way to limit what forums are displayed in the forums block? I have a forum where people can post comercial crap, but I don't want the "spam" forum posts to scroll through the scrolling block.
Find all posts by jimmyjimjimView user's profileSend private message
Imago
Captain
Captain


Joined: Jan 17, 2003
Posts: 629

Location: Europe

PostPosted: Wed Apr 23, 2003 8:53 am Reply with quoteBack to top

Only private view forums are not displayed in the block.
Find all posts by ImagoView user's profileSend private messageVisit poster's website
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Wed Apr 23, 2003 9:31 am Reply with quoteBack to top

in the SQL statement in the block, add
Code:
WHERE forum_id <> '[insert Forum ID of the spam forum here]'
to the end before the ";
AI
Find all posts by ArtificialIntelView user's profileSend private message
jimmyjimjim
Lieutenant
Lieutenant


Joined: Jan 23, 2003
Posts: 258

Location: USA

PostPosted: Wed Apr 23, 2003 3:39 pm Reply with quoteBack to top

I'm sorry... what is the SQL statement?
Find all posts by jimmyjimjimView user's profileSend private message
jimmyjimjim
Lieutenant
Lieutenant


Joined: Jan 23, 2003
Posts: 258

Location: USA

PostPosted: Thu Apr 24, 2003 4:13 pm Reply with quoteBack to top

any help ?
Find all posts by jimmyjimjimView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Thu Apr 24, 2003 5:14 pm Reply with quoteBack to top

well being that I don't use / have the forum block I can't tell ya. Plst the code.

AI
Find all posts by ArtificialIntelView user's profileSend private message
jimmyjimjim
Lieutenant
Lieutenant


Joined: Jan 23, 2003
Posts: 258

Location: USA

PostPosted: Thu Apr 24, 2003 5:21 pm Reply with quoteBack to top

Code:
<?php

/************************************************************************/
/* Forums Block for phpBB 2.0.0 port to PHP Nuke 6.5b6+                 */
/* ====================================================                 */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi (fbc@mandrakesoft.com)         */
/* http://phpnuke.org                     */
/*                           */
/* Version 1, modified by Sébastien Vaast                               */
/* http://membres.lycos.fr/projectpluto/                                */
/*                                                                      */
/* Updated by Tom Nitzschner 22/06/2002 to add the scrolling text       */
/*                                                                      */
/* Updated by Paul Laudanski 14 Jan 2003                                */
/* NukeCops.com  |  ComputerCops.biz               */
/*                                               */
/* Last Edited - 14 Jan 2003                        */
/*                                               */
/* This Block shows the last 10 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).               */
/*                           */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (eregi("block-Forums.php", $PHP_SELF)) {
    Header("Location: index.php");
    die();
}

include_once ('blocks/smileys.php');

global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$count = 1;
$content = "<A name= \"scrollingCode\"></A>";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"220\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Last 20 Forum Messages</b></center>";
$result1 = sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0  ORDER BY t.topic_last_post_id DESC LIMIT 20", $dbi);
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);

$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);

$topic_title=parseEmoticons($topic_title);
// Remove the comment below to add the counter
//$content .="<STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Message: $count<br></b>";

$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\"><a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"><b> $topic_title </b></a><br><font color=\"#666666\"><i>Last post by <A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a> in <a href=\"modules.php?name=Forums&file=viewforum&f=$forum_id\">$forum_name</a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
$content .= "<br><center>[ <a href=\"modules.php?name=Forums\"STYLE=\"text-decoration: none\">$sitename ]</center>";
?>
Find all posts by jimmyjimjimView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Thu Apr 24, 2003 6:44 pm Reply with quoteBack to top

change this bit:
Code:
$result1 = sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0  ORDER BY t.topic_last_post_id DESC LIMIT 20", $dbi);

to
Code:
$result1 = sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where (t.forum_id=f.forum_id and f.forum_id<> [insert spam forum id here]) and f.auth_view=0  ORDER BY t.topic_last_post_id DESC LIMIT 20", $dbi);

AI
Find all posts by ArtificialIntelView user's profileSend private message
jimmyjimjim
Lieutenant
Lieutenant


Joined: Jan 23, 2003
Posts: 258

Location: USA

PostPosted: Thu Apr 24, 2003 6:56 pm Reply with quoteBack to top

YES YES YES !!! Thank you..

I don't want to sound to L7ish here... But, what exactly did you do? I can see the difference in the scripts, but what does it do?

If you have time to help a rookie out, thanks... If not, thanks just the same for satisfying the request. Wink Wink Very Happy
Find all posts by jimmyjimjimView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Thu Apr 24, 2003 7:01 pm Reply with quoteBack to top

ok this bit here:
Code:
(t.forum_id=f.forum_id and f.forum_id<> [insert spam forum id here])
tells it what forums to look @

the bit that says "f.forum_id <> bla bla bla" is the same as f.forum_id != bla bla bla or where the forum id isn't equal to bla bla bla

ok?

AI
Find all posts by ArtificialIntelView user's profileSend private message
jimmyjimjim
Lieutenant
Lieutenant


Joined: Jan 23, 2003
Posts: 258

Location: USA

PostPosted: Thu Apr 24, 2003 7:14 pm Reply with quoteBack to top

gotit... thanks much!

Razz
Find all posts by jimmyjimjimView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.324 Seconds - 240 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::