Gossamer Forum
Quote Reply
Exploring hooks...
I'm just having a play with hooks. I set up a PRE hook via Install.pm...but I can't work out how you tell the script what sub to run for the hook.... I had a look at the SearchCache readme thing, on how to make that plugin....but I can't see where you deifne what sub to call on the hook... does it just run the subs in the .pm file one after the other?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Exploring hooks... In reply to
>>
I set up a PRE hook via Install.pm
<<

How?....if you did it properly it should register what routine to run.

Last edited by:

Paul: Aug 12, 2002, 3:42 PM
Quote Reply
Re: [Paul] Exploring hooks... In reply to
Ahhh...I think I get it now :) So when you assign a hook, like;

$mgr->install_hooks ( 'Duplicate_Check', [ ['add_link', 'PRE', 'Plugins::Duplicate_Check::xxxx', 'FIRST'] ]);

Then the xxxx is the function being called? God...I should have worked this out yesterday....it was obviously too late to be working Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!