![]() |
Need help with including php files using image vars
I have studied the tutorial section on how to included php files.
I want to include my header template as a file on my server, instead of pasting it into the area in the style manager. So I have created a plug-in attached to the global_start hook: PHP Code:
PHP Code:
HTML Code:
<img src="$stylevar[imgdir_misc]/nav_welcome.gif" width="251" height="29" alt="" /> Also, there are some php variables in the header template, that are just getting printed out, instead of the actual php code. Do I need to put an eval() somewhere in the above code? Kind of lost on this... thanks. --------------- Added [DATE]1214187596[/DATE] at [TIME]1214187596[/TIME] --------------- Actually, looking at the HTML source shows that the php in the header is not being executed. the URL of the images still show up as $stylevar[...], so obviously I need to be doing something different to get the php in the header.php file to actually execute, but what? |
Try this in your plugin.
PHP Code:
|
Thanks for the reply - but I tried it and it doesn't get any different result. The php is still not executing. Here is a slightly simplified version of the kl_templates/header.php file:
HTML Code:
<div id="back-gradient"> |
PHP Code:
|
Thank you for you reply, but again (sadly), it did not work. Same result. Very strange, I agree. I also believe an eval() is needed, but so far, it is not working....
|
Does "$stylevar" actually appear when you view the source? Try:
PHP Code:
|
Try the global_setup_complete hook and see if you get any errors or anything.
|
All times are GMT. The time now is 07:00 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:
|