I'm using this to keep out some determined fools on my site. For the benefit of anyone else who may be doing this, make sure you follow similar instructions as described in post #1 of this thread and apply the change to the following files in the same place:
- printthread.php
- search.php (it's possible to "find all posts by this user" and read posts that way)
- showpost.php (in case a direct url is "guessed" or otherwise)
ALSO - we have all new registrants moderated, however these hacks only considered unregistered users. This meant people could "apply" to join the board and thereby skip all of these measures (by virtue of moving from the "guest" usergroup to the COPPA or "wait for email confirmation" usergroup).
As a result, all pages that I changed had a longer line added to them to cover all the appropriate usergroups:
Code:
if (($bbuserinfo['userid'] == 0 or $bbuserinfo['usergroupid'] == 1 or $bbuserinfo['usergroupid'] == 3 or $bbuserinfo['usergroupid'] == 4) AND !preg_match("#(google|slurp@inktomi|yahoo! slurp)#si", $_SERVER['HTTP_USER_AGENT']))
{
print_no_permission();
}
Don't forget to also amend the usergroup permissions for these usergroups so that they are the same as guests.
Of course, this all depends on your motives for keeping people out. Threads in our board are private so this was appropriate for us