What do the PRE|POST and FIRST|LAST qualifiers mean when installing a hook? Do these have anything to do with the parameters passed in or returned? What gets passed into the subroutines? Does anyone have some simple plugin examples to help someone get started?
Aug 24, 2005, 2:53 AM
Veteran / Moderator (17297 posts)
Aug 24, 2005, 2:53 AM
Post #2 of 5
Views: 929
Hi,
PRE = before the "routine" (i.e at the start)
POST = before the end of "routine" (i.e at the end)
These are useful for using multiple hooks in one plugin;
FIRST = first plugin hook called
LAST = Last hook called
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
PRE = before the "routine" (i.e at the start)
POST = before the end of "routine" (i.e at the end)
These are useful for using multiple hooks in one plugin;
FIRST = first plugin hook called
LAST = Last hook called
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Andy
That does help. Can you shed some light on the parameters passed in and out? I looked at some other people plugins and am not sure what is getting passed in with @_. Also, are there any rules for returns? Overall I'm just trying to figure out how to incorporate my own functions, how to make them interact with others actions, what gets passed in and what needs to be passed back out. Now these may be dumb questions but without any documentation it's hard to know.
That does help. Can you shed some light on the parameters passed in and out? I looked at some other people plugins and am not sure what is getting passed in with @_. Also, are there any rules for returns? Overall I'm just trying to figure out how to incorporate my own functions, how to make them interact with others actions, what gets passed in and what needs to be passed back out. Now these may be dumb questions but without any documentation it's hard to know.
Aug 24, 2005, 7:36 AM
Veteran / Moderator (17297 posts)
Aug 24, 2005, 7:36 AM
Post #4 of 5
Views: 918
Hi,
No problem.
The params passed in can vary, depending on where using. The best way to find them out, is with a global, such as;
my @args = shift;
use Data::Dumper;
return Dumper(@args);
}
This would return back the paramaters passed into the global.
Hope that helps :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
No problem.
The params passed in can vary, depending on where using. The best way to find them out, is with a global, such as;
Code:
sub { my @args = shift;
use Data::Dumper;
return Dumper(@args);
}
This would return back the paramaters passed into the global.
Hope that helps :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

