From 88c33bbb57433b3f10407f590b49d11ec4d5d530 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 2 Mar 2010 12:35:27 -0500 Subject: [PATCH] Showing remote subscription button on the personal timeline --- plugins/OStatus/OStatusPlugin.php | 18 ++++++++++++++++++ plugins/OStatus/theme/base/css/ostatus.css | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 4ffbba45b9..64504547f4 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -721,6 +721,24 @@ class OStatusPlugin extends Plugin return true; } + function onStartShowAllContent($action) + { + $user = common_current_user(); + if ($user && ($user->id == $action->profile->id)) { + $action->elementStart('div', 'entity_actions'); + $action->elementStart('p', array('id' => 'entity_remote_subscribe', + 'class' => 'entity_subscribe')); + $action->element('a', array('href' => common_local_url('ostatussub'), + 'class' => 'entity_remote_subscribe') + , _m('Subscribe to remote user')); + $action->elementEnd('p'); + $action->elementEnd('div'); + } + + return true; + } + + /** * Ping remote profiles with updates to this profile. * Salmon pings are queued for background processing. diff --git a/plugins/OStatus/theme/base/css/ostatus.css b/plugins/OStatus/theme/base/css/ostatus.css index e370810af7..68470f4e41 100644 --- a/plugins/OStatus/theme/base/css/ostatus.css +++ b/plugins/OStatus/theme/base/css/ostatus.css @@ -46,3 +46,7 @@ float:right; .entity_remote_subscribe { float:right; } + +#all #entity_remote_subscribe { +margin-top:-52px; +} -- 2.39.5