![]() |
getting a $name evaluated
I'm somewhat confused.
I've developed some additional code in index.php PHP Code:
I've added fb_menu and fb_menu1 to my templates and added $fbmenu to the code in the 'Header' template but it won't evaluate and display the html contained in the fb_menu or fb_menu1 template. My php code is down near the bottom of index.php and it outside of any conditional clauses and I know it's working fine because I did lots of testing before implementing it. Does Vbulletin NOT evaluate code in templates (such as header)? I've done this before but and added $variables associated with templates in index.php but the results of that code ($'name') was placed in forum_home this one really has me stumped.... I know my php code is working, but vb doesn't want to associate $fbmenu with my template... any ideas??? thanks in advance. - jeff |
You need to place that code in global.php before $header is eval()'ed.
|
firefly, I'm almost there, byt placing the code right before loading the header template breaks the following:
1) logged out users cannot log-in 2) new users that have just registered cannot log in. other than that; the code (for registered users) who have not logged out works great. here's my code; do you have any ideas? PHP Code:
|
You use $username in your code which breaks the log-in form. Just use $bbuserinfo[username] and $bbuserinfo[lastvisit], you don't need another query for that. And you also don't need to create another database connection, just use the current opened one.
|
oh yea...
much nicer... I also changed the perl code in Photo Post to simply write a 10 character text file with the most recent post date and used an fopen in global.php to read it.... much nicer, much faster and working great! thank! - jeff |
No problems. :)
|
All times are GMT. The time now is 09:25 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|