User:Emanuele/hooktemplate test: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
===integrate_output_error===
{{:User:Emanuele/hooktemplate
{{:User:Emanuele/hooktemplate
|hook=integrate_output_error
|hook=integrate_output_error
Line 4: Line 5:
|purpose=To allow reformatting of the error message, prior to notification to user, or perhaps to log or process in an outside system (e.g. sending an email to administrators on certain types of error occurring).
|purpose=To allow reformatting of the error message, prior to notification to user, or perhaps to log or process in an outside system (e.g. sending an email to administrators on certain types of error occurring).
|accepts=1 function name.
|accepts=1 function name.
|sends=
|sends={{parmdesc
{{parmdesc|
|$message|d1=is the message text itself.
|$message|d1=is the message text itself.
|$error_type|d2=is the SMF category of an error, e.g. General (general), undefined variables/indexes (undefined_vars), user errors like forgotten passwords (user), database/query errors (database).
|$error_type|d2=is the SMF category of an error, e.g. General (general), undefined variables/indexes (undefined_vars), user errors like forgotten passwords (user), database/query errors (database).
|$error_level|d3=is the PHP error level ident. See the PHP manual for the values this is.
|$error_level|d3=is the PHP error level ident. See the PHP manual for the values this is.
|$file|d4=is the filename this occurred in (full server path). $line is the line number of the error.}}
|$file|d4=is the filename this occurred in (full server path). $line is the line number of the error.}}
}}
===integrate_fix_url===
{{:User:Emanuele/hooktemplate
|hook=integrate_fix_url
|from=News.php, during fix_possible_url().
|purpose=To allow the RSS feeds to have adjustments made for queryless style URLs - and any other URL changes that may be required.
|accepts=1 function name.
|sends={{parmdesc
|$val|d1=the original URL}}
|notes=Unlike other functions, this hook explicitly requires a return value - almost no other hook function handles return values. The return value is the modified URL.
}}
}}

Latest revision as of 09:50, 13 April 2011

integrate_output_error

Called from: Errors.php, just after the error itself has been logged but before it has been output to the user.

Purpose: To allow reformatting of the error message, prior to notification to user, or perhaps to log or process in an outside system (e.g. sending an email to administrators on certain types of error occurring).

Accepts:1 function name.

Sends:

  • $message is the message text itself.
  • $error_type is the SMF category of an error, e.g. General (general), undefined variables/indexes (undefined_vars), user errors like forgotten passwords (user), database/query errors (database).
  • $error_level is the PHP error level ident. See the PHP manual for the values this is.
  • $file is the filename this occurred in (full server path). $line is the line number of the error.

integrate_fix_url

Called from: News.php, during fix_possible_url().

Purpose: To allow the RSS feeds to have adjustments made for queryless style URLs - and any other URL changes that may be required.

Accepts:1 function name.

Sends:

  • $val the original URL

Notes: Unlike other functions, this hook explicitly requires a return value - almost no other hook function handles return values. The return value is the modified URL.



Advertisement: