vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Easy Plugin developement (https://vborg.vbsupport.ru/showthread.php?t=97331)

Andreas 10-01-2005 10:00 PM

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
PHP Code:

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

Replace that with
PHP Code:

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!

Marco van Herwaarden 10-02-2005 06:16 AM

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.

Brad 10-03-2005 08:00 AM

I like it, many thanks Kirby.

akanevsky 10-10-2005 10:04 PM

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

Andreas 10-10-2005 10:05 PM

I don't understand the question ...

akanevsky 10-10-2005 10:08 PM

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

Andreas 10-10-2005 10:16 PM

Yes. What else should be there?

Paul M 10-10-2005 10:24 PM

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.

akanevsky 10-28-2005 11:38 PM

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


All times are GMT. The time now is 10:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01220 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete