View Single Post
  #2  
Old 20 Dec 2011, 13:17
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I was hoping someone else could answer who might be able to explain better, but...

You need to do a str_replace() (or equivalent) on $vbulletin->templatecache['template_name'], and it has to be at a hook location where the templates have been cached but not rendered yet. Location parse_templates should work. Also, you need to look at the compiled template to see what you can match as the "needle" in str_replace(). It may or may not be the same as you see when you look at the template in the template editor. To see the compiled template, look in the "template" table of the database in the "template" column, or print out the value of $vbulletin->templatecache['template_name'].

So when you've done all that your code could look something like:


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


Note that most compiled templates are actually php code that produces the template html when eval'd, so you could also insert php code into the template is you wanted.
Reply With Quote