Custom list item for join events
This commit is contained in:
@@ -63,6 +63,9 @@ class ActivityPlugin extends Plugin
|
||||
|
||||
switch ($cls)
|
||||
{
|
||||
case 'JoinListItem':
|
||||
include_once $dir . '/'.strtolower($cls).'.php';
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
@@ -274,13 +277,35 @@ class ActivityPlugin extends Plugin
|
||||
'object_type' => ActivityObject::GROUP));
|
||||
return true;
|
||||
}
|
||||
|
||||
function onStartShowNoticeItem($nli)
|
||||
{
|
||||
$notice = $nli->notice;
|
||||
|
||||
$adapter = null;
|
||||
|
||||
switch ($notice->verb) {
|
||||
case ActivityVerb::JOIN:
|
||||
$adapter = new JoinListItem($nli);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!empty($adapter)) {
|
||||
$adapter->showNotice();
|
||||
$adapter->showNoticeAttachments();
|
||||
$adapter->showNoticeInfo();
|
||||
$adapter->showNoticeOptions();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function onEndNoticeAsActivity($notice, &$activity)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Activity',
|
||||
|
Reference in New Issue
Block a user