Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
stclem
Regular
Regular



Joined: Oct 18, 2008
Posts: 52

PostPosted: Thu Dec 04, 2008 9:36 am Reply with quote

the forum block who is in the nuke dos not show hidden forums (forums open to groups only), but if i change 2 to 3 in the code it show all forums.

Code:
(($auth_view < 2) OR ($auth_read < 2))


I only want it to show hidden forums, is it posible? Since it can show only open forums or all forums it cant be to difficult to change it?

thanks


Code:
if ( !defined('BLOCK_FILE') ) {

   Header('Location: ../index.php');
   die();
}

global $prefix, $db, $sitename;

$sql = 'SELECT t.forum_id, topic_id, topic_title, auth_view, auth_read FROM '.$prefix.'_bbtopics AS t, '.$prefix.'_bbforums AS f WHERE f.forum_id=t.forum_id ORDER BY topic_time DESC LIMIT 10';
$result = $db->sql_query($sql);
$content = '<br />';
while (list($forum_id, $topic_id, $topic_title, $auth_view, $auth_read) = $db->sql_fetchrow($result)) {
   if (($auth_view < 2) OR ($auth_read < 2)) {
      $content .= '<img src="images/arrow.gif" border="0" alt="" title="" width="9" height="9" /> <a href="modules.php?name=Forums&amp;file=viewtopic&amp;t='.$topic_id.'">'.$topic_title.'</a><br />';
   }
}

$content .= '<br /><center><a href="modules.php?name=Forums"><b>'.$sitename.' Forums</b></a><br /><br /></center>';
?>
 
View user's profile Send private message
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Thu Dec 04, 2008 9:46 am Reply with quote

What results are you getting? Is 3 a valid variable in auth_view table?

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
stclem







PostPosted: Thu Dec 04, 2008 9:50 am Reply with quote

if i change 2 to 1 or 0 i get nothing. if i change it to anything abow 2, posts from all the forums (hidden and open) is in the block.
I dont know why, it just do.

I want a block who only containts the hidden forum. If its posible to make it only show hidden forums it wold be great.

Or is there a way to make the block only show forum number 2.?
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Dec 04, 2008 11:13 am Reply with quote

($auth_view == 3)
perhaps

or

($forum_id == 2)

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
stclem







PostPosted: Thu Dec 04, 2008 11:24 am Reply with quote

perfect. thanks.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©