The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello,
As an exercise I wanted to replace edit.gif from a plugin... so I made a plugin with hook location: showthread_complete and did: $vbulletin->templatecache['SHOWTHREAD'] = str_replace('edit.gif', 'mynewimg.gif', $vbulletin->templatecache['SHOWTHREAD']); but it doesn't replace the string... The plug is being called, but its just not replacing the string for some reason.... any help? |
#2
|
||||
|
||||
![]()
Why don't you just physically replace the edit.gif image?
|
#3
|
|||
|
|||
![]()
I'm trying to figure out plugins. Like I said this was an exercise in trying to figure out the hook system.
I don't understand why the replace in this case wouldn't work... its as if edit.gif doesn't exist on the page SHOWTHREAD... maybe I am trying in the wrong template block? Is there another way to do this? The reason I wanted to play with this is to be able to use templates to easily/quickly replace or change various images based on the forum. --------------- Added [DATE]1219561282[/DATE] at [TIME]1219561282[/TIME] --------------- I was also hoping to replace text strings in the same fashion in some places... Some of my forums are articles.... so instead of saying "rate this thread" I wanted it to say rate this article... I just wanted to use a plugin to do the replacement ... just not sure how I can get at the fully completed template... |
#4
|
||||
|
||||
![]()
Have a look at these two articles:
[How-To] Using Plugins for Automatic Template Edits [How-To] Plugins for Template Edits (Adv. Version) |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|