Helpful Information
 
 
Category: vBulletin 3 Articles
Easy Plugin developement

You are developing Plugins on localhost and don't like the Plugin Manager too much because of it's limited editing capabilites and would rather like to use your favourite editor?

Then you might find the following useful:

1) Create a directory hooks in your includes directory
2) In File class_hook.php find

return $this->pluginlist["$hookname"];


Replace that with

return @file_get_contents(DIR . "/includes/hooks/hook_$hookname.php");


Then write your Plugin Codes as normal Files in directory hooks.
Example: hook_global_start.php for a Plugin on global_start

Note: Don't use <?php and ?>-Tags or your code won't work!

Great work Kirby. Have been walking around with the same idea, but never had time to look into it. Never would have guessed it would only need a 1 line edit.

I like it, many thanks Kirby.

Great idea. Can I have more than one plugin in such file? Or am I supposed to fill those files with regular PHP code?

I don't understand the question ...

What is supposed to be in "hook_$hookname.php"? PHP codes that would otherwise be added into the plugin manager?

Yes. What else should be there?

Presumably you can do this on a remote server as well since I have an editing program that can directly edit remotle ftp files. It would be even better if it only loaded the file contents if it can't find anything in the normal hooks database.

Actually, all this is not required, as vBulletin...
http://www.vbulletin.com/docs/html/optimizing_plugin_memory










privacy (GDPR)