The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Replacement variable in plugin?
I have found a cool little mini script, and have got it running by uploading a file to server and creating a variable replacement but I would like to turn it into a plugin,
I know how to call a template so the file upload is no longer needed but I wish to know (if its possible) how to code/call a Replacement variable within a plugin so all thats needed is to import the plugin.xml file and your done.... I want to change: Code:
alt=" Code:
mycode="" alt=" |
#2
|
|||
|
|||
Bump
I cant just use alt=" as a hook as my code need to go behind |
#3
|
||||
|
||||
Yeah you can. If you use str_replace, it will replace the instance of alt. So, if you put the word to replace is "alt=" and the word to replace it with is "mycode=whatever alt=" then it should be how you want it.
|
#4
|
|||
|
|||
Mmmm ok that make sense so how do I call it for all templates?
I currently only know how for 1 template Code:
<![CDATA[$hot = 'alt="'; $vbulletin->templatecache['headinclude'] = str_replace($hot,$hot.fetch_template('hot_replace'),$vbulletin->templatecache['headinclude']);]]> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|