Topic: Users login status on an external page?

I searched and didnt find anything, and looked in the how to faq above.

I have an external php file on my website, the index.php. It is not associated with the forums. I got my index to pull news from the forums etc, but I want my index to show if a user is logged in or not. I couldnt figure out how your cookie/login works, and where each variable is pulled from.

Whats the best/easiest way to see if a user is logged in or out on my index file.

Thanks.

Re: Users login status on an external page?

define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
if ($pun_user['is_guest'])
{
}
else
{
}

Moved to Integration

Re: Users login status on an external page?

I get the following error: http://www.sc2armory.com/

Re: Users login status on an external page?

Did you already have the first two lines in your code?

Re: Users login status on an external page?

I had something similar, but I removed them and put yours.

6 (edited by milesj 2007-05-20 21:39)

Re: Users login status on an external page?

I got that part fixed... whats the best way to show how many messages a user has when logged in?

Nvm... i guess punbb doesnt have messaging =P, is there a mod for this?

Re: Users login status on an external page?

Run a query to check? tongue

Re: Users login status on an external page?

Im installing that messaging system, if I have any more problems ill let you know.

Thanks for your help.