The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
plugin or product to delete a part of code of templates?
i want to make my forum as fast as i can, so i would like to make a plugin to delete some parts of templates... does exists a way to do this?
imagine that in forumrules template i want to remove automatically the line <h4 class="blockhead">{vb:rawphrase posting_rules}</h4> this is because i have too many templates to manually edits them, if i could delete this line for example with a plugin i would save time any help is appreciated |
#2
|
|||
|
|||
Streamline queries.
However in a more humorous light, could you imagen if you had a bot that would look at your templates and edit out whatever you told it to. That would be sort of cool until you realize that it's only paying attention to class= and deleting all the text associated with it in every template. You would find your forum in shambles in no time at all. We on the other hand would find you in a corner sucking your thumb babbling incoherently something about you should have done it yourself. |
#3
|
||||
|
||||
A few things...
Are you trying to speed up page generation, or page download/rendering? Deleting random bits from templates will help with the latter only. If you have a ton of forums, or lots of stuff on your pages, then it totally makes sense to start stripping things out. However, doing it automatically takes a bit longer to prepare, so there isn't really any time saved - unless you plan on doing this across tons of different websites. You can simply put stuff like in your plugin - PHP Code:
PHP Code:
On our site, we use this method to automate stripping elements out, so we don't have to keep doing it for various styles. Sometimes you can simply force an option or show variable, so exhaust your options first. This will probably cause a ton of confusion for non-devs who try to maintain the site later, so be sure to clearly document the plugin. Having it all centralized at least makes it easy to understand where its coming from. Hope this helps |
#4
|
|||
|
|||
the problem is that vbulletin4 has too much boxes and elements that are not necessary needed, so i want to delete them automatically..
on every vb upgrade, my admincp tell me that i have to revert some templates.. (and in that template i have deleted somethings to make my forum load faster) so i need to revert it and again delete the things i dont want.... and same with each vb upgrade.. i think this way (to delete automatically what i dont need) is the best way to avoid this constant edition every time i upgrade vb.. thanks |
#5
|
|||
|
|||
i have written this on the plugin:
Code:
$vbulletin->templatecache['newthread'] = str_replace( '{vb:raw forumrules}', '', $vbulletin->templatecache['newthread'] ); but it doesnt work all what i want is to delete that part from the newthread template |
#6
|
||||
|
||||
You need to find/replace compiled code. If the enter the following, you can see what the compiled code looks like:
PHP Code:
PHP Code:
PHP Code:
|
#7
|
|||
|
|||
Quote:
--------------- Added [DATE]1312832742[/DATE] at [TIME]1312832742[/TIME] --------------- Quote:
i have put that code in a new plugin but forumrules are being shown |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|