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)

eXtremeTim 06-13-2005 12:34 AM

I can honestly say that what me and zt have been talking about sounds amazing. I know all my hacks will use this system to avoid file edits.

Dream 06-13-2005 12:42 AM

this is creepy, but ill test it out, running a test forum anyway

eXtremeTim 06-13-2005 02:39 AM

wait till you see the next version. ;)

Zero Tolerance 06-13-2005 04:54 AM

v2 released, this is what eXtremeTim gave me the idea about and was excited about :p

Quote:

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!.
Enjoy :)

- Zero Tolerance

eXtremeTim 06-14-2005 03:49 PM

I can tell you this so far this hack looks great.

Frenck 06-17-2005 09:44 AM

The button 'Show File Contents' seems not to work in firefox.


A second one.... I want to add a hook in includes/class_bbcode.php

PHP Code:

        function handle_bbcode_code($code)
        {

                
//  THIS IS THE PLACE WHERE I WANT A HOOK....


                
global $vbulletin$vbphrase$stylevar$show;

                
// remove unnecessary line breaks and escaped quotes
                
$code str_replace(array('<br>''<br />''\\"'), array('''''"'), $code);

                
$code $this->strip_front_back_whitespace($code1);

                
// fetch height of block element
                
$blockheight $this->fetch_block_height($code);

                
$template $this->printthread 'bbcode_code_printthread' 'bbcode_code';
                eval(
'$html = "' fetch_template($template) . '";');
                return 
$html;
        } 

How to create one with your plugin? I can't specify only '{' as the line to add the hook below, how to do this nicely?

May you have to expand your option to put a hook not online above or below a specified php line, but maybe also 2, 3, 4, 5 lines above or below...

FASherman 06-17-2005 03:13 PM

After some long thought on this, I'd like to make a proposal to all the entire vb.com community to make allour lives easier.

1. Only hacks that require changes to sql queries should be hacks.

2. Take THIS hack and place it in a seperate forum calls "Add-on Hooks". When a someone codes a hack that can't use a standard hook, they add an add-on hook into this forum. Then they can release their hack as a plug-in. One the add-on hook is released, it can be used by anyone. It becomes an unoffical extension of VB.

3. In the description for plugins, add an additional 2 fields:
Requires add-on hook (y/n)
ThreadID of Add-on Hook.

4. The folsk at VB.Com now have a way to see how many plugins use these add-on hooks. If we have an add-on hook that is used by 20 or more hacks, they know that it should be incorporated into the next release. As they do so, then that add-on hook can be removed from the forum and the hacks updated as full-plugin without add-on hooks.

5. For those of us with hacked boards, all it means is that we have to reinstall our hooks, not the entire hack.

Comments/questions/concerns?

Ron1n 06-17-2005 10:21 PM

i am in love - this hack is great

macooper 06-27-2005 06:31 AM

Hi,
I'm not sure how well this would work, but when patching the linux kernel, they use something called context diffs. Could this be adapted for this mod ?

The idea is that when you add a new hook, your system would take say 10 lines of code before and 10 lines after the hook location. When an upgrade is performed, any hooks in code that has not changed would be easily detected. However, if the 10 lines above / below the code have changed, then you would know that the hook needed redoing manually.

On applying the hooks to an upgraded board, you could then generate a list of failed patches that would need to be added manually. Not perfect, I know, but it would pick up the majority of failed hooks.

Martin

thermz 08-13-2005 12:40 PM

Wow, exceeded yourself again.


All times are GMT. The time now is 07:57 AM.

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.03378 seconds
  • Memory Usage 1,748KB
  • 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_php_printable
  • (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