summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EVENTS.txt6
-rw-r--r--actions/usergroups.php30
-rw-r--r--plugins/OStatus/OStatusPlugin.php7
-rw-r--r--plugins/OStatus/theme/base/css/ostatus.css6
4 files changed, 31 insertions, 18 deletions
diff --git a/EVENTS.txt b/EVENTS.txt
index 47c67512a..2da6f3da6 100644
--- a/EVENTS.txt
+++ b/EVENTS.txt
@@ -778,6 +778,12 @@ StartShowSubscriptionsContent: before showing the subscriptions content
EndShowSubscriptionsContent: after showing the subscriptions content
- $action: the current action
+StartShowUserGroupsContent: before showing the user groups content
+- $action: the current action
+
+EndShowUserGroupsContent: after showing the user groups content
+- $action: the current action
+
StartShowAllContent: before showing the all (you and friends) content
- $action: the current action
diff --git a/actions/usergroups.php b/actions/usergroups.php
index 97faabae6..29bda0a76 100644
--- a/actions/usergroups.php
+++ b/actions/usergroups.php
@@ -130,22 +130,26 @@ class UsergroupsAction extends OwnerDesignAction
_('Search for more groups'));
$this->elementEnd('p');
- $offset = ($this->page-1) * GROUPS_PER_PAGE;
- $limit = GROUPS_PER_PAGE + 1;
+ if (Event::handle('StartShowUserGroupsContent', array($this))) {
+ $offset = ($this->page-1) * GROUPS_PER_PAGE;
+ $limit = GROUPS_PER_PAGE + 1;
+
+ $groups = $this->user->getGroups($offset, $limit);
+
+ if ($groups) {
+ $gl = new GroupList($groups, $this->user, $this);
+ $cnt = $gl->show();
+ if (0 == $cnt) {
+ $this->showEmptyListMessage();
+ }
+ }
- $groups = $this->user->getGroups($offset, $limit);
+ $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE,
+ $this->page, 'usergroups',
+ array('nickname' => $this->user->nickname));
- if ($groups) {
- $gl = new GroupList($groups, $this->user, $this);
- $cnt = $gl->show();
- if (0 == $cnt) {
- $this->showEmptyListMessage();
- }
+ Event::handle('EndShowUserGroupsContent', array($this));
}
-
- $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE,
- $this->page, 'usergroups',
- array('nickname' => $this->user->nickname));
}
function showEmptyListMessage()
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index da7ca2fe2..dc502e52c 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -729,6 +729,13 @@ class OStatusPlugin extends Plugin
return true;
}
+ function onStartShowUserGroupsContent($action)
+ {
+ $this->showEntityRemoteSubscribe($action);
+
+ return true;
+ }
+
function onEndShowSubscriptionsMiniList($action)
{
$this->showEntityRemoteSubscribe($action);
diff --git a/plugins/OStatus/theme/base/css/ostatus.css b/plugins/OStatus/theme/base/css/ostatus.css
index d1c60cc0d..3b8928a3a 100644
--- a/plugins/OStatus/theme/base/css/ostatus.css
+++ b/plugins/OStatus/theme/base/css/ostatus.css
@@ -41,9 +41,6 @@ min-width:96px;
#entity_remote_subscribe {
padding:0;
float:right;
-}
-
-.section #entity_remote_subscribe {
position:relative;
}
@@ -55,11 +52,10 @@ margin-bottom:0;
border-color:#AAAAAA;
}
-.section #entity_remote_subscribe .dialogbox {
+#entity_remote_subscribe .dialogbox {
width:405px;
}
-
.aside #entity_subscriptions .more {
float:left;
}