here's a copy-paste of the call for help on SMF's forums. If you can help, please do. If you can't, I'm afraid your safety can not be guaranteed after I assume power and begin settling scores.
edit: damnit! The HLP home page is doing it to.. Literally 5 minutes it said "Hello Rictor, you have X private messages", and now it's telling me I'm a guest. What gives?
---------------------------------------------------------
The problem that I have is that when I integrate SMF's login system into my website (no CMS, just using the SSI functions) it seems to regard me as either logged in or a guest seemingly at random. It tells me I'm a guest even when I'm clearly logged on, then on a whim it gives an accurate status and back and forth like that.
More specifically, I took the simple "Restrict access if not logged on" function from the
Basic SSI FAQ and put it on a page just for testing. Even though I am logged it, it tells me I'm a guest. I've also integrated a login box on my site and I have the same problem: innacurate recognition of my (and presumably other user's) online status. It's wierd because at times it does work as it's supposed to, giving me an accurate status as logged in, but I haven't been able to determine what makes it tick.
Here is the code I'm using, straight from the FAQ. And yes, I'm refferencing SSI.php correctly since these and other functions work at all.
<?php
require("YOUR_PATH_TO_SSI.php");
if ($context['user']['is_guest'])
{
echo
'<h5>Access Denied</h5>
We are sorry guest, it seems you dont have premission to view these downloads.';
}
else
{
echo
'<h5>Welcome ', $context['user']['name'], '!</h5>
Here are your downloads:';
}
?>
Any help would be greatly appreciated. I'm trying to get a system for restricting parts of the site to non-members working and I'm working on a tight deadline.
Cheers.