summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Facebook/FacebookPlugin.php10
-rw-r--r--plugins/MobileProfile/MobileProfilePlugin.php11
-rw-r--r--plugins/OStatus/OStatusPlugin.php39
-rw-r--r--plugins/OStatus/theme/base/css/ostatus.css3
4 files changed, 38 insertions, 25 deletions
diff --git a/plugins/Facebook/FacebookPlugin.php b/plugins/Facebook/FacebookPlugin.php
index 90ed7351f..65d4409b5 100644
--- a/plugins/Facebook/FacebookPlugin.php
+++ b/plugins/Facebook/FacebookPlugin.php
@@ -436,16 +436,7 @@ class FacebookPlugin extends Plugin
function onStartPrimaryNav($action)
{
if (self::hasKeys()) {
-
$user = common_current_user();
-
- $connect = 'FBConnectSettings';
- if (common_config('xmpp', 'enabled')) {
- $connect = 'imsettings';
- } else if (common_config('sms', 'enabled')) {
- $connect = 'smssettings';
- }
-
if (!empty($user)) {
$fbuid = $this->loggedIn();
@@ -472,7 +463,6 @@ class FacebookPlugin extends Plugin
'src' => $iconurl));
$action->elementEnd('li');
-
}
}
}
diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php
index f788639ae..0b37734b7 100644
--- a/plugins/MobileProfile/MobileProfilePlugin.php
+++ b/plugins/MobileProfile/MobileProfilePlugin.php
@@ -307,23 +307,14 @@ class MobileProfilePlugin extends WAP20Plugin
function _showPrimaryNav($action)
{
$user = common_current_user();
- $connect = '';
- if (common_config('xmpp', 'enabled')) {
- $connect = 'imsettings';
- } else if (common_config('sms', 'enabled')) {
- $connect = 'smssettings';
- }
-
$action->elementStart('ul', array('id' => 'site_nav_global_primary'));
if ($user) {
$action->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
_('Home'));
$action->menuItem(common_local_url('profilesettings'),
_('Account'));
- if ($connect) {
- $action->menuItem(common_local_url($connect),
+ $action->menuItem(common_local_url('oauthconnectionssettings'),
_('Connect'));
- }
if ($user->hasRight(Right::CONFIGURESITE)) {
$action->menuItem(common_local_url('siteadminpanel'),
_('Admin'), _('Change site configuration'), false, 'nav_admin');
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index 95414e517..da7ca2fe2 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -111,11 +111,11 @@ class OStatusPlugin extends Plugin
$acct = 'acct:'. $action->profile->nickname .'@'. common_config('site', 'server');
$url = common_local_url('xrd');
$url.= '?uri='. $acct;
-
+
header('Link: <'.$url.'>; rel="'. Discovery::LRDD_REL.'"; type="application/xrd+xml"');
}
}
-
+
/**
* Set up a PuSH hub link to our internal link for canonical timeline
* Atom feeds for users and groups.
@@ -229,7 +229,6 @@ class OStatusPlugin extends Plugin
return false;
}
-
/**
* Check if we've got remote replies to send via Salmon.
*
@@ -587,7 +586,6 @@ class OStatusPlugin extends Plugin
// Drop the PuSH subscription if there are no other subscribers.
$oprofile->garbageCollect();
-
$member = Profile::staticGet($user->id);
$act = new Activity();
@@ -738,6 +736,13 @@ class OStatusPlugin extends Plugin
return true;
}
+ function onEndShowGroupsMiniList($action)
+ {
+ $this->showEntityRemoteSubscribe($action);
+
+ return true;
+ }
+
function showEntityRemoteSubscribe($action)
{
$user = common_current_user();
@@ -747,7 +752,7 @@ class OStatusPlugin extends Plugin
'class' => 'entity_subscribe'));
$action->element('a', array('href' => common_local_url('ostatussub'),
'class' => 'entity_remote_subscribe')
- , _m('New'));
+ , _m('Remote'));
$action->elementEnd('p');
$action->elementEnd('div');
}
@@ -799,4 +804,28 @@ class OStatusPlugin extends Plugin
return true;
}
+
+ function onStartProfileListItemActionElements($item)
+ {
+ if (!common_logged_in()) {
+
+ $profileUser = User::staticGet('id', $item->profile->id);
+
+ if (!empty($profileUser)) {
+
+ $output = $item->out;
+
+ // Add an OStatus subscribe
+ $output->elementStart('li', 'entity_subscribe');
+ $url = common_local_url('ostatusinit',
+ array('nickname' => $profileUser->nickname));
+ $output->element('a', array('href' => $url,
+ 'class' => 'entity_remote_subscribe'),
+ _m('Subscribe'));
+ $output->elementEnd('li');
+ }
+ }
+
+ return true;
+ }
}
diff --git a/plugins/OStatus/theme/base/css/ostatus.css b/plugins/OStatus/theme/base/css/ostatus.css
index 40cdfcef1..d1c60cc0d 100644
--- a/plugins/OStatus/theme/base/css/ostatus.css
+++ b/plugins/OStatus/theme/base/css/ostatus.css
@@ -41,6 +41,9 @@ min-width:96px;
#entity_remote_subscribe {
padding:0;
float:right;
+}
+
+.section #entity_remote_subscribe {
position:relative;
}