All you really need to do is the following:
1) Install
Bira's Post Counter and Direct Link Hack.
2) Do the insert as outlined in the instructions.
3) In admin/functions.php, find:
PHP Code:
// user
global $bbuserinfo,$session,$ignore,$cookietimeout;
add the following line before it:
PHP Code:
// Guest View Limit Hack
global $guestposts,$postcount;
// Guest View Limit Hack
4) Now find:
PHP Code:
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
and replace it with:
PHP Code:
// Guest View Limit Hack
if ( ($bbuserinfo["usergroupid"]=="1") && ($postcount > $guestposts) ) {
$post[message]="<center><b><font size=\"+2\"><br><br><br><font color=\"red\">SORRY</font><br>You are not permitted to view more than ".$guestposts." posts without <a href=\"http://yourforumhere.com/register.php?action=signup\">registering</a>.<br><br></font></b></center>";
}else{
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
}
// Guest View Limit Hack
Make sure that you replace the "yourforumhere.com" in the above snippet with your forum address, or remove the address reference altogether.
That's it
If you want to add other user groups just OR in additional usergroups.