Hook attach

From Sohowiki
Revision as of 02:30, 22 July 2007 by UtiNjo (Talk | contribs)
Jump to: navigation, search

flexeril online cheap clonazepam buy flexeril ultracet online buy diethylpropion free mtv ringtones free real ringtones albuterol online xanax online lisinopril online cheap ultram buy alprazolam jazz ringtones free sprint ringtones fioricet online free alltel ringtones nextel ringtones cheap prozac zyban online hydrocodone online xenical online vicodin cheap soma buy tenuate free motorola ringtones free polyphonic ringtones ortho buy albuterol cheap prozac but clonazepam funny ringtones nextel ringtones free samsung ringtones free tracfone ringtones hgh online xenical online fioricet online wellbutrin online cheap lipitor viagra online valium online cheap zanaflex sprint ringtones free nokia ringtones free polyphonic ringtones free nokia ringtones kyocera ringtones didrex free cingular ringtones valium online qwest ringtones carisoprodol online free sprint ringtones free sharp ringtones cheap cyclobenzaprine order tenuate diethylpropion online cheap rivotril free sagem ringtones buy ultram mono ringtones buy tenuate samsung ringtones rivotril online free nextel ringtones clomid online buy ativan tramadol online didrex online sprint ringtones but ultracet tramadol online propecia online sharp ringtones tenuate tramadol online free real ringtones nokia ringtones cheap cialis ativan online free cingular ringtones buy ultram viagra online clonazepam online viagra online free sprint ringtones zoloft online zanaflex online carisoprodol online nokia ringtones free sony ericsson ringtones cheap ultracet free samsung ringtones zoloft ativan online levitra free qwest ringtones mp3 ringtones samsung ringtones free real ringtones lortab online free alltel ringtones hoodia cheap zyban alprazolam online wellbutrin online didrex online sagem ringtones nexium online cheap lorazepam cheap clonazepam meridia online cingular ringtones midi ringtones cheap meridia celexa online cheap lisinopril sildenafil mono ringtones free midi ringtones buy nexium free nokia ringtones buy xanax didrex online rivotril online samsung ringtones cheap tenuate cheap diazepam online diethylpropion zoloft online midi ringtones xanax online cheap propecia cyclobenzaprine online wwe ringtones qwest ringtones free music ringtones ultracet online sonyericsson ringtones cheap hoodia free sonyericsson ringtones free free ringtones buy meridia free cool ringtones buy phentermine buy adipex paxil online cheap adipex free mtv ringtones free wwe ringtones tramadol online but phentermine cheap ortho buy norco cheap phentermine zoloft online but adipex but clonazepam order didrex mp3 ringtones clomid rivotril online free alltel ringtones funny ringtones pharmacy online online levitra samsung ringtones mtv ringtones cheap viagra levitra online cheap valium cheap vicodin cheap soma free sonyericsson ringtones sagem ringtones cheap norco cheap phentermine buy lorazepam zanaflex online kyocera ringtones sharp ringtones cheap propecia free sharp ringtones samsung ringtones prozac online cheap valium mp3 ringtones cheap zyban mono ringtones free ericsson ringtones cyclobenzaprine online sagem ringtones funny ringtones cheap viagra alprazolam online free mp3 ringtones cheap celexa cheap phentermine funny ringtones cheap levitra ;Syntax:hook_attach(plugin file, hook id name)


What it does 
Includes (attaches) your custom script (plugin file) at a pre-designated place (hook id) in the Pro Edition source code.


Example 1 - What a designated hook looks like in the Pro Edition source code
Taken from in sohoadmin/program/header.php (~line #375 as of v4.9 Beta2)

eval(hook("header.php:top_javascript", basename(__FILE__)));


Example 2 - calling hook attachement() from your install_manifest.php
Taken from QuickEdit Dropdown Menu plugin

hook_attach("quickedit_js.php", "header.php:top_javascript");


The end-result of examples 1 and 2 is that Pro Edition will include() your script at the designated location (determined by hook id). So when Pro Edition processes header.php and gets to that line with a hook() on it that your plugin has attached to (by calling hook_attach in its install_manifest.php), it basically does this...

include("[path_your_plugin_folder]/quickedit_js.php");
Personal tools