Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's Collapsing Forums Block
Author Message
utssace
Worker
Worker


Joined: Feb 18, 2006
Posts: 155
Location: Virginia

PostPosted: Sun Jul 09, 2006 3:24 pm Reply with quote

For me, this block is only showing public posts.

If a priviledged user is logged onto the website, I want them to be able to see the private post topics in this block. It seems to be blocking private forums from being seen....even by allowed users.

How can I fix this please?
 
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Sun Jul 09, 2006 5:39 pm Reply with quote

Someone else just asked this question - is this a duplicate?

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
utssace
PostPosted: Sun Jul 09, 2006 6:36 pm Reply with quote

Not really.

their request just speaks of a generic center forums block.

I am using the Raven Collapsing Forum Block which to me is more complicated than just copying code from another block. I haven't seen a forum block yet that is coded to show posts based on forum permissions.

I think what needs to be changed is somewhere in the first part of this excerpt from Raven's script:

Code:
{

   $skip_display = 0;
   $result1 = $db->sql_query( "SELECT auth_view, auth_read, forum_name, cat_id FROM ".$user_prefix."_bbforums where forum_id = '$forum_id'");
   list( $auth_view, $auth_read, $forum_name, $cat_id ) = $db->sql_fetchrow( $result1 );

   if( $hideViewReadOnly)
   {
      if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }
   }

   if( $topic_moved_id != 0 )
   {
     // Shadow Topic !!
      $skip_display = 1;
   }

   if( $skip_display == 0 )
   {
     $countTopics += 1;
$result5 = $db->sql_query("SELECT cat_title FROM ".$user_prefix."_bbcategories where cat_id='$cat_id'");
list($cat_title)=$db->sql_fetchrow($result5);
$result2 = $db->sql_query("SELECT username, user_id FROM ".$user_prefix."_users where user_id='$topic_poster'");
list($username, $user_id)=$db->sql_fetchrow($result2);
$avtor=$username;
$sifra=$user_id;
$result4 = $db->sql_query("SELECT u.username, u.user_id, p.poster_id, FROM_UNIXTIME(p.post_time + $userTimeZone) as post_time FROM ".$user_prefix."_users u, ".$user_prefix."_bbposts p where u.user_id=p.poster_id AND p.post_id='$topic_last_post_id'");
list($username, $user_id, $poster_id, $post_time)=$db->sql_fetchrow($result4);
$_username = substr($username,0,15);
$_avtor = substr($avtor,0,15);
if ($topic_status) $lockTopic = "<img src='/images/blocks/locktopicgray.gif' width='14' height='14' alt='".bfcTOPICLOCKED."' title='".bfcTOPICLOCKED."' border='none' /> ";
else $lockTopic = "";
if (!$hideLinksFromGuests||is_admin($admin)||is_user($user)) {
$content .= <<<_JS_
   tickercontents[$cnt] = "<tr><td width=\"60%\" bgcolor=\"$bgcolor1\" class=\"row1\"><a href=\"forums.html?file=viewforum&f=$forum_id\" title=\"$forum_name\"><span style=\"text-decoration:none;font-style: italic\">[$cat_title:&nbsp;$forum_name]<\/span><\/a><br /><a href=\"forums.html?file=viewtopic&t=$topic_id\" title=\"$topic_title\"><span style=\"text-decoration:none;\">&nbsp;$lockTopic$topic_title<\/span><\/a><\/td><td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row2\" width=\"5%\">$topic_replies<\/td><td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row3\" width=\"20%\"><a href=\"profile-.html$sifra\">$_avtor<\/a><\/td><td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row2\" width=\"5%\">$topic_views<\/td><td align=\"center\" nowrap bgcolor=\"$bgcolor1\" class=\"row3\"><font size=\"-2\" width=\"10%\"><i>&nbsp;&nbsp;$post_time&nbsp;<\/i><\/font><br><a href=\"profile-.html$user_id\">$_username<\/a>&nbsp;<a href=\"forums.html?file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><img src=\"themes/kashmir/forums/images/icon_minipost_new.gif\" alt=\"Last Post\" border=\"0\" \/><\/a><\/td><\/tr>";
_JS_;
}
else {
$content .= <<<_JS_
   tickercontents[$cnt] = "<tr><td width=\"60%\" bgcolor=\"$bgcolor1\" class=\"row1\"><a href=\"forums.html?file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\" title=\"$topic_title\"><span style=\"text-decoration:none;font-style: italic\">[$cat_title:&nbsp;$forum_name]<\/span><br />&nbsp;$lockTopic$topic_title<\/a><\/td><td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row2\" width=\"5%\">$topic_replies<\/td><td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row3\" width=\"20%\">$_avtor<\/td><td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row2\" width=\"5%\">$topic_views<\/td><td align=\"center\" nowrap bgcolor=\"$bgcolor1\" class=\"row3\"><font size=\"-2\" width=\"10%\"><i>&nbsp;&nbsp;$post_time&nbsp;<\/i><\/font><br>$_username<\/td><\/tr>";
_JS_;
}
$content = str_replace(chr(153),"(tm)",$content);
$cnt++;
}
   if( $lastNewTopics == $countTopics ) { break 1; }

}
 
utssace
PostPosted: Mon Jul 10, 2006 7:38 pm Reply with quote

Here are my permission settings for PRIVATE forums. I want people that have permission to access these forums to be able to see the topics in the Collapsing Forums Block...while others will only see PUBLIC forums. Currently, only Public forums are showing.

Image
 
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Mon Jul 10, 2006 8:57 pm Reply with quote

Try changing the view to PRIVATE

Not sure if this will work but it just might.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
utssace
PostPosted: Tue Jul 11, 2006 4:12 pm Reply with quote

I tried that and it didn't work. Still only shows public forums.
 
gregexp
PostPosted: Tue Jul 11, 2006 4:21 pm Reply with quote

Ahh you want it to show all forums, not just the public ones, ok.

This is easy fix then, change the view and the read to public, now this will let them see the posts but will not let them respond to it.
 
utssace
PostPosted: Tue Jul 11, 2006 7:34 pm Reply with quote

Well, it's a little more to it. I don't want everyone to see all posts. I want people to be able to see all the forums that they have permissions for.

I have a group of clan members that use 3 private forums along with the public ones. I want members of the clan to be able to see all forums in the block but everyone else to only see the public. I set up a GROUP in the forum admin for clanmembers. This group has persmission to access all forums.
 
gregexp
PostPosted: Tue Jul 11, 2006 7:39 pm Reply with quote

Then I think you would like a forum block that uses groups right?

Well first I think you may want to put nsn groups on your site as the forum groups and nsn groups are sinked(I believe).

Then you want a forum block coded with nsn groups, perhaps one has already been developed, but with nsn groups installed, it would be easier for me to code a forums block for you.
 
utssace
PostPosted: Thu Jul 13, 2006 7:09 pm Reply with quote

Thanks Darklord. I appreciate the offer.

We like Raven's forum block functionality. I was hoping there was a way to accomplish this by just editing the code. I'm not familiar with NSN groups and what it does. So I'm not really sure if we need that just for this purpose.
 
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Thu Jul 13, 2006 7:58 pm Reply with quote

utssace, I have not seen it done before (not saying it hasn't) but can certainly see how useful that would be. In fact, I am quite surprised that I have not seen this. If you could fine one block that does this correctly, you could probably see what needs to change.

I wish I had the time to develop this. Shouldn't be too difficult to incorporate, but it just takes time to figure out how best to replicate the phpBB "rules" for showing forums to anonymous and logged in users. Wink

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's Collapsing Forums Block

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 ©