/** * Buffer the fragment output */ function buffer_output($name, $data, $view, $key, $params = array()) { global $Core; static $buffer = array(); if (!array_key_exists($key, $buffer)) { $fragment = ACTIVE_SKIN_DIR . "fragments/{$name}/{$view}.php"; $functions = ACTIVE_SKIN_DIR . "fragments/{$name}/functions.php"; if (!file_exists($fragment)) { return null; } ob_start(); if (file_exists($functions)) { require_once $functions; } require $fragment; $buffer[$key] = ob_get_contents(); ob_end_clean(); if (function_exists('plgBBCoder')) { $buffer[$key] = plgBBCoder($buffer[$key]); } } return $buffer[$key]; }
/** * */ function fragment_buffer($name, $data, $view) { global $Core; $fragment = ACTIVE_SKIN_DIR . "fragments/{$name}/{$view}.php"; $functions = ACTIVE_SKIN_DIR . "fragments/{$name}/functions.php"; if (!file_exists($fragment)) { return null; } ob_start(); if (file_exists($functions)) { require_once $functions; } require $fragment; $buffer = ob_get_contents(); ob_end_clean(); if (function_exists('plgBBCoder')) { $buffer = plgBBCoder($buffer); } return $buffer; }