diff --git a/refs/SpecialSub b/refs/SpecialSub index fbc9072..811fd43 100644 --- a/refs/SpecialSub +++ b/refs/SpecialSub @@ -10,109 +10,131 @@ __END__ __NAME__ description + The directive specifies &PERL; subroutines that should be called to -handle certain events. +handle certain events. The available events are described below. + + +Request (<literal>request_init</literal>) + +Event triggered on every request, right after catalog +selection and before &glos-session; assignment. + + + +Request (<literal>admin_init</literal>) + +Event triggered on every request for users with administrator privileges, +request, after initialization of embedded Perl objects. This allows +&glos-catalog; subroutines to be specified as request handlers and have +properly initialized &glos-session; variables by the time they run. + + + +Debug Qualify (<literal>debug_qualify</literal>) + +Event triggered to determine whether &glos-debug; mode should be +enabled for the incoming client connection. Have in mind that simple, +host-based decision can be made by using the &conf-DebugHost; +configuration directive. The debug_qualify +specialSub is invoked only if &conf-DebugHost; is either undefined, +or the client host is found in the &conf-DebugHost; list. +See &glos-debug; glossary entry for a complete discussion. + + + +Flypage (<literal>flypage</literal>) + +Event triggered for determining the result set for the flypage. + + + + +Credit Card Type (<literal>guess_cc_type</literal>) + +Event triggered at the time +of deriving credit card type, &var-MV_CREDIT_CARD_TYPE;. +&IC; already recognizes +major credit card types but local areas might require you to +write custom recognition code. +The subroutine is called with the credit card number. +A &glos-true; return value should contain the recognized credit card +type name. +A &glos-false; value indicates that the number recognition did not +suceed, and that &IC; should proceed with its built-in detection +algorithm. + + + +Session Creation (<literal>init_session</literal>) + +Event triggered at new &glos-session; creation time. +The subroutine is called with the pointer to the newly created +&glos-session; variables space. Subroutine return value is not used. + + + +Lockout (<literal>lockout</literal>) + +Event triggered for locking out a bad web spider or misbehaving +client (see &conf-RobotLimit;). The subroutine is called without +parameters and is expected to perform all the necessary custom +steps. It should exit with an appropriate return value to signal +how the rest of the process should be handled. + + +A &glos-true; return value indicates that no more handling is +needed. A &glos-false; value indicates that &IC; should continue +and execute the default, built-in action lockout action, which +is specified by the &conf-LockoutCommand; config directive. + + + + +Missing page (<literal>missing</literal>) + +Event triggered when a requested &IC; page is missing. +The subroutine is called with the name of the missing page +and is expected to perform all the necessary custom handling. +It should exit with an appropriate return value to signal +how the rest of the process should be handled. -The available events are: - - - - request_init — - event triggered on every request, right after catalog - selection and before &glos-session; assignment. - - - admin_init — - for users with administrator privileges, event triggered on every - request, after initialization of - embedded Perl objects. This allows &glos-catalog; subroutines to - be specified as request handlers and have properly initialized - &glos-session; variables by the time they run. - - - debug_qualify — - event triggered to determine whether &glos-debug; mode should be - enabled for the incoming client connection. Have in mind that simple, - host-based decision can be made by using the &conf-DebugHost; - configuration directive. The debug_qualify - specialSub is invoked only if &conf-DebugHost; is either undefined, - or the client host is found in the &conf-DebugHost; list. - See &glos-debug; glossary entry for a complete discussion. - - - flypage — - event triggered for determining the result set for the flypage. - - - - guess_cc_type — - event triggered at the time - of deriving credit card type, &var-MV_CREDIT_CARD_TYPE;. - &IC; already recognizes - major credit card types but local areas might require you to - write custom recognition code. - The subroutine is called with the credit card number. - A &glos-true; return value should contain the recognized credit card - type name. - A &glos-false; value indicates that the number recognition did not - suceed, and that &IC; should proceed with its built-in detection - algorithm. - - - init_session — - event triggered at new &glos-session; creation time. - The subroutine is called with the pointer to the newly created - &glos-session; variables space. Subroutine return value is not used. - - - lockout — - event triggered for locking out a bad web spider or misbehaving - client (see &conf-RobotLimit;). The subroutine is called without - parameters and is expected to perform all the necessary custom - steps. It should exit with an appropriate return value to signal - how the rest of the process should be handled. - A &glos-true; return value indicates that no more handling is - needed. A &glos-false; value indicates that &IC; should continue - and execute the default, built-in action lockout action, which - is specified by the &conf-LockoutCommand; config directive. - - - - missing — - event triggered when a requested &IC; page is missing. - The subroutine is called with the name of the missing page - and is expected to perform all the necessary custom handling. - It should exit with an appropriate return value to signal - how the rest of the process should be handled. - A &glos-true; return - value will indicates that all actions (including the response to the client) - have been performed by your function and no more handling is needed. - You can also return an array, (1, PAGENAME), where - PAGENAME is the page to be displayed to the user. - A &glos-false; return value indicates that &IC; should continue - and execute the default, built-in action, which - is displaying a page specified by "&conf-SpecialPage; - missing". - - - shipping_callout — - event is triggered after shipping calculation, but before result is +A &glos-true; return +value will indicates that all actions (including the response to the client) +have been performed by your function and no more handling is needed. +You can also return an array, (1, PAGENAME), where +PAGENAME is the page to be displayed to the user. + +A &glos-false; return value indicates that &IC; should continue +and execute the default, built-in action, which +is displaying a page specified by "&conf-SpecialPage; +missing". + + + +Shipping calculation (<literal>shipping_callout</literal>) + +Event is triggered after shipping calculation, but before result is formatted and returned. - + + It's useful for the type of customization that would require modifying too many shipping table entries or using entirely custom shipping code, because it allows you to build on the powerful shipping features interchange already has. - - - weight_callout — - event is triggered after weight is processed for shipping calculation. - + + + +Weight calculation (<literal>weight_callout</literal>) + +Event is triggered after weight is processed for shipping calculation. + The subroutine is called with the weight as parameter and expects the modified weight as return value. - -It does not affect other calculations, such as done by the weight usertag. - - + +It does not affect other calculations, such as done by the weight +usertag. + + __END__ __NAME__ notes