технарь
Профессионал
Сообщений: 1825
Регистрация: 12.2011
|
Internal functions
integrate_buffer
Called from: Subs.php, during obExit, used to add functions to be run on the content prior to it being sent to the user, in the spirit of last-minute widespread content changes.
Purpose: To allow you to modify the content globally before sending to the user, for example SimpleSEF uses this hook to actually replace links.
Accepts: 1 function name.
Sends: $buffer, a string representing the page as a whole.
Unlike other functions, this hook explicitly requires a return value - not all other hook functions handle return values. The return value is the buffer contents.
integrate_exit
Called from: Subs.php, during obExit, used when finally leaving the theme system either in the event of normal execution or fatal errors (i.e. any time a full page is generated that isn't a redirect/attachment)
Purpose: To allow you to do final shutdown on external apps, close connections, free resources. Can also be used with portals or other output handling functions.
Accepts: 1 function name.
Sends: boolean value whether the footer should be output (i.e. footer should be done and not in wireless template)
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
integrate_magic_quotes
This one isn't actually a function, it's a setting that's relevant. PHP's idea of magic quoting is one of the most irritating ideas it has ever had, to attempt to automatically be able to quote values that are incoming from userland. Unfortunately its behavior is somewhat unpredictable and therefore unreliable.
In the process of sanitizing $_GET, SMF does its own clean-up of magic quotes, handling the various types that may be incoming, but other systems do not do this and rely on default PHP behavior. This setting overrides SMF's behavior and returns it to the default.
integrate_redirect
Called from: Subs.php, during redirectexit(), immediately prior to physically issuing redirect headers.
Purpose: To allow code to modify the destination or duration before redirect, potentially of any redirect issued in the forum.
Accepts: 1 function name.
Sends: $setLocation, $refresh
$setLocation - the final URL it should redirect to, as a full URL.
$refresh - boolean, whether to send a Refresh header, or more preferably a Location header. |