$context won't work!

Started by ericmn, October 29, 2006, 05:57:08 PM

Previous topic - Next topic

ericmn

Hi, i've been using SMF such a long time and i'm still crazy about it!  :D

The script made it incredibly easy for me to have fully integrated portal website.

I use $context variable to pull out some required user info. Unfortunately, somehow it won't work on another website. I tried to check to see if user is guest or member by following code:
<?php
//at the top of the html code
require_once('forums/SSI.php');
// at the middle of the html code, where i need to check user.
global $context
if($context['user']['is_guest']){
echo
'Login form';
}else{ echo
'User menu, and log-out link etc...'; }
?>


I have SMF RC2. hopefully, gonna bridge it to coppermine 1.4.9


Please - any comment, idea, point would be appreciated!

I just don't know what to do now.

winrules

You need a semi-colon after the global line. Actually you don't need the global line at all since it's not in a function.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


ericmn

Thanks, yeah actually there's no need to call it globally. It has already called in SSI.php.

SO anything else? please fill me in!

winrules

Umm is it still not working? If not can you please post the current code you're using.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


Advertisement: