Customizing SMF > Tips and Tricks

Allowing guests to see all Boards but not entering

<< < (58/59) > >>

Dragooon:
Did you get this issue solved? If not, you can have a look at this mod.

B1gft:
Is there an update on this code as when I went into the the file coding on the line was different than shown.
I assume it could have slightly changed as the script progressed.
thanks

paulwiggy:
Hi, could someone help me with a simple question.  Is it possible to configure this product so that user must register before they can see anything on any of the forums

Illori:
in admin->features and option you can disable guests from viewing your whole forum.

Masterd:

--- Quote from: paulwiggy on November 30, 2010, 07:39:05 AM ---Hi, could someone help me with a simple question.  Is it possible to configure this product so that user must register before they can see anything on any of the forums

--- End quote ---


Find this in Sources/Load.php:


--- Code: ---// Now check if the user is a moderator.
$user_info['is_mod'] = isset($board_info['moderators'][$user_info['id']]);

if (count(array_intersect($user_info['groups'], $board_info['groups'])) == 0 && !$user_info['is_admin'])
$board_info['error'] = 'access';
--- End code ---


Replace that with this:


--- Code: ---// Now check if the user is a moderator.
$user_info['is_mod'] = isset($board_info['moderators'][$user_info['id']]);

if ((count(array_intersect($user_info['groups'], $board_info['groups'])) == 0 && !$user_info['is_admin']) || (!empty($topic) && $user_info['is_guest']))
        $board_info['error'] = 'access';
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version