View Full Version : Outside of Forums Check for Forum Cookie
I have my site at mydomain.com and my forums at mydomain.com/forums
I want the information at mydomain.com to be only viewable to the people that are logged in. What cookie should I check for and include on every page to see if the user is logged in or not?
Tony G
07-29-2005, 01:34 AM
Is this mydomain.com a portal page or just a regular html/php/whatever page?
It's just a regular php page.
Any help would be greatly appreciated.
Does anyone have any ideas? I got most of it right I think, but I want your input.
romerom
07-30-2005, 06:02 PM
try this..
chdir("./forum/");
include_once('./global.php');
chdir("../");
if ( !$bbuserinfo['userid'] ) {
print "you gets no love";
} else {
print "content content content!!!"
}
harry1951
07-31-2005, 08:40 AM
I need this too but also a check if the user is a member. What do I have to add?
Harry, I have been working on this for a while tonight, it's already going on 6am over here. I'm off to bed, but I got it to work finally, I will post the code in the morning.
harry1951
07-31-2005, 08:56 PM
I will be patient :-)
romerom
08-01-2005, 12:08 AM
I need this too but also a check if the user is a member. What do I have to add?
did that code snippet i posted up work? you'll obviously have to modify it to fit your use
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.