Duckfather
04-17-2006, 08:46 AM
Hi all
I have an external menu which I want to use in an external menu.php file. I've added it as a plugin using the following code I dound on here :-
ob_start();
include('menu.php');
$includedMenuphp = ob_get_contents();
ob_end_clean();
I've used the Hook Location of global_start. This should mean that I can reference the $includeMenuphp variable most anywhere and get the menu to display. This works fine until I attempt the following code to get it to display only for logged on users (code added in the navbar template) :-
<if condition="$bbuserinfo[usergroupid] != 0">
$includedMenuphp
</if>
I've also tried using the $includedMenuphp variable just by itself with no conditionals and it doesn't show.
It just doesn't show at all, no matter what I do
Anyone got any ideas?
Cheers in advance
Andy
I have an external menu which I want to use in an external menu.php file. I've added it as a plugin using the following code I dound on here :-
ob_start();
include('menu.php');
$includedMenuphp = ob_get_contents();
ob_end_clean();
I've used the Hook Location of global_start. This should mean that I can reference the $includeMenuphp variable most anywhere and get the menu to display. This works fine until I attempt the following code to get it to display only for logged on users (code added in the navbar template) :-
<if condition="$bbuserinfo[usergroupid] != 0">
$includedMenuphp
</if>
I've also tried using the $includedMenuphp variable just by itself with no conditionals and it doesn't show.
It just doesn't show at all, no matter what I do
Anyone got any ideas?
Cheers in advance
Andy