Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
helidoc
Hangin' Around



Joined: Jul 09, 2006
Posts: 49

PostPosted: Fri Jan 01, 2010 6:12 pm Reply with quote

I was going over running through the block and found the following.
On line 374 shouldn't the hideViewReadOnly argument be HideViewReadOnly ? When I change this to the latter I can view my private forums on my test site as my account is auth to do so. Though with a test account that is not auth to view private forums they still show up listed in the block so I'm curious as to what changes need to be made so that they cannot be seen by an unauth user. Thanks

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 ) || ( $auth_read != 0 ) ) {
         $skip_display = 1;
      }
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Jan 01, 2010 7:01 pm Reply with quote

$hideViewReadOnly is the proper name as it is defined as such on line 93.

If you change it to HideViewReadOnly it will always read false and show everything. You are probably getting erros in your error_log about an undefined variable "HideViewReadOnly" on line 374.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
helidoc







PostPosted: Fri Jan 01, 2010 7:22 pm Reply with quote

Hrmm ok changed it back to $hideViewReadOnly , was trying to figure out why users with permissions to see/post in private forums did not see them listed in the collapsed block at all with out showing them to all users which is what I get when I change line 93 from TRUE to FALSE with a vanilla install of 2.4
 
Palbin







PostPosted: Fri Jan 01, 2010 7:28 pm Reply with quote

Currently the block is not setup to handle individual user permissions. That is the way it was originally written. It is a blanket thing. If a forum is set to anything other than all no one sees it period. It is something I have been wanting to get to, but haven't had the time.
 
helidoc







PostPosted: Fri Jan 01, 2010 7:35 pm Reply with quote

Ok, well that settles that then Very Happy thanks for the fast reply. And many thanks for all the hard work everyone put into this been running a live site since 06 and 2.4 by far has been a huge improvement.

RavensScripts Wave
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

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 ©