vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hook location Question... (https://vborg.vbsupport.ru/showthread.php?t=296398)

Fluke667 03-22-2013 12:48 PM

Hook location Question...
 
I want add this to vb3.8 but...

https://vborg.vbsupport.ru/showthread.php?t=288060


this is for vb4 and vb3.8 have no Hook Location "bbcode_img_match"



Is there any other Hook Location i can use ?

kh99 03-22-2013 01:25 PM

What you could do is edit file includes/class_bbcode.php and add the hook call. You would find this (around line 1993):
Code:

        return '<img src="' .  $link . '" border="0" alt="" />';

and change it to:
Code:

        $retval = '<img src="' .  $link . '" border="0" alt="" />';

        ($hook = vBulletinHook::fetch_hook('bbcode_img_match')) ? eval($hook) : false;

        return $retval;


and then to get that hook to appear in the list of hooks when creating a plugin, you could create a file called includes/xml/hooks_added.xml with this content:
Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<hooks>
        <hooktype type="general">
                <hook>bbcode_img_match</hook>
        </hooktype>
</hooks>


Or alternatively you could just edit includes/bbcode.php and insert the actual mod code instead of a hook call.

Fluke667 03-23-2013 12:53 PM

Thank you all working :)


All times are GMT. The time now is 03:51 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.01553 seconds
  • Memory Usage 1,710KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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