|
@@ -883,7 +883,10 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
|
|
|
$temp_bbc = $bbc_codes;
|
|
|
$bbc_codes = array();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ // Allow mods access before entering the main parse_bbc loop
|
|
|
+ call_integration_hook('integrate_pre_parsebbc', array(&$message, &$smileys, &$cache_id, &$parse_tags));
|
|
|
+
|
|
|
// Sift out the bbc for a performance improvement.
|
|
|
if (empty($bbc_codes) || $message === false || !empty($parse_tags))
|
|
|
{
|
|
@@ -2388,6 +2391,9 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
|
|
|
// Cleanup whitespace.
|
|
|
$message = strtr($message, array(' ' => ' ', "\r" => '', "\n" => '<br />', '<br /> ' => '<br /> ', ' ' => "\n"));
|
|
|
|
|
|
+ // Allow mods access to what parse_bbc created
|
|
|
+ call_integration_hook('integrate_post_parsebbc', array(&$message, &$smileys, &$cache_id, &$parse_tags));
|
|
|
+
|
|
|
// Cache the output if it took some time...
|
|
|
if (isset($cache_key, $cache_t) && array_sum(explode(' ', microtime())) - array_sum(explode(' ', $cache_t)) > 0.05)
|
|
|
cache_put_data($cache_key, $message, 240);
|