vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Hooks Manager v2 (https://vborg.vbsupport.ru/showthread.php?t=82785)

Andreas 06-10-2005 03:31 AM

If there was an easy solution, there would have been an automatic patch system since ages I guess :)

Zero Tolerance 06-10-2005 03:43 AM

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

Brent H 06-10-2005 03:56 AM

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 :)

zetetic 06-10-2005 04:07 AM

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?

Zero Tolerance 06-10-2005 04:15 AM

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

Erwin 06-10-2005 04:26 AM

Whatever the problems with this, it's a good idea. :)

spooler 06-10-2005 10:46 AM

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 :D

Svenna 06-11-2005 02:02 PM

nice job :nervous:

Zero Tolerance 06-12-2005 09:15 PM

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

Zero Tolerance 06-12-2005 11:52 PM

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


All times are GMT. The time now is 12:53 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.01099 seconds
  • Memory Usage 1,734KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete