.\n"); exit; } } function smf2_init($config) { smf2_bootstrap($config); require_once __DIR__ . '/BridgeSMF2.php'; return new BridgeSMF2(); } function smf2_session($config) { smf2_bootstrap($config); $user = smf_ssi('welcome', NULL); return (empty($user['is_guest']) && !empty($user['username'])) ? $user['username'] : FALSE; } function smf_ssi($function) { $args = func_get_args(); array_shift($args); ob_start(); $result = call_user_func_array("ssi_$function", $args); file_put_contents('php://stderr', ob_get_clean()); return $result; }