The Arcive of vBulletin Modifications Site. |
|
|
|||||||
Edit Templates On Fly - A step towards easy-to-install modifications Details »»
|
|||||||||||||||||||||||||||
|
Edit Templates On Fly - A step towards easy-to-install modifications
Developer Last Online: Nov 2023
Description:
This will enable modifications writers to edit templates on fly, to make there modifications as easy-to-install as possible. It consists of some functions, which had been written to ease template edits, without any actual editing from the webmasters side, Installation: Just import the XML file as a product. Click install to receive updates and support. Documentation: All functions are declared in the hook init_startup, with Execution Order of 1, to be the first plug-in which is being executed in the whole scripts. Current version contains the following functions:
Restrictions:
Examples:
Notes for coders: Feel free to use those functions in your mods, and please don't forget to add a dependency for this product (edit_templates_onfly). This will guarantee that every user of your mod will install this modification, so your mod will function properly, this mod will be a centralized method to edit templates, a method which is subject to be developed well, so you can't copy those functions in your mods. Your suggestions and participations are welcomed. Change log:
Credits: The first person whom I saw uses this method to edit templates is Zero Tolerance in his vBShout mod, I learned it there. Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
good idea for new functions...
actually you do not need to check function_exists ... there is no such functions in vBulletin anyway... |
|
#3
|
||||
|
||||
|
Installed, waiting for user feedback..
|
|
#4
|
|||
|
|||
|
Will try when I get home.
|
|
#5
|
||||
|
||||
|
Isn't this just basically renaming str_replace? From a deployment standpoint, I'm not sure a prettier function is worth the cost of a dependency. There's really no actual gain.
However, if you were to create a function that utilizies preg_replace (or ereg_replace, respectively) to help simplify the joys of Regex for some of the greener developers, that would probably be more well adopted. I'm not knocking it, I think it's great that someone is taking an initiative. I'm just thinking down the road, as a developer, of possible support quandries that could arise when having to explain to end users about dependencies, etc. |
|
#6
|
|||
|
|||
|
yes, ist nothing other then str_replace
heres i much better method http://www.vbhacks-germany.org/showthread.php?t=5572 |
|
#7
|
|||
|
|||
|
Quote:
oh, and btw, this is not a Mod or a Addon... it's just some functions that would help coders in some situations... please DO NOT INSTALL if you don't know what to do with this... |
|
#8
|
||||
|
||||
|
Does vb.org need a section <em>ad hoc</em> for user function or libraries..?
|
|
#9
|
||||
|
||||
|
Here's an example from one of my modifications using preg_replace in order to make on-the-fly template changes to all templates -- including modified ones:
PHP Code:
HTML Code:
<div>
HTML Code:
<div class="alt1">
PHP Code:
PHP Code:
PHP Code:
|
|
#10
|
|||
|
|||
|
Quote:
its not on the fly, it changes on the hack install, or on your change(you have a field template change in de acp) there you can set a search string and a change string.... like this method here, but not on fly... sorry for the bad english, i hope i helped |
![]() |
|
|