1) { unset($function_args[0]); } // Attempt to check if this function prints anything ob_start(); $func = call_user_func_array($function, $function_args); $content = ob_get_clean(); // If it does not print return the function results if (empty($content)) { return $func; } return $content; } // Render breadcrumbs template if (!function_exists("render_breadcrumbs")) { function render_breadcrumbs($key = 'default') { $breadcrumbs = BreadCrumbs::getInstance($key); $html = "
    \n"; foreach ($breadcrumbs->toArray() as $crumb) { $html .= "
  1. "; $html .= ($crumb['link']) ? "".$crumb['title']."" : $crumb['title']; $html .= "
  2. \n"; } $html .= "
\n"; return $html; } } if (!function_exists('render_favicons')) { function render_favicons($folder = '') { $folder = ($folder == '' ? IMAGES.'favicons/' : $folder); $html = ''; // Generator - https://realfavicongenerator.net/ if (is_dir($folder)) { $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; } return $html; } } if (!function_exists('render_user_tags')) { /** * The callback function for fusion_parse_user() * * @param string $m The message * @param string $tooltip The tooltip string * * @return string */ function render_user_tags($m, $tooltip) { $locale = fusion_get_locale(); add_to_jquery("$('[data-toggle=\"user-tooltip\"]').popover();"); $user = preg_replace('/[^A-Za-z0-9\-]/', '', $m[0]); $user = str_replace('@', '', $user); $result = dbquery("SELECT user_id, user_name, user_level, user_status, user_avatar FROM ".DB_USERS." WHERE (user_name=:user_00 OR user_name=:user_01 OR user_name=:user_02 OR user_name=:user_03) AND user_status='0' LIMIT 1 ", [ ':user_00' => $user, ':user_01' => ucwords($user), ':user_02' => strtoupper($user), ':user_03' => strtolower($user) ]); if (dbrows($result) > 0) { $data = dbarray($result); $avatar = !empty($data['user_avatar']) ? "
".display_avatar($data, '50px', '', FALSE, '')."
" : ''; $title = "
".$avatar."
".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."
".getuserlevel($data['user_level'])."
"; $content = $tooltip."".$locale['send_message'].""; $html = ''; $html .= "".$m[0].""; $html .= "\n"; return $html; } return $m[0]; } }