Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Jul 2012, 21:38
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
function to include code on templates

Hi i'm trying to make a function for editing templates this is what i make

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

but it doesn't work it seems that "$vbulletin->templatecache[''.$template_name] .= $include;" doesn't work in a function.. where am i wrong :S

--------------- Added 28 Jul 2012 at 19:20 ---------------

The variable $vbulletin->templatecache['.....'] isn't working in a function! Why?
Reply With Quote
  #2  
Old 29 Jul 2012, 19:43
Badshah93's Avatar
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Real name: Aayush Agrawal
globalize $vbulletin inside a function.


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

Reply With Quote
  #3  
Old 01 Aug 2012, 11:41
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Also, isn't $vbulletin->templatecache[''.$template_name] the same thing as $vbulletin->templatecache[$template_name]? X3 Why prepend an empty string literal to it?
Reply With Quote
  #4  
Old 01 Aug 2012, 12:04
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
That was a test, because in '' i should put prefix of template however thanks the code works $vbulletin isn't a variable declared on the function so i have to globalize it
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 15:56.

Layout Options | Width: Wide Color: