function smarty_function_help($params, $smarty) { extract($params); // Param = zone if (empty($url) && empty($desc) && empty($crumb)) { trigger_error("assign: missing parameter: help (url desc)|crumb"); return; } print help_doclink($params); }
function _breadcrumb_getTitle($crumbs, $loc) { global $feature_siteidentity, $feature_wiki_description, $feature_sitetitle, $print_page, $info, $feature_breadcrumbs; global $structure, $structure_path; if ($feature_siteidentity == 'n' || $feature_breadcrumbs == 'n' || $feature_sitetitle == 'title') { $class = "pagetitle"; $ret = '<h1><a class="' . $class . '" title="'; } else { if ($feature_sitetitle == 'y') { $class = "pagetitle"; $ret = '<a class="' . $class . '" title="'; } else { $class = "crumblink"; $ret = '<a class="' . $class . '" title="'; } } $len = count($crumbs); if ($structure == 'y' && $info) { $cnt = count($structure_path); } else { $cnt = count($crumbs); } $ret .= tra('refresh'); $ret .= '" accesskey="' . $cnt; $ret .= '" href="' . $crumbs[$len - 1]->url . '">'; if ($feature_breadcrumbs == 'n' && $loc == "admin") { $ret .= tra("Administration:") . " "; } $ret .= tra($crumbs[$len - 1]->title) . '</a>'; $ret .= help_doclink(array(crumb => $crumbs[$len - 1])); if ($info['flag'] == 'L' && $print_page != 'y') { $ret .= ' <img src="img/icons2/lock.gif" height="16" width="16" alt="' . tra('locked') . '" title="' . tra('locked by') . ' ' . $info['user'] . '" />'; } if ($feature_siteidentity == 'n' || $feature_breadcrumbs == 'n' || $feature_sitetitle == 'title') { $ret .= '</h1>'; } return $ret; }
function _breadcrumb_getTitle($crumbs, $loc) { global $prefs, $print_page, $info, $structure, $structure_path; $smarty = TikiLib::lib('smarty'); $tikilib = TikiLib::lib('tiki'); $len = count($crumbs); if ($prefs['feature_breadcrumbs'] == 'n' || $prefs['feature_sitetitle'] == 'title') { $smarty->loadPlugin('smarty_modifier_sefurl'); $smarty->loadPlugin('smarty_modifier_escape'); $class = ""; $metadata = ''; $current = current_object(); $escapedHref = smarty_modifier_escape(smarty_modifier_sefurl($current['object'], $current['type'])); if ($coordinates = TikiLib::lib('geo')->get_coordinates($current['type'], $current['object'])) { $class = ' geolocated primary'; $metadata = " data-geo-lat=\"{$coordinates['lat']}\" data-geo-lon=\"{$coordinates['lon']}\""; if (isset($coordinates['zoom'])) { $metadata .= " data-geo-zoom=\"{$coordinates['zoom']}\""; } } $ret = '<a class="' . $class . '"' . $metadata . ' title="' . tra("refresh") . '" href="' . $escapedHref . '">'; } else { $class = "crumblink"; $ret = '<a class="' . $class . '" title="'; if ($structure == 'y' && $info) { $cnt = count($structure_path); } else { $cnt = count($crumbs); } $ret .= tra("go back to this crumb"); $ret .= '" accesskey="' . $cnt; include_once 'tiki-sefurl.php'; $ret .= '" href="' . filter_out_sefurl($crumbs[$len - 1]->url) . '">'; } if ($prefs['feature_breadcrumbs'] == 'n' && $loc == "admin") { $ret .= tra("Administration:") . " "; } // Should show alias if in structure $cur_title = $crumbs[$len - 1]->title; if ($structure == 'y') { foreach ($structure_path as $crumb) { if ($crumb['pageName'] == $cur_title && $crumb['page_alias'] != '') { $cur_title = $crumb['page_alias']; } } } if (!empty($prefs['wiki_pagename_strip'])) { include_once 'lib/smarty_tiki/modifier.pagename.php'; $ret .= tra(smarty_modifier_pagename($cur_title)) . '</a>'; } else { $ret .= htmlentities(tra($cur_title), ENT_QUOTES, 'UTF-8') . '</a>'; } $ret .= help_doclink(array('crumb' => $crumbs[$len - 1])); if (isset($info['flag']) && $info['flag'] == 'L' && $print_page != 'y') { $smarty->loadPlugin('smarty_function_icon'); $ret .= smarty_function_icon(['name' => 'lock', 'iclass' => 'tips', 'ititle' => ':' . tra('Locked by') . $info['user']], $smarty); } return $ret; }
function _breadcrumb_getTitle($crumbs, $loc) { global $prefs, $print_page, $info, $structure, $structure_path; if ($prefs['feature_siteidentity'] == 'n' || $prefs['feature_breadcrumbs'] == 'n' || $prefs['feature_sitetitle'] == 'title') { $ret = '<a title="'; } else { if ($prefs['feature_sitetitle'] == 'y') { $class = "pagetitle"; $ret = '<a class="' . $class . '" title="'; } else { $class = "crumblink"; $ret = '<a class="' . $class . '" title="'; } } $len = count($crumbs); if ($structure == 'y' && $info) { $cnt = count($structure_path); } else { $cnt = count($crumbs); } $ret .= 'refresh'; $ret .= '" accesskey="' . $cnt; $ret .= '" href="' . $crumbs[$len - 1]->url . '">'; if ($prefs['feature_breadcrumbs'] == 'n' && $loc == "admin") { $ret .= tra("Administration:") . " "; } if ($prefs['feature_wikiapproval'] == 'y' && $prefs['wikiapproval_hideprefix'] == 'y' && substr($crumbs[$len - 1]->title, 0, strlen($prefs['wikiapproval_prefix'])) == $prefs['wikiapproval_prefix']) { $crumbs[$len - 1]->title = substr($crumbs[$len - 1]->title, strlen($prefs['wikiapproval_prefix'])); } if (!empty($prefs['wiki_pagename_strip'])) { $wiki_strip = '~' . preg_quote($prefs['wiki_pagename_strip']) . '[a-zA-Z0-9]*$~'; $ret .= tra(preg_replace($wiki_strip, '', $crumbs[$len - 1]->title)) . '</a>'; } else { $ret .= tra($crumbs[$len - 1]->title) . '</a>'; } $ret .= help_doclink(array('crumb' => $crumbs[$len - 1])); if ($info['flag'] == 'L' && $print_page != 'y') { $ret .= ' <img src="pics/icons/lock.png" border="0" height="16" width="16" alt="' . tra('locked') . '" title="' . tra('locked by') . ' ' . $info['user'] . '" />'; } return $ret; }
function _breadcrumb_getTitle($crumbs, $loc) { global $prefs, $print_page, $info, $structure, $structure_path, $tikilib, $smarty; $len = count($crumbs); if ($prefs['feature_breadcrumbs'] == 'n' || $prefs['feature_sitetitle'] == 'title') { $smarty->loadPlugin('smarty_modifier_sefurl'); $smarty->loadPlugin('smarty_modifier_escape'); $class = "pagetitle"; $metadata = ''; $current = current_object(); $escapedHref = smarty_modifier_escape(smarty_modifier_sefurl($current['object'], $current['type'])); if ($coordinates = TikiLib::lib('geo')->get_coordinates($current['type'], $current['object'])) { $class = ' geolocated primary'; $metadata = " data-geo-lat=\"{$coordinates['lat']}\" data-geo-lon=\"{$coordinates['lon']}\""; if (isset($coordinates['zoom'])) { $metadata .= " data-geo-zoom=\"{$coordinates['zoom']}\""; } } $ret = '<strong><a class="' . $class . '"' . $metadata . ' title="' . tra("refresh") . '" href="' . $escapedHref . '">'; } else { $class = "crumblink"; $ret = '<a class="' . $class . '" title="'; if ($structure == 'y' && $info) { $cnt = count($structure_path); } else { $cnt = count($crumbs); } $ret .= tra("go back to this crumb"); $ret .= '" accesskey="' . $cnt; include_once 'tiki-sefurl.php'; $ret .= '" href="' . filter_out_sefurl($crumbs[$len - 1]->url) . '">'; } if ($prefs['feature_breadcrumbs'] == 'n' && $loc == "admin") { $ret .= tra("Administration:") . " "; } if (!empty($prefs['wiki_pagename_strip'])) { include_once 'lib/smarty_tiki/modifier.pagename.php'; $ret .= tra(smarty_modifier_pagename($crumbs[$len - 1]->title)) . '</a>'; } else { $ret .= htmlentities(tra($crumbs[$len - 1]->title), ENT_QUOTES, 'UTF-8') . '</a>'; } $ret .= help_doclink(array('crumb' => $crumbs[$len - 1])); if (isset($info['flag']) && $info['flag'] == 'L' && $print_page != 'y') { $ret .= ' <img src="img/icons/lock.png" height="16" width="16" alt="' . tra('locked') . '" title="' . tra('locked by') . ' ' . $info['user'] . '" />'; } if ($prefs['feature_breadcrumbs'] == 'n' || $prefs['feature_sitetitle'] == 'title') { $ret .= '</strong>'; } return $ret; }