Skip to content
Permalink
Browse files

clean ununsed template functions

  • Loading branch information
alice
alice committed Feb 25, 2013
1 parent 4373d8f commit 65af17dec7f65ed1c805db2ef486345a3d7fb3a1
Showing with 0 additions and 73 deletions.
  1. +0 −73 inc/template.php
@@ -35,76 +35,3 @@ function tpl_include( $file, $t=false, $allowphp=true ) {
return $include;
}
// you are here less verbose
function tpl_youarehere_lv($sep=' » '){
global $conf;
global $ID;
global $lang;
// check if enabled
if(!$conf['youarehere']) return false;
$parts = explode(':', $ID);
$count = count($parts);
echo '<span class="bchead">'.$lang['youarehere'].'</span>&nbsp;';
if( $count > 1 ) {
// always print the startpage
$title = useHeading('navigation') ? p_get_first_heading($conf['start']) : $conf['start'];
if(!$title) $title = $conf['start'];
#tpl_link(wl($conf['start']),hsc($title),'title="'.$conf['start'].'"');
// print intermediate namespace links
$part = '';
for($i=0; $i<$count - 1; $i++){
$part .= $parts[$i].':';
$page = $part;
resolve_pageid('',$page,$exists);
if ($page == $conf['start']) continue; // Skip startpage
// output
echo "<div><nobr>";
echo $sep;
if($exists){
#$title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
$title = $parts[$i];
tpl_link(wl($page),hsc($title),'title="'.$page.'"');
}else{
tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2" rel="nofollow"');
}
echo "</nobr></div>";
}
//
// print current page, skipping start page, skipping for namespace index
if(isset($page) && $page==$part.$parts[$i]) return;
$page = $part.$parts[$i];
if($page == $conf['start']) return;
echo "<div class='active'><nobr>";
echo $sep;
if(page_exists($page)){
#$title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
$title = $parts[$i];
tpl_link(wl($page),hsc($title),'title="'.$page.'"');
}else{
tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2" rel="nofollow"');
}
echo "</nobr></div>";
}
return true;
}
// userinfo less verbose
function tpl_userinfo_lv(){
global $lang;
global $INFO;
if(isset($_SERVER['REMOTE_USER'])){
print $lang['loggedinas'].': ('.hsc($_SERVER['REMOTE_USER']).')';
return true;
}
return false;
}

0 comments on commit 65af17d

Please sign in to comment.
You can’t perform that action at this time.