loadPlugin('smarty_function_icon'); $template->loadPlugin('smarty_modifier_sefurl'); $template->loadPlugin('smarty_modifier_escape'); if (! isset($params['help'])) { $params['help'] = ''; } if (! isset($params['admpage'])) { $params['admpage'] = ''; } if (! isset($params['actions'])) { $params['actions'] = ''; } // Set the variable for the HTML title tag $template->smarty->assign('headtitle', $content); $class = ''; $current = current_object(); if (! isset($params['url'])) { if ($current) { $params['url'] = smarty_modifier_sefurl($current['object'], $current['type']); } else { $params['url'] = $_SERVER['REQUEST_URI']; } } $params['url'] = str_replace('"', '', $params['url']); $metadata = ''; $coordinates = $current ? TikiLib::lib('geo')->get_coordinates($current['type'], $current['object']) : null; if ($coordinates) { $class = ' geolocated primary'; $metadata = " data-geo-lat=\"{$coordinates['lat']}\" data-geo-lon=\"{$coordinates['lon']}\""; if (isset($coordinates['zoom'])) { $metadata .= " data-geo-zoom=\"{$coordinates['zoom']}\""; } } $html = '

'; $html .= '' . smarty_modifier_escape($content) . "\n"; if ($template->getTemplateVars('print_page') != 'y') { if ($prefs['feature_help'] == 'y' && $prefs['helpurl'] != '' && $params['help'] != '') { $html .= '' . smarty_function_icon(['name' => 'help'], $template) . "\n"; } if ($prefs['feature_edit_templates'] == 'y' && $tiki_p_edit_templates == 'y' && ($tpl = $template->getTemplateVars('mid'))) { $html .= '' . smarty_function_icon(['name' => 'edit'], $template) . "\n"; } elseif ($prefs['feature_view_tpl'] == 'y' && $tiki_p_view_templates == 'y' && ($tpl = $template->getTemplateVars('mid'))) { $html .= '' . smarty_function_icon(['name' => 'view'], $template) . "\n"; } if ($tiki_p_admin == 'y' && $params['admpage'] != '') { $html .= '' . smarty_function_icon(['name' => 'settings'], $template) . "\n"; } if ($params['actions'] != '') { $html .= $params['actions']; } } $html .= '

'; return $html; }