The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
API? Hook? PHP Condition code not working
When writing to a php file outside the forum directory (global.php is included),
what are the php equivalents to the template conditionals: <if condition="$show['member']"> <if condition="$bbuserinfo[field5]"> <if condition="is_member_of($bbuserinfo, array(5,6,9))"> In my portal navigation (level up from /forum), I am trying to set conditions on the viewing of certain navigation buttons. Does anyone know why the following do not work? ~trying to limit viewing of this url to members PHP Code:
PHP Code:
Would I need to write hooks? Thanks |
#2
|
|||
|
|||
Quote:
|
#3
|
|||
|
|||
Theres no need to leave PHP for just single lines use echo() instead.
As for your problem...it does seem odd. Make sure you are logged in to start with. Then do a var_dump() of $vbulletin to check that global.php is being included correctly. Also make sure you didn't just use require_once(...); but used the proper chdir() then require_once(). |
#4
|
||||
|
||||
Quote:
<?php $curdir = getcwd (); chdir('/path/to/my/forum'); @include('/global.php'); chdir ($curdir); ?> <?php chdir('./forum'); require_once('./global.php'); chdir('../'); ?> How would I check to see if it is including properly? I assumed that because I did not get a white page, it was working. I do use vbDrupal as a front end.Could it be something conflicting? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|