Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Jun 2012, 22:39
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Location: Italy
Real name: Andrea Scanu
Problem with inserting a variable into a template

hello i have this code and works great but i have to add "{vb:raw login_panel}" to the header template

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

What i'm trying to do is to put login_panel var on the header template without have to manually add it, so i tried this codes but it doesn't works

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

It says "Parse error: syntax error, unexpected $end in /includes/class_core.php(4633) : eval()'d code on line 69"
someone that could help me? Or has another way to do it?
Reply With Quote
  #2  
Old 27 Jun 2012, 23:26
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I think the problem is that the template cache contains php code, and you're tacking on html and css, which doesn't run as php code of course. Try this:



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

Reply With Quote
  #3  
Old 28 Jun 2012, 09:01
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Location: Italy
Real name: Andrea Scanu
It works great but now i'm trying to add it to the begin of the template
I tred this but doesn't work
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thanks for your great support

Last edited by Scanu; 28 Jun 2012 at 09:44.
Reply With Quote
  #4  
Old 28 Jun 2012, 13:03
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
You can look at the compiled template in the database: the problem is that it starts like this:


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


So that wipes out anything you add to the $final_rendered variable before that. So try this instead:


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

Reply With Quote
  #5  
Old 28 Jun 2012, 13:23
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Location: Italy
Real name: Andrea Scanu
works great thanks
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
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 23:02.

Layout Options | Width: Wide Color: