+ if(($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user()))
+ $nav['register'] = array('register',t('Register'), "");
+
+ $help_url = $a->get_baseurl() . '/help';
+
+ if(! get_config('system','hide-help'))
+ $nav['help'] = array($help_url, t('Help'), "");
+
+
+ if(strlen($a->apps)) {
+ $nav['apps'] = array('apps', t('Apps'), "");
+ }
+
+ $nav['search'] = array('search', t('Search'), "");
+
+ $gdirpath = 'directory';
+
+ if(strlen(get_config('system','singleuser'))) {
+ $gdir = dirname(get_config('system','directory_submit_url'));
+ if(strlen($gdir))
+ $gdirpath = $gdir;
+ }
+
+ $nav['directory'] = array($gdirpath, t('Directory'), "");
+
+ /**
+ *
+ * The following nav links are only show to logged in users
+ *
+ */
+
+ if(local_user()) {
+
+ $nav['network'] = array('network', t('Network'), "");
+
+ $nav['home'] = array('profile/' . $a->user['nickname'], t('Home'), "");
+
+
+ /* only show friend requests for normal pages. Other page types have automatic friendship. */
+
+ if($_SESSION['page_flags'] == PAGE_NORMAL) {
+ $nav['notifications'] = array('notifications', t('Notifications'), "");
+ }
+
+ $nav['messages'] = array('message', t('Messages'), "");
+
+ if(is_array($a->identities) && count($a->identities) > 1) {
+ $nav['manage'] = array('manage', t('Manage'), "");
+ }
+
+ $nav['settings'] = array('settings', t('Settings'),"");
+ $nav['profiles'] = array('profiles', t('Profiles'),"");
+ $nav['contacts'] = array('contacts', t('Contacts'),"");