summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-10-12 12:31:14 -0700
committerZach Copley <zach@status.net>2009-10-12 12:31:14 -0700
commite071a8cbffd8eaf63f2d92e15edc2f6f25d9c984 (patch)
tree6c5ceb667b9d31118682417b7a9dbb183331dc5b /plugins
parent061af8fa06ccb98f667d1ee670da2dbb179d8b0e (diff)
parentf719720e8ad3b09d664e33172bafef2b0fb91eea (diff)
Moved group create API into its own action
Merge branch '0.9.x' into refactor-api * 0.9.x: Implemented create group api fix FBConnect so it doesn't muffle EndPrimaryNav don't write session if it's unchanged Fixed facebook connect primary nav to hide search option when site is private and user is not logged in Fixed facebook connect primary nav to obey sms/twitter/openid settings Fixed facebook connect login nav to obey openid settings Fixed facebook connect nav to obey sms/twitter disabled Fixed twitter defaulting to disabled Revert "Open tags should have closing tags" Don't show search suggestions for private sites Fixed E_NOTICE when returnto isn't set Fixed E_NOTICE when the "lite" parameter isn't included in the request Fixed E_NOTICE - GroupList expects an owner object in the constructor, not an array of search terms Returning false seems to fix IE from reclaiming window focus. I think Aligning notice attach label from right instead of left Fixed IE background image alignment for attach, favour and disfavour Fixed nudge and direct message background image alignment Using 'CSS sprites' for common icons for the identica theme. Default Open tags should have closing tags Conflicts: actions/twitapigroups.php actions/twitapistatuses.php
Diffstat (limited to 'plugins')
-rw-r--r--plugins/FBConnect/FBCLoginGroupNav.php20
-rw-r--r--plugins/FBConnect/FBCSettingsNav.php42
-rw-r--r--plugins/FBConnect/FBConnectPlugin.php43
-rw-r--r--plugins/Realtime/realtimeupdate.js2
4 files changed, 65 insertions, 42 deletions
diff --git a/plugins/FBConnect/FBCLoginGroupNav.php b/plugins/FBConnect/FBCLoginGroupNav.php
index 6e12c2040..81b2520a4 100644
--- a/plugins/FBConnect/FBCLoginGroupNav.php
+++ b/plugins/FBConnect/FBCLoginGroupNav.php
@@ -78,16 +78,20 @@ class FBCLoginGroupNav extends Widget
// action => array('prompt', 'title')
$menu = array();
- $menu['login'] = array(_('Login'),
- _('Login with a username and password'));
-
- if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
- $menu['register'] = array(_('Register'),
- _('Sign up for a new account'));
+ if (!common_config('site','openidonly')) {
+ $menu['login'] = array(_('Login'),
+ _('Login with a username and password'));
+
+ if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
+ $menu['register'] = array(_('Register'),
+ _('Sign up for a new account'));
+ }
}
- $menu['openidlogin'] = array(_('OpenID'),
- _('Login or register with OpenID'));
+ if (common_config('openid', 'enabled')) {
+ $menu['openidlogin'] = array(_('OpenID'),
+ _('Login or register with OpenID'));
+ }
$menu['FBConnectLogin'] = array(_('Facebook'),
_('Login or register using Facebook'));
diff --git a/plugins/FBConnect/FBCSettingsNav.php b/plugins/FBConnect/FBCSettingsNav.php
index 29724d6bd..ed02371e2 100644
--- a/plugins/FBConnect/FBCSettingsNav.php
+++ b/plugins/FBConnect/FBCSettingsNav.php
@@ -77,32 +77,34 @@ class FBCSettingsNav extends Widget
$this->action->elementStart('dd');
# action => array('prompt', 'title')
- $menu =
- array('imsettings' =>
- array(_('IM'),
- _('Updates by instant messenger (IM)')),
- 'smssettings' =>
- array(_('SMS'),
- _('Updates by SMS')),
- 'twittersettings' =>
- array(_('Twitter'),
- _('Twitter integration options')),
- 'FBConnectSettings' =>
- array(_('Facebook'),
- _('Facebook Connect settings')));
+ $menu = array();
+ if (common_config('xmpp', 'enabled')) {
+ $menu['imsettings'] =
+ array(_('IM'),
+ _('Updates by instant messenger (IM)'));
+ }
+ if (common_config('sms', 'enabled')) {
+ $menu['smssettings'] =
+ array(_('SMS'),
+ _('Updates by SMS'));
+ }
+ if (common_config('twitter', 'enabled')) {
+ $menu['twittersettings'] =
+ array(_('Twitter'),
+ _('Twitter integration options'));
+ }
+ $menu['FBConnectSettings'] =
+ array(_('Facebook'),
+ _('Facebook Connect settings'));
$action_name = $this->action->trimmed('action');
$this->action->elementStart('ul', array('class' => 'nav'));
foreach ($menu as $menuaction => $menudesc) {
- if ($menuaction == 'imsettings' &&
- !common_config('xmpp', 'enabled')) {
- continue;
- }
$this->action->menuItem(common_local_url($menuaction),
- $menudesc[0],
- $menudesc[1],
- $action_name === $menuaction);
+ $menudesc[0],
+ $menudesc[1],
+ $action_name === $menuaction);
}
$this->action->elementEnd('ul');
diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php
index 593b49b4e..ff74aade4 100644
--- a/plugins/FBConnect/FBConnectPlugin.php
+++ b/plugins/FBConnect/FBConnectPlugin.php
@@ -232,6 +232,14 @@ class FBConnectPlugin extends Plugin
{
$user = common_current_user();
+ $connect = 'FBConnectSettings';
+ if (common_config('xmpp', 'enabled')) {
+ $connect = 'imsettings';
+ } else if (common_config('sms', 'enabled')) {
+ $connect = 'smssettings';
+ } else if (common_config('twitter', 'enabled')) {
+ $connect = 'twittersettings';
+ }
if (!empty($user)) {
@@ -266,13 +274,8 @@ class FBConnectPlugin extends Plugin
_('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
$action->menuItem(common_local_url('profilesettings'),
_('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
- if (common_config('xmpp', 'enabled')) {
- $action->menuItem(common_local_url('imsettings'),
- _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect');
- } else {
- $action->menuItem(common_local_url('smssettings'),
- _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
- }
+ $action->menuItem(common_local_url($connect),
+ _('Connect'), _('Connect to services'), false, 'nav_connect');
if (common_config('invite', 'enabled')) {
$action->menuItem(common_local_url('invite'),
_('Invite'),
@@ -300,18 +303,30 @@ class FBConnectPlugin extends Plugin
}
}
else {
- if (!common_config('site', 'closed')) {
- $action->menuItem(common_local_url('register'),
- _('Register'), _('Create an account'), false, 'nav_register');
+ if (!common_config('site', 'openidonly')) {
+ if (!common_config('site', 'closed')) {
+ $action->menuItem(common_local_url('register'),
+ _('Register'), _('Create an account'), false, 'nav_register');
+ }
+ $action->menuItem(common_local_url('login'),
+ _('Login'), _('Login to the site'), false, 'nav_login');
+ } else {
+ $this->menuItem(common_local_url('openidlogin'),
+ _('OpenID'), _('Login with OpenID'), false, 'nav_openid');
}
- $action->menuItem(common_local_url('login'),
- _('Login'), _('Login to the site'), false, 'nav_login');
}
$action->menuItem(common_local_url('doc', array('title' => 'help')),
_('Help'), _('Help me!'), false, 'nav_help');
- $action->menuItem(common_local_url('peoplesearch'),
- _('Search'), _('Search for people or text'), false, 'nav_search');
+ if ($user || !common_config('site', 'private')) {
+ $action->menuItem(common_local_url('peoplesearch'),
+ _('Search'), _('Search for people or text'), false, 'nav_search');
+ }
+
+ // We are replacing the primary nav entirely; give other
+ // plugins a chance to handle it here.
+
+ Event::handle('EndPrimaryNav', array($action));
return false;
}
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index 11e466325..a75f17d8c 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -25,6 +25,8 @@ RealtimeUpdate = {
'border-top-color':'#AAAAAA',
'border-top-style':'solid'
});
+
+ return false;
});
},