From 91db3b3f41f7822e80df360a0a551afb3af38797 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 11 Jan 2011 14:20:01 -0800 Subject: [PATCH] more doco on header/nav region --- include/nav.php | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/include/nav.php b/include/nav.php index 1bde702bef..96acf826df 100644 --- a/include/nav.php +++ b/include/nav.php @@ -1,11 +1,35 @@ page,'nav'))) $a->page['nav'] = ''; + /** + * Placeholder div for popup panel + */ + $a->page['nav'] .= '' ; + /** + * + * Our network is distributed, and as you visit friends some of the + * sites look exactly the same - it isn't always easy to know where you are. + * Display the current site location as a navigation aid. + * + */ + $a->page['nav'] .= '
' . substr($a->get_baseurl(),strpos($a->get_baseurl(),'//') + 2 ) . '
'; + + + /** + * Display login or logout + */ + if(local_user()) { $a->page['nav'] .= '' . t('Logout') . "\r\n"; } @@ -15,12 +39,16 @@ $a->page['nav'] .= "\r\n"; - // This should take you home from a remote profile connection + /** + * "Home" should also take you home from an authenticated remote profile connection + */ $homelink = ((x($_SESSION,'visitor_home')) ? $_SESSION['visitor_home'] : ''); if(($a->module != 'home') && (! (local_user()))) $a->page['nav'] .= '' . t('Home') . "\r\n"; + + if(($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user())) $a->page['nav'] .= '' . t('Register') . "\r\n"; @@ -28,6 +56,13 @@ $a->page['nav'] .= '' . t('Search') . "\r\n"; $a->page['nav'] .= '' . t('Directory') . "\r\n"; + + /** + * + * The following nav links are only show to logged in users + * + */ + if(x($_SESSION,'uid')) { $a->page['nav'] .= '' . t('Network') @@ -36,7 +71,7 @@ $a->page['nav'] .= '' . t('Home') . '' . "\r\n"; - // only show friend requests for normal pages. Other page types have automatic friendship. + /* only show friend requests for normal pages. Other page types have automatic friendship. */ if($_SESSION['page_flags'] == PAGE_NORMAL) { $a->page['nav'] .= '' . t('Notifications') @@ -58,6 +93,12 @@ $a->page['nav'] .= "\r\n\r\n"; + /** + * + * Provide a banner/logo/whatever + * + */ + $banner = get_config('system','banner'); if($banner === false)