Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 23 Jun 2008, 03:11
StephenKay StephenKay is offline
 
Join Date: Jun 2003
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In the style manager, in the header template, is:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

So far, so good. It works somewhat - the header file (on my server as /forum/kl_templates/header.php is indeed included.) The problem is that there are images in the header which are referenced as (example):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

These images cannot be located. It seems that this variable is not available?

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 23 Jun 2008 at 03:19 ---------------

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?

Last edited by StephenKay; 23 Jun 2008 at 03:19. Reason: Auto-Merged DoublePost
Reply With Quote
  #2  
Old 23 Jun 2008, 04:04
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Try this in your plugin.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then use the same code in your template.
Reply With Quote
  #3  
Old 23 Jun 2008, 05:53
StephenKay StephenKay is offline
 
Join Date: Jun 2003
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #4  
Old 23 Jun 2008, 08:27
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #5  
Old 23 Jun 2008, 10:06
StephenKay StephenKay is offline
 
Join Date: Jun 2003
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....
Reply With Quote
  #6  
Old 23 Jun 2008, 14:35
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Does "$stylevar" actually appear when you view the source? Try:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #7  
Old 23 Jun 2008, 16:31
Opserty Opserty is offline
 
Join Date: Apr 2007
Try the global_setup_complete hook and see if you get any errors or anything.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 13:53.

Layout Options | Width: Wide Color: