Added event hook to remote subscription
This commit is contained in:
parent
f3a82e787c
commit
fc19179bc5
10
EVENTS.txt
10
EVENTS.txt
|
@ -1,4 +1,4 @@
|
|||
InitializePlugin: a chance to initialize a plugin in a complete environment
|
||||
\InitializePlugin: a chance to initialize a plugin in a complete environment
|
||||
|
||||
CleanupPlugin: a chance to cleanup a plugin at the end of a program
|
||||
|
||||
|
@ -355,6 +355,14 @@ EndShowHeadElements: Right before the </head> tag; put <script>s here if you nee
|
|||
|
||||
CheckSchema: chance to check the schema
|
||||
|
||||
StartProfileRemoteSubscribe: Before showing the link to remote subscription
|
||||
- $userprofile: UserProfile widget
|
||||
- &$profile: the profile being shown
|
||||
|
||||
EndProfileRemoteSubscribe: After showing the link to remote subscription
|
||||
- $userprofile: UserProfile widget
|
||||
- &$profile: the profile being shown
|
||||
|
||||
StartProfilePageProfileSection: Starting to show the section of the
|
||||
profile page with the actual profile data;
|
||||
hook to prevent showing the profile (e.g.)
|
||||
|
|
|
@ -238,9 +238,12 @@ class UserProfile extends Widget
|
|||
|
||||
if (Event::handle('StartProfilePageActionsElements', array(&$this->out, $this->profile))) {
|
||||
if (empty($cur)) { // not logged in
|
||||
$this->out->elementStart('li', 'entity_subscribe');
|
||||
$this->showRemoteSubscribeLink();
|
||||
$this->out->elementEnd('li');
|
||||
if (Event::handle('StartProfileRemoteSubscribe', array(&$this->out, $this->profile))) {
|
||||
$this->out->elementStart('li', 'entity_subscribe');
|
||||
$this->showRemoteSubscribeLink();
|
||||
$this->out->elementEnd('li');
|
||||
Event::handle('EndProfileRemoteSubscribe', array(&$this->out, $this->profile));
|
||||
}
|
||||
} else {
|
||||
if ($cur->id == $this->profile->id) { // your own page
|
||||
$this->out->elementStart('li', 'entity_edit');
|
||||
|
|
Loading…
Reference in New Issue
Block a user