The fields on the Add New Product form are all required for successful plugin operation. Each field is described here:
|Product||Use 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 Location||The 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;
|Title||Use the title field to give your plugin a meaningful name to help you identify it at a later date.|
|Execution Order||This field allows the execution order to be defined when multiple hooks are to be executed. A hook with a lower execution number will be executed first.|
|Plugin PHP Code||Use 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.
Plugin code must be valid PHP or errors will ensue.
|Plugin is Active||You can use this control to disable an individual plugin without removing the code. This can be helpful in debugging.|