Using SMF SSI Function in Custom_Header Using SMF SSI Function in Custom_Header
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Using SMF SSI Function in Custom_Header

Started by martin667, May 01, 2006, 12:11:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

martin667

Hi,

I'm using SMF 1.0.6 and Coppermine 1.4.4. Bridged. Everythings works very well so far.

Now I want to use a Custom Header ( that means I'm simply using the custom header function in the admin area, there I name a PHP file ).
It includes the PHP file. No problem. Now I want to use a SMF SSI function in the PHP.

For testing purpose I just tried to do something very simple like echoing my username:

                     
<?php

require ( '../smf/SSI.php' ) ;

if (!$user_info['is_guest'] )
{
echo  $user_info['username'] ;
}
?>



But it don't work at all. The path to the SSI.php should be correct and I'm logged in ( I check that several times hehe ). So it should just echo my username. But nothing happens. If I add an "else" statement then it works. So the $user_info[] seems to be empty.

What's wrong here ?

Looking forward to your help.

Regards,
Martin

Nibbler

SSI.php is already included by the bridge system for authentication purposes, attempting to subsequently require it in your script would have no effect. This means you will need to make the variables you need global in your custom header file otherwise they will not be in scope.

martin667


my evil twin

Quote from: Nibbler on May 01, 2006, 12:30:38 PM
SSI.php is already included by the bridge system for authentication purposes, attempting to subsequently require it in your script would have no effect. This means you will need to make the variables you need global in your custom header file otherwise they will not be in scope.

hello!

how do i do that?
can you give a hint to a coding newbie?

would be very nice.
thank you in advance.

Joachim Müller