From e6444adafdd3c50913ca44d8701996e058e064b9 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 25 Jul 2011 16:52:30 +0200 Subject: [PATCH] change nav selected css class --- boot.php | 7 ++++++- include/nav.php | 2 +- mod/community.php | 2 +- mod/contacts.php | 2 +- mod/directory.php | 2 +- mod/message.php | 2 +- mod/network.php | 2 +- mod/notifications.php | 2 +- mod/profile.php | 2 +- mod/profiles.php | 2 +- mod/settings.php | 2 +- 11 files changed, 16 insertions(+), 11 deletions(-) diff --git a/boot.php b/boot.php index d365122951..f4b43e4c99 100644 --- a/boot.php +++ b/boot.php @@ -2946,6 +2946,11 @@ function get_plugin_info($plugin){ return $info; }} +if(! function_exists('set_nav_selected')){ +function set_nav_selected($id){ + return ''; +}} + if(! function_exists('return_bytes')) { function return_bytes ($size_str) { switch (substr ($size_str, -1)) @@ -2968,4 +2973,4 @@ function generate_guid() { $found = false; } while ($found == true ); return $guid; -} \ No newline at end of file +} diff --git a/include/nav.php b/include/nav.php index 895c321e6a..caed9453ae 100644 --- a/include/nav.php +++ b/include/nav.php @@ -41,7 +41,7 @@ function nav(&$a) { $nav['logout'] = Array('logout',t('Logout'), "", t('End this session')); } else { - $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'nav-selected':''), t('Sign in')); + $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in')); } diff --git a/mod/community.php b/mod/community.php index cf43598b51..f8bd88d869 100644 --- a/mod/community.php +++ b/mod/community.php @@ -25,7 +25,7 @@ function community_content(&$a, $update = 0) { $o .= '

' . t('Community') . '

'; if(! $update) { - $o .= ''; + $o .= set_nav_selected('nav-community-link'); $o .= '
' . "\r\n"; $o .= "\r\n"; } diff --git a/mod/contacts.php b/mod/contacts.php index 2fc01a0d8b..1fa07688c1 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -112,7 +112,7 @@ function contacts_content(&$a) { $sort_type = 0; $o = ''; - $o .= ''; + $o .= set_nav_selected('nav-contacts-link'); $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; diff --git a/mod/directory.php b/mod/directory.php index 0c60f04bf4..03b6ab4d1f 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -22,7 +22,7 @@ function directory_content(&$a) { } $o = ''; - $o .= ''; + $o .= set_nav_selected('nav-directory-link'); if(x($_SESSION,'theme')) unset($_SESSION['theme']); diff --git a/mod/message.php b/mod/message.php index ad598eb7d0..ff3db06e23 100644 --- a/mod/message.php +++ b/mod/message.php @@ -110,7 +110,7 @@ function message_post(&$a) { function message_content(&$a) { $o = ''; - $o .= ''; + $o .= set_nav_selected('nav-messages-link'); if(! local_user()) { notice( t('Permission denied.') . EOL); diff --git a/mod/network.php b/mod/network.php index 7bdd3f3f10..8d377fa0e2 100644 --- a/mod/network.php +++ b/mod/network.php @@ -98,7 +98,7 @@ function network_content(&$a, $update = 0) { } } - $o .= ''; + $o .= set_nav_selected('nav-network-link'); $_SESSION['return_url'] = $a->cmd; diff --git a/mod/notifications.php b/mod/notifications.php index c6f073058d..6f9ece1848 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -64,7 +64,7 @@ function notifications_content(&$a) { } $o = ''; - $o .= ''; + $o .= set_nav_selected("nav-notifications-link"); if(($a->argc > 1) && ($a->argv[1] == 'all')) $sql_extra = ''; diff --git a/mod/profile.php b/mod/profile.php index f4b6bfaf1c..7e47c91bb0 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -70,7 +70,7 @@ function profile_content(&$a, $update = 0) { } else { if($a->profile['profile_uid'] == local_user()) - $o .= ''; + $o .= set_nav_selected('nav-home-link'); } $contact = null; diff --git a/mod/profiles.php b/mod/profiles.php index 160ca13bcd..7041249e24 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -220,7 +220,7 @@ function profiles_post(&$a) { function profiles_content(&$a) { $o = ''; - $o .= ''; + $o .= set_nav_selected('nav-profiles-link'); if(! local_user()) { notice( t('Permission denied.') . EOL); diff --git a/mod/settings.php b/mod/settings.php index 1b4098de8f..0223b1b9ca 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -299,7 +299,7 @@ if(! function_exists('settings_content')) { function settings_content(&$a) { $o = ''; - $o .= ''; + $o .= set_nav_selected('nav-settings-link'); if(! local_user()) { notice( t('Permission denied.') . EOL );