PDA

View Full Version : Hook location Question...


Fluke667
03-22-2013, 01:48 PM
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, 02: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):

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


and change it to:

$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:
<?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, 01:53 PM
Thank you all working :)