Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hooks Manager v2 Details »»
Hooks Manager v2
Version: 2.0, by Zero Tolerance Zero Tolerance is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.0 Beta 1 Rating:
Released: 06-09-2005 Last Update: 06-12-2005 Installs: 10
DB Changes Uses Plugins
Code Changes  
No support by the author.

Well as the vBulletin are request extra hook locations, i find it very hard that they would be able to forfill everyones request, because if they did the php files would mostly contain hook calls, so to ease the pain of adding you're own hooks manually, i have created this addon, to add/edit/delete your own hooks using the acp!

Features:
  • Adding A Custom Hook
    • Hook Category
    • Hook Name
    • Choose ANY PHP file in your forums directory to place the hook (including sub-fodlers)
    • Insert a line of PHP from the specified file to designate where the hook will be placed
    • Choose to locate the hook above or below the specified line of PHP
    • Will automatically modify your PHP file AND vbulletin_hooks.xml for you.
    • View file contents : Will automatically show the contents of the PHP file, so you can choose where to place the hook.
  • Modifying A Custom Hook
    • Change any details you inputted while creating the custom hook
    • Any plugins assigned to it will be moved to the edited version (if the hook name is changed)
  • Deleting A Custom Hook
    • Removes all file edits for that specific hook
    • Deletes all plugins assigned to that hook location
  • Repairing All Custom Hooks
    • Repairs all custom hooks : This is designed to keep your custom hooks intact, if you accidently overwrite any file with a custom hook or vbulletin_hooks.xml, or if you've just upgraded your vBulletin forum, the repair function will re-insert ALL custom hooks back onto your system, with no manual file modifications required.
  • Export Custom Hook Locations To Auto Installer
    • The custom hooks exporter is aimed at developers, and will automatically create an install file for people to use and run on there server, the intention is that you export custom hook locations for people to install so that your own modification runs off these hook locations. Please ensure that you notify users installing any modifications you provide with a custom hooks export installer to run the custom hooks installer first before proceeding to import any plugins!.
    • Installer Includes: Installer/Uninstaller/Repairer for all custom hook locations exported inside it.


File edits: 3 (admincp/plugin.php & includes/xml/cpnav_vbulletin.xml)
Requirements: CHMOD all php files in your forums directory (including sub folders) to 0666, and includes/xml/hooks_vbulletin.xml to 0666 (Will not function without this done!)


Enjoy

- Zero Tolerance

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-10-2005, 02:51 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whose been busy then I'll be giving this a tryout at some point.

Presumably if you upgrade your vB, you need to add all the custom hooks again - does this keep a record of the ones you have added ?
Reply With Quote
  #3  
Old 06-10-2005, 02:54 AM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Whose been busy then I'll be giving this a tryout at some point.

Presumably if you upgrade your vB, you need to add all the custom hooks again - does this keep a record of the ones you have added ?
The XML file keeps a record of all custom hooks, like the default vB system does, in the next version it will "fully" support other xml files, as vBulletin built in the ability to have multiple hook xml files, however mine doesn't "fully" work with that and relies on the master one given by vB, so i'll ensure it's running through it's own so upgrades shouldn't effect anything, unless a PHP file is re-uploaded, then a hook would need to be re-done, i'll create a lil system for this which will check all the hook calls are in the files, and if not, add them in.

Once that's done really, no one would need to bug vB anymore for hook locations

- Zero Tolerance
Reply With Quote
  #4  
Old 06-10-2005, 03:18 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zero Tolerance
Once that's done really, no one would need to bug vB anymore for hook locations
Hmm .... not really. If you are using custom hooks you must edit the PHP files, if there are standard hooks you can easily upgrade without having to re-apply file modificatiosn.
Reply With Quote
  #5  
Old 06-10-2005, 03:20 AM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
Hmm .... not really. If you are using custom hooks you must edit the PHP files, if there are standard hooks you can easily upgrade without having to re-apply file modificatiosn.
This edits them for you, and the repair system i'm including will correct all custom hook installations if you have just upgraded your vB

- Zero Tolerance
Reply With Quote
  #6  
Old 06-10-2005, 03:22 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, this is like vBHack - a system that automatically alters your PHP files.
Don't like the idea too much ...
Reply With Quote
  #7  
Old 06-10-2005, 03:23 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zero Tolerance
i'll create a lil system for this which will check all the hook calls are in the files, and if not, add them in.
how would it know where to add them - line numbers are bound to change.
Reply With Quote
  #8  
Old 06-10-2005, 03:24 AM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

True, but it's only altering 1 line (for each hook), the only way it could mess up your system was if you inserted a hook onto a line where it should be, like inbetween if() and {, ofcourse you can delete the hook if errors occur (once i get the next release done).

@ Paul - That's upto you to keep things updated, the PHP will change over time, so it would be best to keep the hooks updated and ensure there in a safe place, if there nested inside a lot of code, chances are in the future it would cause problems, but if it's out of the way in a distant area, then the chance is smaller. Unfortunatly there isn't much i can do about this, even if you put in a search term to insert the hook after/below, the PHP again could be changed within the future.

- Zero Tolerance
Reply With Quote
  #9  
Old 06-10-2005, 03:27 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the main problem: line numbers change.
Reply With Quote
  #10  
Old 06-10-2005, 03:28 AM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Link14716
Here's the main problem: line numbers change.
Then feel free to give me an alternate method that would eradicate that problem and not cause any others - i'm all ears =P

- Zero Tolerance
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05988 seconds
  • Memory Usage 2,305KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete