Commit fc19179b authored by Sarven Capadisli's avatar Sarven Capadisli

Added event hook to remote subscription

parent f3a82e78
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');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment