User:Emanuele/hooktemplate test From Online Manual

< User:Emanuele
Revision as of 09:50, 13 April 2011 by Emanuele (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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: