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
CodyG
Life Cycles Becoming CPU Cycles


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

PostPosted: Fri Jul 09, 2004 10:13 am Reply with quote

Maybe this is another stupid question ... and/or I'm trying to reinvent the wheel.

I have the laziest moderators on the planet, so they need a nuke block that reads a summary from forum posts in their private bb usergroup forums.

Currently, Nuke 6.9, moderators can only see last post summary when viewing the Forum Index Page.

I'm using NSN Groups therefore the future block can be allowed for any group I create, ie: moderators.

I've search for someone else's code ... and I've attempted to modify some other existing forums block code, but it's beyond my current knowledge. Maybe I need an explanation of $HideViewReadOnly = 1; And is there a variable (example $ModView = 1) available and could I apply the same logic as below?

Code:
$HideViewReadOnly = 1;

<snip>

$Count_Topics = 0;
$Topic_Buffer = "";
$result = sql_query( "SELECT t.topic_id, f.forum_name, f.forum_id, t.topic_last_post_id, t.topic_title, t.topic_poster, t.topic_views, t.topic_replies, t.topic_moved_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id ORDER BY topic_last_post_id DESC", $db );
while( list( $topic_id, $forum_name, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result, $db) )

{
   $skip_display = 0;
   if( $HideViewReadOnly == 1 )
   {
      $result1 = sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'", $db );
      list( $auth_view, $auth_read ) = sql_fetch_row( $result1, $db );
      if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }
   }

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
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 ©