summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EVENTS.txt65
-rw-r--r--actions/groupmembers.php9
-rw-r--r--extlib/DB/DataObject.php2
-rw-r--r--extlib/DB/DataObject/Cast.php8
-rw-r--r--extlib/DB/DataObject/Error.php8
-rw-r--r--lib/profilelist.php62
6 files changed, 129 insertions, 25 deletions
diff --git a/EVENTS.txt b/EVENTS.txt
index 9de2f8bc6..5d34a9e13 100644
--- a/EVENTS.txt
+++ b/EVENTS.txt
@@ -390,3 +390,68 @@ EndProfilePageProfileTags: after showing the tags on the profile page
- $action: the current action
- &$profile: the profile being shown
+StartProfileList: when starting a list of profiles (before <ul>)
+- $profilelist: ProfileList widget, with $profile, $action, and $out
+
+EndProfileList: when ending a list of profiles (after </ul>)
+- $profilelist: ProfileList widget
+
+StartProfileListItem: when starting to show a profile list item
+- $item: ProfileListItem widget
+
+EndProfileListItem: after showing a profile list item
+- $item: ProfileListItem widget
+
+StartProfileListItemProfile: the profile data part of the item
+- $item: ProfileListItem widget
+
+EndProfileListItemProfile: the profile data part of the item
+- $item: ProfileListItem widget
+
+StartProfileListItemActions: the actions (buttons) for an item
+- $item: ProfileListItem widget
+
+EndProfileListItemActions: the actions (buttons) for an item
+- $item: ProfileListItem widget
+
+StartProfileListItemProfileElements: inside the <div>
+- $item: ProfileListItem widget
+
+EndProfileListItemProfileElements: inside the <div>
+- $item: ProfileListItem widget
+
+StartProfileListItemAvatar: Showing a profile list avatar
+- $item: ProfileListItem widget
+
+EndProfileListItemAvatar: Showing a profile list avatar
+- $item: ProfileListItem widget
+
+StartProfileListItemFullName: Showing the profile list full name
+- $item: ProfileListItem widget
+
+EndProfileListItemFullName: Showing the profile list full name
+- $item: ProfileListItem widget
+
+StartProfileListItemLocation: Showing the profile list location
+- $item: ProfileListItem widget
+
+EndProfileListItemLocation: Showing the profile list location
+- $item: ProfileListItem widget
+
+StartProfileListItemHomepage: Showing the profile list homepage
+- $item: ProfileListItem widget
+
+EndProfileListItemHomepage: Showing the profile list homepage
+- $item: ProfileListItem widget
+
+StartProfileListItemBio: Showing the profile list bio
+- $item: ProfileListItem widget
+
+EndProfileListItemBio: Showing the profile list bio
+- $item: ProfileListItem widget
+
+StartProfileListItemActionElements: Showing the profile list actions (prepend a button here, or replace all buttons)
+- $item: ProfileListItem widget
+
+EndProfileListItemActionElements: Showing profile list actions (append a button here)
+- $item: ProfileListItem widget
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index dcbdd3759..b326a0df7 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -179,9 +179,12 @@ class GroupMemberListItem extends ProfileListItem
function showActions()
{
$this->startActions();
- $this->showSubscribeButton();
- $this->showMakeAdminForm();
- $this->showGroupBlockForm();
+ if (Event::handle('StartProfileListItemActionElements', array($this))) {
+ $this->showSubscribeButton();
+ $this->showMakeAdminForm();
+ $this->showGroupBlockForm();
+ Event::handle('EndProfileListItemActionElements', array($this));
+ }
$this->endActions();
}
diff --git a/extlib/DB/DataObject.php b/extlib/DB/DataObject.php
index 8e226b8fa..60ff1441b 100644
--- a/extlib/DB/DataObject.php
+++ b/extlib/DB/DataObject.php
@@ -235,7 +235,7 @@ class DB_DataObject extends DB_DataObject_Overload
* @access private
* @var string
*/
- var $_DB_DataObject_version = "1.8.11";
+ var $_DB_DataObject_version = "1.8.12";
/**
* The Database table (used by table extends)
diff --git a/extlib/DB/DataObject/Cast.php b/extlib/DB/DataObject/Cast.php
index 095d2a4d2..2049beb58 100644
--- a/extlib/DB/DataObject/Cast.php
+++ b/extlib/DB/DataObject/Cast.php
@@ -6,9 +6,9 @@
*
* PHP versions 4 and 5
*
- * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt. If you did not receive a copy of
+ * http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
@@ -16,8 +16,8 @@
* @package DB_DataObject
* @author Alan Knowles <alan@akbkhome.com>
* @copyright 1997-2008 The PHP Group
- * @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Cast.php 264148 2008-08-04 03:44:59Z alan_k $
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: Cast.php 287158 2009-08-12 13:58:31Z alan_k $
* @link http://pear.php.net/package/DB_DataObject
*/
diff --git a/extlib/DB/DataObject/Error.php b/extlib/DB/DataObject/Error.php
index 382115453..cdb863d83 100644
--- a/extlib/DB/DataObject/Error.php
+++ b/extlib/DB/DataObject/Error.php
@@ -7,9 +7,9 @@
*
* PHP versions 4 and 5
*
- * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt. If you did not receive a copy of
+ * http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
@@ -17,8 +17,8 @@
* @package DB_DataObject
* @author Alan Knowles <alan@akbkhome.com>
* @copyright 1997-2006 The PHP Group
- * @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Error.php 277015 2009-03-12 05:51:03Z alan_k $
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: Error.php 287158 2009-08-12 13:58:31Z alan_k $
* @link http://pear.php.net/package/DB_DataObject
*/
diff --git a/lib/profilelist.php b/lib/profilelist.php
index 331430b3e..5cc211e36 100644
--- a/lib/profilelist.php
+++ b/lib/profilelist.php
@@ -62,9 +62,15 @@ class ProfileList extends Widget
function show()
{
- $this->startList();
- $cnt = $this->showProfiles();
- $this->endList();
+ $cnt = 0;
+
+ if (Event::handle('StartProfileList', array($this))) {
+ $this->startList();
+ $cnt = $this->showProfiles();
+ $this->endList();
+ Event::handle('EndProfileList', array($this));
+ }
+
return $cnt;
}
@@ -117,10 +123,19 @@ class ProfileListItem extends Widget
function show()
{
- $this->startItem();
- $this->showProfile();
- $this->showActions();
- $this->endItem();
+ if (Event::handle('StartProfileListItem', array($this))) {
+ $this->startItem();
+ if (Event::handle('StartProfileListItemProfile', array($this))) {
+ $this->showProfile();
+ Event::handle('EndProfileListItemProfile', array($this));
+ }
+ if (Event::handle('StartProfileListItemActions', array($this))) {
+ $this->showActions();
+ Event::handle('EndProfileListItemActions', array($this));
+ }
+ $this->endItem();
+ Event::handle('EndProfileListItem', array($this));
+ }
}
function startItem()
@@ -132,11 +147,29 @@ class ProfileListItem extends Widget
function showProfile()
{
$this->startProfile();
- $this->showAvatar();
- $this->showFullName();
- $this->showLocation();
- $this->showHomepage();
- $this->showBio();
+ if (Event::handle('StartProfileListItemProfileElements', array($this))) {
+ if (Event::handle('StartProfileListItemAvatar', array($this))) {
+ $this->showAvatar();
+ Event::handle('EndProfileListItemAvatar', array($this));
+ }
+ if (Event::handle('StartProfileListItemFullName', array($this))) {
+ $this->showFullName();
+ Event::handle('EndProfileListItemFullName', array($this));
+ }
+ if (Event::handle('StartProfileListItemLocation', array($this))) {
+ $this->showLocation();
+ Event::handle('EndProfileListItemLocation', array($this));
+ }
+ if (Event::handle('StartProfileListItemHomepage', array($this))) {
+ $this->showHomepage();
+ Event::handle('EndProfileListItemHomepage', array($this));
+ }
+ if (Event::handle('StartProfileListItemBio', array($this))) {
+ $this->showBio();
+ Event::handle('EndProfileListItemBio', array($this));
+ }
+ Event::handle('EndProfileListItemProfileElements', array($this));
+ }
$this->endProfile();
}
@@ -225,7 +258,10 @@ class ProfileListItem extends Widget
function showActions()
{
$this->startActions();
- $this->showSubscribeButton();
+ if (Event::handle('StartProfileListItemActionElements', array($this))) {
+ $this->showSubscribeButton();
+ Event::handle('EndProfileListItemActionElements', array($this));
+ }
$this->endActions();
}