Advertisement:

Make board viewable for some and not others

Aloittaja Orlando, helmikuu 13, 2005, 07:28:08 AP

« edellinen - seuraava »

Orlando

I tried searching for this but was unable to find it.

How can I make a board appear to everyone but only accessible to the group members.

For example, I have a board called "high level fans".  I would like everyone to see that the board is there and that it exists but I want to restrict the access to only members that belong to the High Level Fans Group.

Thanks in advance

Orlando
hxxp:www.jpstuffonline.com/acemillerlive [nonactive]

karmic

Also hoping for an answer.  May find it in continuing thread searching, but would appreciate a quick answer here in case I don't find anything.

Oldiesmann

Sources/Load.php

Find
// Just build this here, it makes it easier to change/use.
if ($user_info['is_guest'])
$user_info['query_see_board'] = 'FIND_IN_SET(-1, b.memberGroups)';
// Administrators can see all boards.
elseif ($user_info['is_admin'])
$user_info['query_see_board'] = '1';
// Registered user.... just the groups in $user_info['groups'].
else
$user_info['query_see_board'] = '(FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroups))';


Replace
// Just build this here, it makes it easier to change/use.
if ($user_info['is_guest'])
$user_info['query_see_board'] = 'FIND_IN_SET(-1, b.memberGroups)';
// Administrators can see all boards.
elseif ($user_info['is_admin'])
$user_info['query_see_board'] = '1';
// Registered user.... just the groups in $user_info['groups'].
else
$user_info['query_see_board'] = '(b.ID_BOARD = '{boardid}' OR FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroups))


If you want to do this for multiple boards, use this instead:
// Just build this here, it makes it easier to change/use.
if ($user_info['is_guest'])
$user_info['query_see_board'] = 'FIND_IN_SET(-1, b.memberGroups)';
// Administrators can see all boards.
elseif ($user_info['is_admin'])
$user_info['query_see_board'] = '1';
// Registered user.... just the groups in $user_info['groups'].
else
$user_info['query_see_board'] = '(b.ID_BOARD IN (1,2,4,6,8) OR FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroups))';


Replace the 1,2,4,6,8 with the ID numbers of the boards you want everyone to see. The board ID is the number right before the ".0" in the URL when you click on a board.
Michael Eshom
Christian Metal Fans

Advertisement: