vBulletin

Thank you for visiting. This is our website archive. Please visit our main website by clicking the banner above.
vBulletin FAQ is dedicated to helping the forum owner build, manage and profit from his vBulletin Forum
vBulletin Web Hosting - Free skins and styles for your vBulletin - Search Engine Optimization




page viewble only by users

hollyboy
03-15-2005, 06:06 AM
How do I let a page that I've created to be viewble only by the registered users of my board?

Thanks

noppid
03-15-2005, 08:07 AM
if (!$bbuserinfo['userid'])
{
print_no_permission();
}


Awaiting confimation will be allowed.

To stop both...


if (!$bbuserinfo['userid'] || $bbuserinfo['usergroupid'] == 3)
{
print_no_permission();
}


The first one is tested, the second is not and I'm on two hours sleep. (Thanks Joe)

Cheers

hollyboy
03-15-2005, 09:00 AM
if (!$bbuserinfo['userid'] || $bbuserinfo['usergroupid'] == 3)
{
print_no_permission();
}





I put 1 instead of usergroupid and the unregistered users can't see the page ;)

Hot 2 questions:
1) what is that 3?
2) !$bbuserinfo['userid'] what does this do?

Thank u very much for the help. I like this forum ;)

noppid
03-15-2005, 10:47 AM
I put 1 instead of usergroupid and the unregistered users can't see the page ;)

Hot 2 questions:
1) what is that 3?
2) !$bbuserinfo['userid'] what does this do?

Thank u very much for the help. I like this forum ;)

1) The 3 is the default vB group number for users awaiting confirmation. This can be good to prevent spammers getting to the page without confirming their membership. Paranoia, you'll start to notice that people are watching us, be affraid.

2) If there is a guest on the board, their userid will be zero. The ! means not. The expression means if the userid is zero, not a value, it's a guest and show no permission.

hollyboy
03-15-2005, 12:35 PM
so if I want to avoid the unregistered users to see a page and the id is 1 what should I do?

noppid
03-15-2005, 03:51 PM
so if I want to avoid the unregistered users to see a page and the id is 1 what should I do?

You lost me. Unregistered users are all usergroupid 0 in vB.


vBulletin

seo book

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum