From 1734437e2bd33ee82fbc1d6f0310400dc62abea9 Mon Sep 17 00:00:00 2001 From: andi Date: Fri, 18 Mar 2005 18:57:44 +0100 Subject: removed dprecated stuff, added hierarchical breadcrumbs darcs-hash:20050318175744-9977f-a917cca1f2eed5b85d37af9a7add00465ece9c99.gz --- inc/html.php | 414 ------------------------------------------------------- inc/template.php | 40 +++++- 2 files changed, 39 insertions(+), 415 deletions(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index 3b31c96ff..2e8432b3c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -157,94 +157,6 @@ function html_secedit($text,$show=true){ return $text; } -/** - * displays the breadcrumbs trace - * - * @deprecated - * @author Andreas Gohr - */ -function html_breadcrumbs(){ - global $lang; - global $conf; - - //check if enabled - if(!$conf['breadcrumbs']) return; - - $crumbs = breadcrumbs(); //setup crumb trace - print ''; -} - -/** - * display the HTML head and metadata - * - * @deprecated -> tpl_metaheaders() - * @author Andreas Gohr - */ -function html_head(){ - global $ID; - global $ACT; - global $INFO; - global $REV; - global $conf; - global $lang; - - //print '<'.'?xml version="1.0"?'.">\n"; - print ''; - print "\n"; -?> - - - <?=$ID?> [<?=$conf['title']?>] - - - - - - - - - - - -'."\n"; - print ' '."\n"; - }else{ - print ' '."\n"; - } - }else{ - print ' '."\n"; - } -?> - - - - - - - - - - */ -function html_acl($perm){ - global $INFO; - if($INFO['perm'] >= $perm) return true; - - print parsedLocale('denied'); - return false; -} - -/** - * Displays the overall page header and calls html_head() - * - * @author Andreas Gohr - */ -function html_header(){ - global $ID; - global $REV; - global $lang; - global $conf; - html_head(); -?> - -
- -
-
-
- [[]] -
- -
- - -
-
- - 'revisions'))?> -
- -
- 'recent'))?> -
- - - -
  -
-
- - -
-
- - - */ -function html_metainfo(){ - global $conf; - global $lang; - global $INFO; - global $REV; - - $fn = $INFO['filepath']; - if(!$conf['fullpath']){ - if($REV){ - $fn = str_replace(realpath($conf['olddir']).DIRECTORY_SEPARATOR,'',$fn); - }else{ - $fn = str_replace(realpath($conf['datadir']).DIRECTORY_SEPARATOR,'',$fn); - } - } - $date = date($conf['dformat'],$INFO['lastmod']); - - print '
'; - if($_SERVER['REMOTE_USER']){ - print '
'; - print $lang['loggedinas'].': '.$_SERVER['REMOTE_USER']; - print '
'; - } - print '   '; - if($INFO['exists']){ - print $fn; - print ' · '; - print $lang['lastmod']; - print ': '; - print $date; - if($INFO['editor']){ - print ' '.$lang['by'].' '; - print $INFO['editor']; - } - if($INFO['locked']){ - print ' · '; - print $lang['lockedby']; - print ': '; - print $INFO['locked']; - } - } - print '
'; -} - -/** - * Diplay the overall footer - * - * @author Andreas Gohr - */ -function html_footer(){ - global $ID; - global $REV; - global $INFO; - global $lang; - global $conf; -?> - -
-
 
-
- -
-
- - 'revisions'))?> -
- -
- 'logout',)); - }else{ - print html_btn('login',$ID,'',array('do' => 'login')); - } - #//acl-admin button - #if($INFO['perm'] == AUTH_GRANT){ - # print html_btn('acl_admin',$ID,'',array('do' => 'acl_admin')); - #} - } - ?> - 'index'))?> -   -
-
-
- -
- - -'; } -/** - * prints the acl-admin form(s) - * - * @author Frank Schubert - */ -function html_acl_admin(){ - global $lang; - global $ID; - global $INFO; - - print parsedLocale('acl_admin'); -?> -
- - - - - -
- - - - - - - - - - - - - - - - -
-
-
-
- -
-
- -
- -
-
- -
- - - $value){ - if($pagename != '*') { - $ID_cur=$pagename; - while(($piece=getNS($ID_cur)) !== false){ - $url="".noNS($piece).":".$url;; - $ID_cur=$piece; - } - $url.="".noNS($pagename).""; - print $url; - $url=''; - }else{ - print $pagename; - } ?> - - - - - - - - - - - - - - - - - - - - - - - - -
nameRWCUUPDATEDELETE
- - - - -
- - - - - - =$num) { - ?> checked="checked" /> - -
- - - - - - -
-
-
-
-
- */ function tpl_breadcrumbs(){ @@ -280,6 +279,45 @@ function tpl_breadcrumbs(){ } } +/** + * Hierarchical breadcrumbs + * + * This code was suggested as replacement for the usual breadcrumbs + * trail in the Wiki and was modified by me. + * It only makes sense with a deep site structure. + * + * @author Andreas Gohr + * @link http://wiki.splitbrain.org/wiki:tipsandtricks:hierarchicalbreadcrumbs + */ +function tpl_youarehere(){ + global $conf; + global $ID; + global $lang; + + + $parts = explode(':', $ID); + + print $lang['breadcrumb'].': '; + + //always print the startpage + if( $a_part[0] != $conf['start'] ) + tpl_link(wl($conf['start']),$conf['start'],'title="'.$conf['start'].'"'); + + $page = ''; + foreach ($parts as $part){ + print ' » '; + $page .= $part; + + if(file_exists(wikiFN($page))){ + tpl_link(wl($page),$part,'title="'.$page.'"'); + }else{ + print $page; + } + + $page .= ':'; + } +} + /** * Print info if the user is logged in * -- cgit v1.2.3