]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Make new menu the default menu
authorEvan Prodromou <evan@status.net>
Sun, 23 Jan 2011 17:35:35 +0000 (12:35 -0500)
committerEvan Prodromou <evan@status.net>
Sun, 23 Jan 2011 17:35:35 +0000 (12:35 -0500)
There's a new menu layout in this version of the software. It was
implemented as a plugin in 0.9.x to avoid clashes with existing themes,
but we're going to break that compatibility in this version, so we're just going for it.

This change involved moving all the changes in NewMenuPlugin into the
default code that was calling it. In addition, since
accountsettingsaction and connectsettingsaction differed only by menu,
I removed them, changed all references to them to the settingsmenu, and moved
the combined nav to its own class.

Let's put that episode behind us.

The CSS shim that was loaded by NewMenuPlugin for certain themes and certain actions
was removed.

28 files changed:
actions/avatarsettings.php
actions/emailsettings.php
actions/grouplogo.php
actions/imsettings.php
actions/oauthappssettings.php
actions/oauthconnectionssettings.php
actions/passwordsettings.php
actions/profilesettings.php
actions/showstream.php
actions/smssettings.php
actions/urlsettings.php
lib/accountsettingsaction.php [deleted file]
lib/action.php
lib/connectsettingsaction.php [deleted file]
lib/designsettings.php
lib/personalgroupnav.php
lib/settingsaction.php
lib/settingsnav.php [new file with mode: 0644]
lib/subgroupnav.php
plugins/Facebook/FBConnectSettings.php
plugins/Facebook/FacebookPlugin.php
plugins/FacebookBridge/actions/facebooksettings.php
plugins/NewMenu/NewMenuPlugin.php
plugins/NewMenu/newmenu.css [deleted file]
plugins/OpenID/openidsettings.php
plugins/SubMirror/actions/mirrorsettings.php
plugins/TwitterBridge/twittersettings.php
theme/base/css/display.css

index 375420c5c9d5fc656f20b80054333438e28e1bb1..7b671d9e32d28c0f2ad1c1773d3246ed0395077c 100644 (file)
@@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/accountsettingsaction.php';
+
 
 define('MAX_ORIGINAL', 480);
 
@@ -49,7 +49,7 @@ define('MAX_ORIGINAL', 480);
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-class AvatarsettingsAction extends AccountSettingsAction
+class AvatarsettingsAction extends SettingsAction
 {
     var $mode = null;
     var $imagefile = null;
index 4a7dc1b871b450c1a8148037f95d495123655c66..41c12f2a04d24a7e9d13f0a2d583e7e7555dc00e 100644 (file)
@@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/accountsettingsaction.php';
+
 
 /**
  * Settings for email
@@ -47,7 +47,7 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
  * @see      Widget
  */
 
-class EmailsettingsAction extends AccountSettingsAction
+class EmailsettingsAction extends SettingsAction
 {
     /**
      * Title of the page
index f414a23cc31369665abd68eb0b69e8b899c95b07..69840485e0e3c9c2a72ba4784b1231dcdf5b711c 100644 (file)
@@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/accountsettingsaction.php';
+
 
 define('MAX_ORIGINAL', 480);
 
index 1b1bc0dc0dba1b651d27503dcade3ab5791d91cd..76fb2285c3ee80f117650f885a8fd2a1f3329ba5 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
  * @see      SettingsAction
  */
 
-class ImsettingsAction extends ConnectSettingsAction
+class ImsettingsAction extends SettingsAction
 {
     /**
      * Title of the page
index c98c90dbf8353549065a520e532ddc5e33259f0a..3a8fc9896693f553a4e864908968f1693bf8485a 100644 (file)
@@ -31,9 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR . '/lib/settingsaction.php';
-require_once INSTALLDIR . '/lib/applicationlist.php';
-
 /**
  * Show a user's registered OAuth applications
  *
index cdb73203f0c4263e53054bca3a90d0401108350f..c173a3223023d00b4173fd09a7d47b0c08dd26c7 100644 (file)
@@ -31,8 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR . '/lib/connectsettingsaction.php';
-require_once INSTALLDIR . '/lib/applicationlist.php';
 require_once INSTALLDIR . '/lib/apioauthstore.php';
 
 /**
@@ -46,7 +44,7 @@ require_once INSTALLDIR . '/lib/apioauthstore.php';
  *
  * @see      SettingsAction
  */
-class OauthconnectionssettingsAction extends ConnectSettingsAction
+class OauthconnectionssettingsAction extends SettingsAction
 {
     var $page        = null;
     var $oauth_token = null;
index 3bb8e3bb9f9d1e6fedf058c27c8e2ceb4877e9b6..c9bd200bd8def93468e369baa00202bc8032bf88 100644 (file)
@@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/accountsettingsaction.php';
+
 
 /**
  * Change password
@@ -45,7 +45,7 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
  * @link     http://status.net/
  */
 
-class PasswordsettingsAction extends AccountSettingsAction
+class PasswordsettingsAction extends SettingsAction
 {
     /**
      * Title of the page
index 19fbdbd29336d3d7393a3157b4c8c9d498ba9115..1334644e9c4b28839ff16984ab7ffe5647799f00 100644 (file)
@@ -33,7 +33,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/accountsettingsaction.php';
+
 
 /**
  * Change profile settings
@@ -47,7 +47,7 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
  * @link     http://status.net/
  */
 
-class ProfilesettingsAction extends AccountSettingsAction
+class ProfilesettingsAction extends SettingsAction
 {
     /**
      * Title of the page
index 14f629b6a83e55e8cdcf589c960fde7a64976083..1688677d8412a33fba0caee8843f2f4161842fe6 100644 (file)
@@ -106,7 +106,7 @@ class ShowstreamAction extends ProfileAction
 
     function showLocalNav()
     {
-        $nav = new PersonalGroupNav($this);
+        $nav = new SubGroupNav($this, $this->user);
         $nav->show();
     }
 
index 6af1872a0ec1d88bcf117ff20ba4ef2cadc57a6b..217db278883d1be6746009428d0d85c20b7ceaeb 100644 (file)
@@ -31,8 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/connectsettingsaction.php';
-
 /**
  * Settings for SMS
  *
@@ -45,7 +43,7 @@ require_once INSTALLDIR.'/lib/connectsettingsaction.php';
  * @see      SettingsAction
  */
 
-class SmssettingsAction extends ConnectSettingsAction
+class SmssettingsAction extends SettingsAction
 {
     /**
      * Title of the page
index 7b2fc3f5542cb3736bee9af29d47d80e2a6c9e2d..f8780a7e86bef10c9d6b595e77fdd10d01c9b789 100644 (file)
@@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/accountsettingsaction.php';
+
 
 /**
  * Miscellaneous settings actions
@@ -47,7 +47,7 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
  * @link     http://status.net/
  */
 
-class UrlsettingsAction extends AccountSettingsAction
+class UrlsettingsAction extends SettingsAction
 {
     /**
      * Title of the page
diff --git a/lib/accountsettingsaction.php b/lib/accountsettingsaction.php
deleted file mode 100644 (file)
index 2c519e4..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-<?php
-/**
- * StatusNet, the distributed open-source microblogging tool
- *
- * Base class for account settings actions
- *
- * PHP version 5
- *
- * LICENCE: This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- * @category  Settings
- * @package   StatusNet
- * @author    Evan Prodromou <evan@status.net>
- * @copyright 2008-2009 StatusNet, Inc.
- * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://status.net/
- */
-
-if (!defined('STATUSNET') && !defined('LACONICA')) {
-    exit(1);
-}
-
-require_once INSTALLDIR.'/lib/settingsaction.php';
-
-/**
- * Base class for account settings actions
- *
- * @category Settings
- * @package  StatusNet
- * @author   Evan Prodromou <evan@status.net>
- * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://status.net/
- *
- * @see      Widget
- */
-class AccountSettingsAction extends SettingsAction
-{
-    /**
-     * Show the local navigation menu
-     *
-     * This is the same for all settings, so we show it here.
-     *
-     * @return void
-     */
-    function showLocalNav()
-    {
-        $menu = new AccountSettingsNav($this);
-        $menu->show();
-    }
-}
-
-/**
- * A widget for showing the settings group local nav menu
- *
- * @category Widget
- * @package  StatusNet
- * @author   Evan Prodromou <evan@status.net>
- * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://status.net/
- *
- * @see      HTMLOutputter
- */
-class AccountSettingsNav extends Widget
-{
-    var $action = null;
-
-    /**
-     * Construction
-     *
-     * @param Action $action current action, used for output
-     */
-    function __construct($action=null)
-    {
-        parent::__construct($action);
-        $this->action = $action;
-    }
-
-    /**
-     * Show the menu
-     *
-     * @return void
-     */
-    function show()
-    {
-        $action_name = $this->action->trimmed('action');
-        $this->action->elementStart('ul', array('class' => 'nav'));
-
-        if (Event::handle('StartAccountSettingsNav', array(&$this->action))) {
-            $user = common_current_user();
-
-            if(Event::handle('StartAccountSettingsProfileMenuItem', array($this, &$menu))){
-                // TRANS: Link title attribute in user account settings menu.
-                $title = _('Change your profile settings');
-                // TRANS: Link description in user account settings menu.
-                $this->showMenuItem('profilesettings',_('Profile'),$title);
-                Event::handle('EndAccountSettingsProfileMenuItem', array($this, &$menu));
-            }
-            if(Event::handle('StartAccountSettingsAvatarMenuItem', array($this, &$menu))){
-                // TRANS: Link title attribute in user account settings menu.
-                $title = _('Upload an avatar');
-                // TRANS: Link description in user account settings menu.
-                $this->showMenuItem('avatarsettings',_('Avatar'),$title);
-                Event::handle('EndAccountSettingsAvatarMenuItem', array($this, &$menu));
-            }
-            if(Event::handle('StartAccountSettingsPasswordMenuItem', array($this, &$menu))){
-                // TRANS: Link title attribute in user account settings menu.
-                $title = _('Change your password');
-                // TRANS: Link description in user account settings menu.
-                $this->showMenuItem('passwordsettings',_('Password'),$title);
-                Event::handle('EndAccountSettingsPasswordMenuItem', array($this, &$menu));
-            }
-            if(Event::handle('StartAccountSettingsEmailMenuItem', array($this, &$menu))){
-                // TRANS: Link title attribute in user account settings menu.
-                $title = _('Change email handling');
-                // TRANS: Link description in user account settings menu.
-                $this->showMenuItem('emailsettings',_('Email'),$title);
-                Event::handle('EndAccountSettingsEmailMenuItem', array($this, &$menu));
-            }
-            if(Event::handle('StartAccountSettingsDesignMenuItem', array($this, &$menu))){
-                // TRANS: Link title attribute in user account settings menu.
-                $title = _('Design your profile');
-                // TRANS: Link description in user account settings menu.
-                $this->showMenuItem('userdesignsettings',_('Design'),$title);
-                Event::handle('EndAccountSettingsDesignMenuItem', array($this, &$menu));
-            }
-            if(Event::handle('StartAccountSettingsUrlMenuItem', array($this, &$menu))){
-                // TRANS: Link title attribute in user account settings menu.
-                $title = _('URL shortener settings');
-                // TRANS: Link description in user account settings menu.
-                $this->showMenuItem('urlsettings',_('URL'),$title);
-                Event::handle('EndAccountSettingsUrlMenuItem', array($this, &$menu));
-            }
-
-            Event::handle('EndAccountSettingsNav', array(&$this->action));
-        }
-
-        $this->action->elementEnd('ul');
-    }
-
-    function showMenuItem($menuaction, $desc1, $desc2)
-    {
-        $action_name = $this->action->trimmed('action');
-        $this->action->menuItem(common_local_url($menuaction),
-            $desc1,
-            $desc2,
-            $action_name === $menuaction);
-    }
-}
index c01a686904b5dc0e0489192514d0703bdf5c04ec..c8f77f79bd2e690ae06e6169bec5de9ab3238aa7 100644 (file)
@@ -476,9 +476,13 @@ class Action extends HTMLOutputter // lawsuit
                 $user = User::singleUser();
                 $url = common_local_url('showstream',
                                         array('nickname' => $user->nickname));
+            } else if (common_logged_in()) {
+                $cur = common_current_user();
+                $url = common_local_url('all', array('nickname' => $cur->nickname));
             } else {
                 $url = common_local_url('public');
             }
+
             $this->elementStart('a', array('class' => 'url home bookmark',
                                            'href' => $url));
 
@@ -513,7 +517,8 @@ class Action extends HTMLOutputter // lawsuit
             $this->text(' ');
             $this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
             $this->elementEnd('a');
-            Event::handle('EndAddressData', array($this));
+
+            Event::handle('EndAddressData', array($action));
         }
         $this->elementEnd('address');
     }
@@ -529,71 +534,62 @@ class Action extends HTMLOutputter // lawsuit
         $this->elementStart('ul', array('class' => 'nav',
                                         'id' => 'site_nav_global_primary'));
         if (Event::handle('StartPrimaryNav', array($this))) {
-            if ($user) {
-                // TRANS: Tooltip for main menu option "Personal"
-                $tooltip = _m('TOOLTIP', 'Personal profile and friends timeline');
-                $this->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
-                                // TRANS: Main menu option when logged in for access to personal profile and friends timeline
-                                _m('MENU', 'Personal'), $tooltip, false, 'nav_home');
-                // TRANS: Tooltip for main menu option "Account"
-                $tooltip = _m('TOOLTIP', 'Change your email, avatar, password, profile');
+            if (!empty($user)) {
+                $this->menuItem(common_local_url('all', 
+                                                 array('nickname' => $user->nickname)),
+                                _m('Home'),
+                                _m('Friends timeline'),
+                                false,
+                                'nav_home');
+                $this->menuItem(common_local_url('showstream', 
+                                                 array('nickname' => $user->nickname)),
+                                _m('Profile'),
+                                _m('Your profile'),
+                                false,
+                                'nav_profile');
+                $this->menuItem(common_local_url('public'),
+                                _m('Public'),
+                                _m('Everyone on this site'),
+                                false,
+                                'nav_public');
                 $this->menuItem(common_local_url('profilesettings'),
-                                // TRANS: Main menu option when logged in for access to user settings
-                                _('Account'), $tooltip, false, 'nav_account');
-                // TRANS: Tooltip for main menu option "Services"
-                $tooltip = _m('TOOLTIP', 'Connect to services');
-                $this->menuItem(common_local_url('oauthconnectionssettings'),
-                                // TRANS: Main menu option when logged in and connection are possible for access to options to connect to other services
-                                _('Connect'), $tooltip, false, 'nav_connect');
+                                _m('Settings'),
+                                _m('Change your personal settings'),
+                                false,
+                                'nav_account');
                 if ($user->hasRight(Right::CONFIGURESITE)) {
-                    // TRANS: Tooltip for menu option "Admin"
-                    $tooltip = _m('TOOLTIP', 'Change site configuration');
                     $this->menuItem(common_local_url('siteadminpanel'),
-                                    // TRANS: Main menu option when logged in and site admin for access to site configuration
-                                    _m('MENU', 'Admin'), $tooltip, false, 'nav_admin');
-                }
-                if (common_config('invite', 'enabled')) {
-                    // TRANS: Tooltip for main menu option "Invite"
-                    $tooltip = _m('TOOLTIP', 'Invite friends and colleagues to join you on %s');
-                    $this->menuItem(common_local_url('invite'),
-                                    // TRANS: Main menu option when logged in and invitations are allowed for inviting new users
-                                    _m('MENU', 'Invite'),
-                                    sprintf($tooltip,
-                                            common_config('site', 'name')),
-                                    false, 'nav_invitecontact');
+                                    _m('Admin'), 
+                                    _m('Site configuration'),
+                                    false,
+                                    'nav_admin');
                 }
-                // TRANS: Tooltip for main menu option "Logout"
-                $tooltip = _m('TOOLTIP', 'Logout from the site');
                 $this->menuItem(common_local_url('logout'),
-                                // TRANS: Main menu option when logged in to log out the current user
-                                _m('MENU', 'Logout'), $tooltip, false, 'nav_logout');
-            }
-            else {
-                if (!common_config('site', 'closed') && !common_config('site', 'inviteonly')) {
-                    // TRANS: Tooltip for main menu option "Register"
-                    $tooltip = _m('TOOLTIP', 'Create an account');
-                    $this->menuItem(common_local_url('register'),
-                                    // TRANS: Main menu option when not logged in to register a new account
-                                    _m('MENU', 'Register'), $tooltip, false, 'nav_register');
-                }
-                // TRANS: Tooltip for main menu option "Login"
-                $tooltip = _m('TOOLTIP', 'Login to the site');
+                                _m('Logout'), 
+                                _m('Logout from the site'),
+                                false,
+                                'nav_logout');
+            } else {
+                $this->menuItem(common_local_url('public'),
+                                _m('Public'),
+                                _m('Everyone on this site'),
+                                false,
+                                'nav_public');
                 $this->menuItem(common_local_url('login'),
-                                // TRANS: Main menu option when not logged in to log in
-                                _m('MENU', 'Login'), $tooltip, false, 'nav_login');
+                                _m('Login'), 
+                                _m('Login to the site'),
+                                false,
+                                'nav_login');
             }
-            // TRANS: Tooltip for main menu option "Help"
-            $tooltip = _m('TOOLTIP', 'Help me!');
-            $this->menuItem(common_local_url('doc', array('title' => 'help')),
-                            // TRANS: Main menu option for help on the StatusNet site
-                            _m('MENU', 'Help'), $tooltip, false, 'nav_help');
-            if ($user || !common_config('site', 'private')) {
-                // TRANS: Tooltip for main menu option "Search"
-                $tooltip = _m('TOOLTIP', 'Search for people or text');
-                $this->menuItem(common_local_url('peoplesearch'),
-                                // TRANS: Main menu option when logged in or when the StatusNet instance is not private
-                                _m('MENU', 'Search'), $tooltip, false, 'nav_search');
+
+            if (!empty($user) || !common_config('site', 'private')) {
+                $this->menuItem(common_local_url('noticesearch'),
+                                _m('Search'),
+                                _m('Search the site'),
+                                false,
+                                'nav_search');
             }
+
             Event::handle('EndPrimaryNav', array($this));
         }
         $this->elementEnd('ul');
diff --git a/lib/connectsettingsaction.php b/lib/connectsettingsaction.php
deleted file mode 100644 (file)
index 0f64fee..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-<?php
-/**
- * StatusNet, the distributed open-source microblogging tool
- *
- * Base class for connection settings actions
- *
- * PHP version 5
- *
- * LICENCE: This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- * @category  Settings
- * @package   StatusNet
- * @author    Evan Prodromou <evan@status.net>
- * @copyright 2008-2009 StatusNet, Inc.
- * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://status.net/
- */
-
-if (!defined('STATUSNET') && !defined('LACONICA')) {
-    exit(1);
-}
-
-require_once INSTALLDIR.'/lib/settingsaction.php';
-
-/**
- * Base class for connection settings actions
- *
- * @category Settings
- * @package  StatusNet
- * @author   Evan Prodromou <evan@status.net>
- * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://status.net/
- *
- * @see      Widget
- */
-class ConnectSettingsAction extends SettingsAction
-{
-    /**
-     * Show the local navigation menu
-     *
-     * This is the same for all settings, so we show it here.
-     *
-     * @return void
-     */
-    function showLocalNav()
-    {
-        $menu = new ConnectSettingsNav($this);
-        $menu->show();
-    }
-}
-
-/**
- * A widget for showing the connect group local nav menu
- *
- * @category Widget
- * @package  StatusNet
- * @author   Evan Prodromou <evan@status.net>
- * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://status.net/
- *
- * @see      HTMLOutputter
- */
-class ConnectSettingsNav extends Widget
-{
-    var $action = null;
-
-    /**
-     * Construction
-     *
-     * @param Action $action current action, used for output
-     */
-    function __construct($action=null)
-    {
-        parent::__construct($action);
-        $this->action = $action;
-    }
-
-    /**
-     * Show the menu
-     *
-     * @return void
-     */
-    function show()
-    {
-        $action_name = $this->action->trimmed('action');
-        $this->action->elementStart('ul', array('class' => 'nav'));
-
-        if (Event::handle('StartConnectSettingsNav', array(&$this->action))) {
-
-            # action => array('prompt', 'title')
-            $menu = array();
-            $transports = array();
-            Event::handle('GetImTransports', array(&$transports));
-            if ($transports) {
-                $menu['imsettings'] =
-                  // TRANS: Menu item for Instant Messaging settings.
-                  array(_m('MENU','IM'),
-                        // TRANS: Tooltip for Instant Messaging menu item.
-                        _('Updates by instant messenger (IM)'));
-            }
-            if (common_config('sms', 'enabled')) {
-                $menu['smssettings'] =
-                  // TRANS: Menu item for Short Message Service settings.
-                  array(_m('MENU','SMS'),
-                        // TRANS: Tooltip for Short Message Service menu item.
-                        _('Updates by SMS'));
-            }
-
-            $menu['oauthconnectionssettings'] = array(
-                // TRANS: Menu item for OuAth connection settings.
-                _m('MENU','Connections'),
-                // TRANS: Tooltip for connected applications (Connections through OAuth) menu item.
-                _('Authorized connected applications')
-            );
-
-            foreach ($menu as $menuaction => $menudesc) {
-                $this->action->menuItem(common_local_url($menuaction),
-                        $menudesc[0],
-                        $menudesc[1],
-                        $action_name === $menuaction);
-            }
-
-            Event::handle('EndConnectSettingsNav', array(&$this->action));
-        }
-
-        $this->action->elementEnd('ul');
-    }
-}
index d0601c5530a91eb349af49d13b423c29558b2008..eb3a5908e6ff8c05fec602461fff15553c608686 100644 (file)
@@ -32,9 +32,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR . '/lib/accountsettingsaction.php';
-require_once INSTALLDIR . '/lib/webcolor.php';
-
 /**
  * Base class for setting a user or group design
  *
@@ -48,7 +45,8 @@ require_once INSTALLDIR . '/lib/webcolor.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-class DesignSettingsAction extends AccountSettingsAction
+
+class DesignSettingsAction extends SettingsAction
 {
     var $submitaction = null;
 
index 1f543b897441195e83df0bcf0b6a6cd3a7d0bbe3..f57de8e24078e923c9c859e5f150877256facfbb 100644 (file)
@@ -79,7 +79,7 @@ class PersonalGroupNav extends Widget
     {
         $user = null;
 
-       // FIXME: we should probably pass this in
+        // FIXME: we should probably pass this in
 
         $action = $this->action->trimmed('action');
         $nickname = $this->action->trimmed('nickname');
@@ -98,25 +98,20 @@ class PersonalGroupNav extends Widget
 
         if (Event::handle('StartPersonalGroupNav', array($this))) {
             $this->out->menuItem(common_local_url('all', array('nickname' =>
-                                                           $nickname)),
-                             _('Personal'),
-                             sprintf(_('%s and friends'), $name),
-                             $action == 'all', 'nav_timeline_personal');
+                                                               $nickname)),
+                                 _('Home'),
+                                 sprintf(_('%s and friends'), $name),
+                                 $action == 'all', 'nav_timeline_personal');
             $this->out->menuItem(common_local_url('replies', array('nickname' =>
-                                                                  $nickname)),
-                             _('Replies'),
-                             sprintf(_('Replies to %s'), $name),
-                             $action == 'replies', 'nav_timeline_replies');
-            $this->out->menuItem(common_local_url('showstream', array('nickname' =>
-                                                                  $nickname)),
-                             _('Profile'),
-                             $name,
-                             $action == 'showstream', 'nav_profile');
+                                                                   $nickname)),
+                                 _('Replies'),
+                                 sprintf(_('Replies to %s'), $name),
+                                 $action == 'replies', 'nav_timeline_replies');
             $this->out->menuItem(common_local_url('showfavorites', array('nickname' =>
-                                                                  $nickname)),
-                             _('Favorites'),
-                             sprintf(_('%s\'s favorite notices'), ($user_profile) ? $name : _('User')),
-                             $action == 'showfavorites', 'nav_timeline_favorites');
+                                                                         $nickname)),
+                                 _('Favorites'),
+                                 sprintf(_('%s\'s favorite notices'), ($user_profile) ? $name : _('User')),
+                                 $action == 'showfavorites', 'nav_timeline_favorites');
 
             $cur = common_current_user();
 
@@ -124,15 +119,15 @@ class PersonalGroupNav extends Widget
                 !common_config('singleuser', 'enabled')) {
 
                 $this->out->menuItem(common_local_url('inbox', array('nickname' =>
-                                                                         $nickname)),
-                                 _('Inbox'),
-                                 _('Your incoming messages'),
-                                 $action == 'inbox');
+                                                                     $nickname)),
+                                     _('Inbox'),
+                                     _('Your incoming messages'),
+                                     $action == 'inbox');
                 $this->out->menuItem(common_local_url('outbox', array('nickname' =>
-                                                                         $nickname)),
-                                 _('Outbox'),
-                                 _('Your sent messages'),
-                                 $action == 'outbox');
+                                                                      $nickname)),
+                                     _('Outbox'),
+                                     _('Your sent messages'),
+                                     $action == 'outbox');
             }
             Event::handle('EndPersonalGroupNav', array($this));
         }
index c3669868d4d3cb177401e1f1747b7f7c06cf6c0d..8c00054dcb6323441b8e7079b5839dd592c26940 100644 (file)
@@ -150,4 +150,17 @@ class SettingsAction extends CurrentUserDesignAction
         return '';
     }
 
+    /**
+     * Show the local navigation menu
+     *
+     * This is the same for all settings, so we show it here.
+     *
+     * @return void
+     */
+
+    function showLocalNav()
+    {
+        $menu = new SettingsNav($this);
+        $menu->show();
+    }
 }
diff --git a/lib/settingsnav.php b/lib/settingsnav.php
new file mode 100644 (file)
index 0000000..a73f73f
--- /dev/null
@@ -0,0 +1,132 @@
+<?php
+/**
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2010, StatusNet, Inc.
+ *
+ * Settings menu
+ * 
+ * PHP version 5
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category  Widget
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @copyright 2010 StatusNet, Inc.
+ * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
+ * @link      http://status.net/
+ */
+
+if (!defined('STATUSNET')) {
+    // This check helps protect against security problems;
+    // your code file can't be executed directly from the web.
+    exit(1);
+}
+
+/**
+ * A widget for showing the settings group local nav menu
+ *
+ * @category Widget
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
+ * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link     http://status.net/
+ *
+ * @see      HTMLOutputter
+ */
+
+class SettingsNav extends Widget
+{
+    var $action = null;
+
+    /**
+     * Construction
+     *
+     * @param Action $action current action, used for output
+     */
+    function __construct($action=null)
+    {
+        parent::__construct($action);
+        $this->action = $action;
+    }
+
+    /**
+     * Show the menu
+     *
+     * @return void
+     */
+
+    function show()
+    {
+        $actionName = $this->action->trimmed('action');
+        $this->action->elementStart('ul', array('class' => 'nav'));
+
+        if (Event::handle('StartAccountSettingsNav', array(&$this->action))) {
+            $this->action->menuItem(common_local_url('profilesettings'),
+                                    _('Profile'),
+                                    _('Change your profile settings'),
+                                    $actionName == 'profilesettings');
+
+            $this->action->menuItem(common_local_url('avatarsettings'),
+                                    _('Avatar'),
+                                    _('Upload an avatar'),
+                                    $actionName == 'avatarsettings');
+
+            $this->action->menuItem(common_local_url('passwordsettings'),
+                                    _('Password'),
+                                    _('Change your password'),
+                                    $actionName == 'passwordsettings');
+
+            $this->action->menuItem(common_local_url('emailsettings'),
+                                    _('Email'),
+                                    _('Change email handling'),
+                                    $actionName == 'emailsettings');
+
+            $this->action->menuItem(common_local_url('userdesignsettings'),
+                                    _('Design'),
+                                    _('Design your profile'),
+                                    $actionName == 'userdesignsettings');
+
+            $this->action->menuItem(common_local_url('urlsettings'),
+                                    _('URL'),
+                                    _('URL shorteners'),
+                                    $actionName == 'urlsettings');
+
+            Event::handle('EndAccountSettingsNav', array(&$this->action));
+        
+            if (common_config('xmpp', 'enabled')) {
+                $this->action->menuItem(common_local_url('imsettings'),
+                                        _m('IM'),
+                                        _('Updates by instant messenger (IM)'),
+                                        $actionName == 'imsettings');
+            }
+
+            if (common_config('sms', 'enabled')) {
+                $this->action->menuItem(common_local_url('smssettings'),
+                                        _m('SMS'),
+                                        _('Updates by SMS'),
+                                        $actionName == 'smssettings');
+            }
+
+            $this->action->menuItem(common_local_url('oauthconnectionssettings'),
+                                    _('Connections'),
+                                    _('Authorized connected applications'),
+                                    $actionName == 'oauthconnectionsettings');
+
+            Event::handle('EndConnectSettingsNav', array(&$this->action));
+        }
+
+        $this->action->elementEnd('ul');
+    }
+}
index 2748b59e1864a249e95217fe93d7b169c790322d..be3ba2748061f88993c36cc10ca7cb3af4ca4188 100644 (file)
@@ -76,6 +76,12 @@ class SubGroupNav extends Widget
 
         if (Event::handle('StartSubGroupNav', array($this))) {
 
+            $this->out->menuItem(common_local_url('showstream', array('nickname' =>
+                                                                      $this->user->nickname)),
+                                 _('Profile'),
+                                 (empty($profile)) ? $this->user->nickname : $profile->getBestName(),
+                                 $action == 'showstream',
+                                 'nav_profile');
             $this->out->menuItem(common_local_url('subscriptions',
                                                   array('nickname' =>
                                                         $this->user->nickname)),
index 701994d0d066a2f92f4aa398a013f0712edae04f..4043f666fa448e83d40fbb280da813169d1949be 100644 (file)
@@ -42,7 +42,7 @@ require_once INSTALLDIR.'/lib/connectsettingsaction.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-class FBConnectSettingsAction extends ConnectSettingsAction
+class FBSettingsAction extends ConnectSettingsAction
 {
     /**
      * Title of the page
index 14af21b5167491d7567716184b645784f67c7339..da55c8a6e28018b944568e9c39f6ba91b4810b3a 100644 (file)
@@ -150,7 +150,7 @@ class FacebookPlugin extends Plugin
             return false;
         case 'FBConnectAuthAction':
         case 'FBConnectLoginAction':
-        case 'FBConnectSettingsAction':
+        case 'FBSettingsAction':
         case 'FBC_XDReceiverAction':
             include_once INSTALLDIR . '/plugins/Facebook/' .
               mb_substr($cls, 0, -6) . '.php';
@@ -357,7 +357,7 @@ class FacebookPlugin extends Plugin
         // List of actions that require FB stuff
         $needy = array('FBConnectLoginAction',
                        'FBConnectauthAction',
-                       'FBConnectSettingsAction');
+                       'FBSettingsAction');
 
         if (in_array(get_class($action), $needy)) {
             return true;
index 6576e2041181a87bc07d9f7d9cee0e53ee8d664b..b9526c12693e65ba69022c18aeeaa1a8d5cf4ba9 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('STATUSNET')) {
  *
  * @see      SettingsAction
  */
-class FacebooksettingsAction extends ConnectSettingsAction {
+class FacebooksettingsAction extends SettingsAction {
     private $facebook; // Facebook PHP-SDK client obj
     private $flink;
     private $user;
index cdcea5cd928559c91f49cf5488a66ff2fd4fec46..4f0843e26c117a859097290501fbf1f5867b6586 100644 (file)
@@ -22,7 +22,6 @@
  *
  * @category  Sample
  * @package   StatusNet
- * @author    Brion Vibber <brionv@status.net>
  * @author    Evan Prodromou <evan@status.net>
  * @copyright 2010 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
@@ -43,393 +42,17 @@ if (!defined('STATUSNET')) {
  *
  * @category  NewMenu
  * @package   StatusNet
- * @author    Brion Vibber <brionv@status.net>
  * @author    Evan Prodromou <evan@status.net>
  * @copyright 2010 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
+
 class NewMenuPlugin extends Plugin
 {
-    public $loadCSS = false;
-
-    /**
-     * Load related modules when needed
-     *
-     * @param string $cls Name of the class to be loaded
-     *
-     * @return boolean hook value; true means continue processing, false means stop.
-     */
-
-    function onAutoload($cls)
-    {
-        $dir = dirname(__FILE__);
-
-        switch ($cls)
-        {
-        case 'HelloAction':
-            include_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
-            return false;
-        case 'User_greeting_count':
-            include_once $dir . '/'.$cls.'.php';
-            return false;
-        default:
-            return true;
-        }
-    }
-
-    /**
-     * Modify the default menu
-     *
-     * @param Action $action The current action handler. Use this to
-     *                       do any output.
-     *
-     * @return boolean hook value; true means continue processing, false means stop.
-     *
-     * @see Action
-     */
-
-    function onStartPrimaryNav($action)
-    {
-        $user = common_current_user();
-
-        if (!empty($user)) {
-            $action->menuItem(common_local_url('all', 
-                                               array('nickname' => $user->nickname)),
-                              _m('Home'),
-                              _m('Friends timeline'),
-                              false,
-                              'nav_home');
-            $action->menuItem(common_local_url('showstream', 
-                                               array('nickname' => $user->nickname)),
-                              _m('Profile'),
-                              _m('Your profile'),
-                              false,
-                              'nav_profile');
-            $action->menuItem(common_local_url('public'),
-                              _m('Public'),
-                              _m('Everyone on this site'),
-                              false,
-                              'nav_public');
-            $action->menuItem(common_local_url('profilesettings'),
-                              _m('Settings'),
-                              _m('Change your personal settings'),
-                              false,
-                              'nav_account');
-            if ($user->hasRight(Right::CONFIGURESITE)) {
-                $action->menuItem(common_local_url('siteadminpanel'),
-                                  _m('Admin'), 
-                                  _m('Site configuration'),
-                                  false,
-                                  'nav_admin');
-            }
-            $action->menuItem(common_local_url('logout'),
-                              _m('Logout'), 
-                              _m('Logout from the site'),
-                              false,
-                              'nav_logout');
-        } else {
-            $action->menuItem(common_local_url('public'),
-                              _m('Public'),
-                              _m('Everyone on this site'),
-                              false,
-                              'nav_public');
-            $action->menuItem(common_local_url('login'),
-                              _m('Login'), 
-                              _m('Login to the site'),
-                              false,
-                              'nav_login');
-        }
-
-        if (!empty($user) || !common_config('site', 'private')) {
-            $action->menuItem(common_local_url('noticesearch'),
-                              _m('Search'),
-                              _m('Search the site'),
-                              false,
-                              'nav_search');
-        }
-
-        Event::handle('EndPrimaryNav', array($action));
-
-        return false;
-    }
-
-    function onStartPersonalGroupNav($menu)
-    {
-        $user = null;
-
-        // FIXME: we should probably pass this in
-
-        $action = $menu->action->trimmed('action');
-        $nickname = $menu->action->trimmed('nickname');
-
-        if ($nickname) {
-            $user = User::staticGet('nickname', $nickname);
-            $user_profile = $user->getProfile();
-            $name = $user_profile->getBestName();
-        } else {
-            // @fixme can this happen? is this valid?
-            $user_profile = false;
-            $name = $nickname;
-        }
-
-        $menu->out->menuItem(common_local_url('all', array('nickname' =>
-                                                           $nickname)),
-                             _('Home'),
-                             sprintf(_('%s and friends'), $name),
-                             $action == 'all', 'nav_timeline_personal');
-        $menu->out->menuItem(common_local_url('replies', array('nickname' =>
-                                                               $nickname)),
-                             _('Replies'),
-                             sprintf(_('Replies to %s'), $name),
-                             $action == 'replies', 'nav_timeline_replies');
-        $menu->out->menuItem(common_local_url('showfavorites', array('nickname' =>
-                                                                     $nickname)),
-                             _('Favorites'),
-                             sprintf(_('%s\'s favorite notices'), ($user_profile) ? $name : _('User')),
-                             $action == 'showfavorites', 'nav_timeline_favorites');
-
-        $cur = common_current_user();
-
-        if ($cur && $cur->id == $user->id &&
-            !common_config('singleuser', 'enabled')) {
-
-            $menu->out->menuItem(common_local_url('inbox', array('nickname' =>
-                                                                 $nickname)),
-                                 _('Inbox'),
-                                 _('Your incoming messages'),
-                                 $action == 'inbox');
-            $menu->out->menuItem(common_local_url('outbox', array('nickname' =>
-                                                                  $nickname)),
-                                 _('Outbox'),
-                                 _('Your sent messages'),
-                                 $action == 'outbox');
-        }
-        Event::handle('EndPersonalGroupNav', array($menu));
-        return false;
-    }
-
-    function onStartSubGroupNav($menu)
-    {
-        $cur = common_current_user();
-        $action = $menu->action->trimmed('action');
-
-        $profile = $menu->user->getProfile();
-
-        $menu->out->menuItem(common_local_url('showstream', array('nickname' =>
-                                                                  $menu->user->nickname)),
-                             _('Profile'),
-                             (empty($profile)) ? $menu->user->nickname : $profile->getBestName(),
-                             $action == 'showstream',
-                             'nav_profile');
-        $menu->out->menuItem(common_local_url('subscriptions',
-                                              array('nickname' =>
-                                                    $menu->user->nickname)),
-                             _('Subscriptions'),
-                             sprintf(_('People %s subscribes to'),
-                                     $menu->user->nickname),
-                             $action == 'subscriptions',
-                             'nav_subscriptions');
-        $menu->out->menuItem(common_local_url('subscribers',
-                                              array('nickname' =>
-                                                    $menu->user->nickname)),
-                             _('Subscribers'),
-                             sprintf(_('People subscribed to %s'),
-                                     $menu->user->nickname),
-                             $action == 'subscribers',
-                             'nav_subscribers');
-        $menu->out->menuItem(common_local_url('usergroups',
-                                              array('nickname' =>
-                                                    $menu->user->nickname)),
-                             _('Groups'),
-                             sprintf(_('Groups %s is a member of'),
-                                     $menu->user->nickname),
-                             $action == 'usergroups',
-                             'nav_usergroups');
-        if (common_config('invite', 'enabled') && !is_null($cur) && $menu->user->id === $cur->id) {
-            $menu->out->menuItem(common_local_url('invite'),
-                                 _('Invite'),
-                                 sprintf(_('Invite friends and colleagues to join you on %s'),
-                                         common_config('site', 'name')),
-                                 $action == 'invite',
-                                 'nav_invite');
-        }
-
-        Event::handle('EndSubGroupNav', array($menu));
-        return false;
-    }
-
-    function onStartShowLocalNavBlock($action)
-    {
-        $actionName = $action->trimmed('action');
-        
-        if ($actionName == 'showstream') {
-            $action->elementStart('dl', array('id' => 'site_nav_local_views'));
-            // TRANS: DT element for local views block. String is hidden in default CSS.
-            $action->element('dt', null, _('Local views'));
-            $action->elementStart('dd');
-            $nav = new SubGroupNav($action, $action->user);
-            $nav->show();
-            $action->elementEnd('dd');
-            $action->elementEnd('dl');
-            Event::handle('EndShowLocalNavBlock', array($action));
-            return false;
-        }
-
-        return true;
-    }
-
-    function onStartAccountSettingsNav(&$action)
-    {
-        $this->_settingsMenu($action);
-        return false;
-    }
-
-    function onStartConnectSettingsNav(&$action)
-    {
-        $this->_settingsMenu($action);
-        return false;
-    }
-
-    private function _settingsMenu(&$action)
-    {
-        $actionName = $action->trimmed('action');
-
-        $action->menuItem(common_local_url('profilesettings'),
-                          _('Profile'),
-                          _('Change your profile settings'),
-                          $actionName == 'profilesettings');
-
-        $action->menuItem(common_local_url('avatarsettings'),
-                          _('Avatar'),
-                          _('Upload an avatar'),
-                          $actionName == 'avatarsettings');
-
-        $action->menuItem(common_local_url('passwordsettings'),
-                          _('Password'),
-                          _('Change your password'),
-                          $actionName == 'passwordsettings');
-
-        $action->menuItem(common_local_url('emailsettings'),
-                          _('Email'),
-                          _('Change email handling'),
-                          $actionName == 'emailsettings');
-
-        $action->menuItem(common_local_url('userdesignsettings'),
-                          _('Design'),
-                          _('Design your profile'),
-                          $actionName == 'userdesignsettings');
-
-        $action->menuItem(common_local_url('othersettings'),
-                          _('Other'),
-                          _('Other options'),
-                          $actionName == 'othersettings');
-
-        Event::handle('EndAccountSettingsNav', array(&$action));
-        
-        if (common_config('xmpp', 'enabled')) {
-            $action->menuItem(common_local_url('imsettings'),
-                              _m('IM'),
-                              _('Updates by instant messenger (IM)'),
-                              $actionName == 'imsettings');
-        }
-
-        if (common_config('sms', 'enabled')) {
-            $action->menuItem(common_local_url('smssettings'),
-                              _m('SMS'),
-                              _('Updates by SMS'),
-                              $actionName == 'smssettings');
-        }
-
-        $action->menuItem(common_local_url('oauthconnectionssettings'),
-                          _('Connections'),
-                          _('Authorized connected applications'),
-                          $actionName == 'oauthconnectionsettings');
-
-        Event::handle('EndConnectSettingsNav', array(&$action));
-    }
-
-    function onEndShowStyles($action)
-    {
-        if (($this->showCSS ||
-             in_array(common_config('site', 'theme'),
-                      array('default', 'identica', 'h4ck3r'))) &&
-            ($action instanceof AccountSettingsAction ||
-             $action instanceof ConnectSettingsAction)) {
-            $action->cssLink(common_path('plugins/NewMenu/newmenu.css'));
-        }
-        return true;
-    }
-
-    function onStartAddressData($action)
-    {
-        if (common_config('singleuser', 'enabled')) {
-            $user = User::singleUser();
-            $url = common_local_url('showstream',
-                                    array('nickname' => $user->nickname));
-        } else if (common_logged_in()) {
-            $cur = common_current_user();
-            $url = common_local_url('all', array('nickname' => $cur->nickname));
-        } else {
-            $url = common_local_url('public');
-        }
-
-        $action->elementStart('a', array('class' => 'url home bookmark',
-                                         'href' => $url));
-
-        if (StatusNet::isHTTPS()) {
-            $logoUrl = common_config('site', 'ssllogo');
-            if (empty($logoUrl)) {
-                // if logo is an uploaded file, try to fall back to HTTPS file URL
-                $httpUrl = common_config('site', 'logo');
-                if (!empty($httpUrl)) {
-                    $f = File::staticGet('url', $httpUrl);
-                    if (!empty($f) && !empty($f->filename)) {
-                        // this will handle the HTTPS case
-                        $logoUrl = File::url($f->filename);
-                    }
-                }
-            }
-        } else {
-            $logoUrl = common_config('site', 'logo');
-        }
-
-        if (empty($logoUrl) && file_exists(Theme::file('logo.png'))) {
-            // This should handle the HTTPS case internally
-            $logoUrl = Theme::path('logo.png');
-        }
-
-        if (!empty($logoUrl)) {
-            $action->element('img', array('class' => 'logo photo',
-                                          'src' => $logoUrl,
-                                          'alt' => common_config('site', 'name')));
-        }
-
-        $action->text(' ');
-        $action->element('span', array('class' => 'fn org'), common_config('site', 'name'));
-        $action->elementEnd('a');
-
-        Event::handle('EndAddressData', array($action));
-        return false;
-    }
-
-    /**
-     * Return version information for this plugin
-     *
-     * @param array &$versions Version info; add to this array
-     *
-     * @return boolean hook value
-     */
-
-    function onPluginVersion(&$versions)
+    function __construct()
     {
-        $versions[] = array('name' => 'NewMenu',
-                            'version' => STATUSNET_VERSION,
-                            'author' => 'Evan Prodromou',
-                            'homepage' => 'http://status.net/wiki/Plugin:NewMenu',
-                            'description' =>
-                            _m('A preview of the new menu '.
-                               'layout in StatusNet 1.0.'));
-        return true;
+        // NOOP! No hooks, no nothin'.
+        return;
     }
 }
diff --git a/plugins/NewMenu/newmenu.css b/plugins/NewMenu/newmenu.css
deleted file mode 100644 (file)
index f700fdc..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-body[id$=settings] #site_nav_local_views {
-position:relative;
-z-index:9;
-float:right;
-margin-right:10.65%;
-width:22.25%;
-}
-body[id$=settings] #site_nav_local_views li {
-width:100%;
-margin-right:0;
-margin-bottom:7px;
-}
-body[id$=settings] #site_nav_local_views a {
-display:block;
-width:80%;
-padding-right:10%;
-padding-left:10%;
-border-radius-toprleft:0;
--moz-border-radius-topleft:0;
--webkit-border-top-left-radius:0;
-border-radius-topright:4px;
--moz-border-radius-topright:4px;
--webkit-border-top-right-radius:4px;
-border-radius-bottomright:4px;
--moz-border-radius-bottomright:4px;
--webkit-border-bottom-right-radius:4px;
-}
-body[id$=settings] #site_nav_local_views li.current {
-box-shadow:none;
--moz-box-shadow:none;
--webkit-box-shadow:none;
-}
-
-body[id$=settings] #content {
-border-radius-topleft:7px;
-border-radius-topright:7px;
--moz-border-radius-topleft:7px;
--moz-border-radius-topright:7px;
--webkit-border-top-left-radius:7px;
--webkit-border-top-right-radius:7px;
-border-radius-topright:0;
--moz-border-radius-topright:0;
--webkit-border-top-right-radius:0;
-}
-body[id$=settings] #aside_primary {
-display:none;
-}
index b7d5bd084d10142a86c8c8740ef90af025d8635c..1eb6aadb8c8c26323572ee08a003aee528a7a9d1 100644 (file)
@@ -45,7 +45,7 @@ require_once INSTALLDIR.'/plugins/OpenID/openid.php';
  * @link     http://status.net/
  */
 
-class OpenidsettingsAction extends AccountSettingsAction
+class OpenidsettingsAction extends SettingsAction
 {
     /**
      * Title of the page
index a828b26feb68b07399662f83904f399af1a0cd8b..5151574c56748bdcbf6570daff9452336e53ce0c 100644 (file)
@@ -29,7 +29,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-class MirrorSettingsAction extends AccountSettingsAction
+class MirrorSettingsAction extends SettingsAction
 {
     /**
      * Title of the page
index c169172b0000f980c80137fabf130ad0975473c5..da421cb37a7ccbb7acb8936c37b767900d6fb75b 100644 (file)
@@ -45,7 +45,7 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
  *
  * @see      SettingsAction
  */
-class TwittersettingsAction extends ConnectSettingsAction
+class TwittersettingsAction extends SettingsAction
 {
     /**
      * Title of the page
index d35a8a706ed9d030041b91e0cca2be20133d80d9..383b9c6ec261adf536864733e7125fa7ccf26d9f 100644 (file)
@@ -94,6 +94,55 @@ list-style-type:none;
 form label.submit {
 display:none;
 }
+
+body[id$=settings] #site_nav_local_views {
+position:relative;
+z-index:9;
+float:right;
+margin-right:10.65%;
+width:22.25%;
+}
+body[id$=settings] #site_nav_local_views li {
+width:100%;
+margin-right:0;
+margin-bottom:7px;
+}
+body[id$=settings] #site_nav_local_views a {
+display:block;
+width:80%;
+padding-right:10%;
+padding-left:10%;
+border-radius-toprleft:0;
+-moz-border-radius-topleft:0;
+-webkit-border-top-left-radius:0;
+border-radius-topright:4px;
+-moz-border-radius-topright:4px;
+-webkit-border-top-right-radius:4px;
+border-radius-bottomright:4px;
+-moz-border-radius-bottomright:4px;
+-webkit-border-bottom-right-radius:4px;
+}
+body[id$=settings] #site_nav_local_views li.current {
+box-shadow:none;
+-moz-box-shadow:none;
+-webkit-box-shadow:none;
+}
+
+body[id$=settings] #content {
+border-radius-topleft:7px;
+border-radius-topright:7px;
+-moz-border-radius-topleft:7px;
+-moz-border-radius-topright:7px;
+-webkit-border-top-left-radius:7px;
+-webkit-border-top-right-radius:7px;
+border-radius-topright:0;
+-moz-border-radius-topright:0;
+-webkit-border-top-right-radius:0;
+}
+body[id$=settings] #aside_primary {
+display:none;
+}
+
 .form_settings {
 clear:both;
 }