]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add an event for group members minilist
authorEvan Prodromou <evan@status.net>
Mon, 5 Apr 2010 14:12:27 +0000 (10:12 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 5 Apr 2010 14:12:27 +0000 (10:12 -0400)
actions/showgroup.php

index a0d05ba37a39f62c3861502968e5d89db53ecddc..6e06666909a10b31831859334e1fd4659cbe4eb3 100644 (file)
@@ -388,18 +388,23 @@ class ShowgroupAction extends GroupDesignAction
         $this->elementStart('div', array('id' => 'entity_members',
                                          'class' => 'section'));
 
-        $this->element('h2', null, _('Members'));
+        if (Event::handle('StartShowGroupMembersMiniList', array($this))) {
 
-        $pml = new ProfileMiniList($member, $this);
-        $cnt = $pml->show();
-        if ($cnt == 0) {
-             $this->element('p', null, _('(None)'));
-        }
+            $this->element('h2', null, _('Members'));
+
+            $pml = new ProfileMiniList($member, $this);
+            $cnt = $pml->show();
+            if ($cnt == 0) {
+                $this->element('p', null, _('(None)'));
+            }
+
+            if ($cnt > MEMBERS_PER_SECTION) {
+                $this->element('a', array('href' => common_local_url('groupmembers',
+                                                                     array('nickname' => $this->group->nickname))),
+                               _('All members'));
+            }
 
-        if ($cnt > MEMBERS_PER_SECTION) {
-            $this->element('a', array('href' => common_local_url('groupmembers',
-                                                                 array('nickname' => $this->group->nickname))),
-                           _('All members'));
+            Event::handle('EndShowGroupMembersMiniList', array($this));
         }
 
         $this->elementEnd('div');