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
  #12  
Old 06-10-2005, 03:31 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If there was an easy solution, there would have been an automatic patch system since ages I guess
Reply With Quote
  #13  
Old 06-10-2005, 03:43 AM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, i have an idea, which is not flawless, however not as flawed as the line number. Have an area to input code, then choose to place the hook before/after the code, ofcourse the code may be changed in the future, so being very specific instead of inserting a huge lump of code would improve the ratio of succession, and if it was only the line number changed, it won't matter.

- Zero Tolerance
Reply With Quote
  #14  
Old 06-10-2005, 03:56 AM
Brent H's Avatar
Brent H Brent H is offline
 
Join Date: Sep 2004
Location: Phoenix, AZ
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not have it show the contents of the PHP file, and a radio button next to each line. You select the line you want, and then chose "Above This Line" or "Below This Line".

Not sure if something like that is possible but hey, it's just an idea
Reply With Quote
  #15  
Old 06-10-2005, 04:07 AM
zetetic's Avatar
zetetic zetetic is offline
 
Join Date: Apr 2004
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm... if you have to open the file to determine where you're going to insert the hook, why not just add it then instead of going back to the ACP?
Reply With Quote
  #16  
Old 06-10-2005, 04:15 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 tmhall
Hmm... if you have to open the file to determine where you're going to insert the hook, why not just add it then instead of going back to the ACP?
You also need to modify vbulletin_hooks.xml or another hook xml file to create a hook location, so when you go to Add A Plugin, you will be able to see the hook location you added

The point of this is to eradicate manualy coding in the hooks.

- Zero Tolerance
Reply With Quote
  #17  
Old 06-10-2005, 04:26 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whatever the problems with this, it's a good idea.
Reply With Quote
  #18  
Old 06-10-2005, 10:46 AM
spooler spooler is offline
 
Join Date: Dec 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really nice idea ZT to manage custom hooks :claps: .

Just a suggestion if u like.

Basically a coder requires 3 things :-
1> To add more code in files
2> To remove existing code
3> To replace existing code

Your hack manages the 1st point very well but most of the mods cant work without 2&3.

If along with custom hooks, you could add custom comments like

/* Zero Tolerance comment

######Existing code here ########

Zero Tolerance comment */

Custom commenting will help remove the existing code.Also to replace the code, a custom hook(with the replaced code) can be placed just above or below the custom comments. Also you can keep track of custom hooks+comments together by parsing the file or just storing the line numbers.

Although this all can be done manually but it will be a more organised approach to manage it with your hack instead of going through file and doing ctrl+f.

More functionalities can be added to it like cleanup file which can remove all custom comments and hook for debugging etc.

Just my thought on the fly
Reply With Quote
  #19  
Old 06-11-2005, 02:02 PM
Svenna Svenna is offline
 
Join Date: May 2005
Location: Hamburg, Germany
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice job :nervous:
Reply With Quote
  #20  
Old 06-12-2005, 09:15 PM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice suggestions spool, however point 2 & 3 may be useful, it is not the point of this modification, which is to create custom hooks, not to change the vB code for modifications, the idea is you have a modification, but the hooks you want do not exist, so you create them using this, so then you can add the plugins to your newly created hook.

Sorry for the delay on v1, i was out shopping o_o (Bad excuse - i know).

Should be completed within the next hour or 2

- Zero Tolerance
Reply With Quote
  #21  
Old 06-12-2005, 11:52 PM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

v1 has been released, look uptop for features, if you used the old version, you must delete all custom hooks you added with the old system before proceeding to upgrade.

- 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 07:21 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.05997 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
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
  • (1)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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