Log in

View Full Version : Control who views non forum pages?


rightsideforum
12-06-2009, 09:32 AM
Hi, my forum in part provides live streams...this attracts a hell of a lotta members, but so few of them are active, and I want to make sure they make a certain ammount of posts before they can view the feeds.

The feeds are put into non forum php pages...

How can I restrict who sees them? If I can at all..

Many thanks in advance.

Lynne
12-06-2009, 02:15 PM
Assuming those users with less than x posts are in a different usergroup, just add something at the beginning, such as:
if ((!isset($vbulletin->userinfo['userid']) OR $vbulletin->userinfo['userid'] == 0) OR is_member_of($vbulletin->userinfo, x, y, z))
{
// if you aren't logged in or a member of groupid x, y, z, you get no permission
print_no_permission();
}

rightsideforum
12-07-2009, 09:28 PM
hmmm I can't get it to work...do you or anyone haver an exact working code?

Where should it be placed.

It already has this code:

</if>
<if condition="$show['guest']">
<a href="http://whatsyourview.net/forum/register.php">THIS PAGE IS ONLY VIEWABLE TO MEMBERS - PLEASE CLICK HERE TO REGISTER A FREE ACCOUNT</a>
</if>

Lynne
12-07-2009, 09:34 PM
If you already have that other code, then there is no reason to put the code in the php file. The php code will give them a no permission page, so they will never see your message about registering.

rightsideforum
12-08-2009, 03:55 PM
That applies to guests, but I am talking about what we have now defined as usergroup member who have made 5 posts or less.