View Full Version : Plugins - how they work
Jon12345
03-27-2012, 01:40 PM
When I add a plugin to my board, do they modify the templates? Is this normally permanent or do they uninstall cleanly?
I'm curious because I like the idea of testing some plugins but not if they are a one way street!
Thanks,
Jon
vbenhancer
03-27-2012, 01:45 PM
plugins are not editing the templates that are stored in the database, they are editing the cached content that will be displayed to the visitor only... so it is safe to use a plugin that add things to the screen.
Jon12345
03-27-2012, 01:48 PM
Are plugins and products the same thing? Newbie questions I know!
vbenhancer
03-27-2012, 02:09 PM
plugins are wrapped into product files... you can have multiple plugins into one product file... the product name identify the bundle...
Jon12345
03-27-2012, 02:15 PM
Ok, that makes sense. So they hierachy is Products>(potneially) multiple plugins
That brings up a rather important question for me. Since the plugins are showing cached content, does that mean when I go to customize a template, the plugin may overide that code and therefore ignoring my modifications or additional html/javascript?
BirdOPrey5
03-27-2012, 02:43 PM
Plugins and templates work together to create the page being viewed. I think of plugins kind of as the "back end" and templates more of the "front end."
If a plugin looks for specific data on a template that it will modify (called an automatic template edit) then editing the template and altering that data could well prevent the plugin from working as intended.
If the plugin relies on a template hook to display data on a template then remove the hook would prevent the plugin from working.
But in most cases editing a template does not affect the plugins.
Jon12345
03-27-2012, 03:19 PM
Great explanation and a big thank you. This helps because I want to edit the register.php page, but I will probably use a plugin so that the DOB/rules/details are all on one page, rather than spread over 3. At least I know that if I test a plugin, it won't permanently alter the register.php template in case I need to revert back.
BirdOPrey5
03-27-2012, 05:16 PM
That's right, you can always disable a plugin and any changes will be undone on the next page load.
On the other hand you can also always "Revert" a template back to the VB stock version thereby undoing any changes made to it as well.
And as a last ditch scenario if somehow you made a plugin preventing you from logging into the admin cp- you can disable all plugins via config.php file as described here:
https://www.vbulletin.com/forum/showthread.php/196688-Disable-the-plugin-hook-system-globally
Jon12345
03-27-2012, 05:22 PM
Good advice - thanks BidOPrey5!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.