Adding or Editing a Plugin 
To add a plugin, navigate to Plugin System > Add New Plugin. This will take you to the Add New Plugin form.

Add Plugin

The fields on the Add New Plugin form are all required for successful plugin operation. Each field is described here:
ProductUse the Product field to attach this plugin to a product. This allows plugins to be grouped together and exported and installed as part of a product package through the product manager.
Hook LocationThe hook location specifies where in the vBulletin system your plugin code should be executed.

To work out what hook would be appropriate to use, you will need to look through the vBulletin PHP scripts for hook locations, then identify the unique ID of hook you want to use.

In the example illustrated, we are attaching our code to the profile_updateprofile hook, which can be found in profile.php with this line:

($hook = vBulletinHook::fetch_hook('profile_updateprofile')) ? eval($hook) : false;
TitleUse the title field to give your plugin a meaningful name to help you identify it at a later date.
Plugin PHP CodeUse this box to enter the PHP code you want to be executed at the specified hook location. Remember that the code runs in the context and scope of the hook line itself.

For more information about writing plugin code, there is a section of this manual dedicated to this subject.
Warning:
Plugin code must be valid PHP or errors will ensue.
Plugin is ActiveYou can use this control to disable an individual plugin without removing the code. This can be helpful in debugging.
Copyright © 2024 MH Sub I, LLC dba vBulletin. All rights reserved. vBulletin® is a registered trademark of MH Sub I, LLC dba vBulletin.