1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Add UserActivityPointEvents

This commit is contained in:
Tim Düsterhus 2013-01-14 21:08:44 +01:00
parent 292f387dd8
commit 2ff468656f
3 changed files with 18 additions and 0 deletions

View File

@ -218,6 +218,9 @@ public function save() {
)); ));
$this->objectAction->executeAction(); $this->objectAction->executeAction();
// add activity points
\wcf\system\user\activity\point\UserActivityPointHandler::getInstance()->fireEvent('be.bastelstu.wcf.chat.activityPointEvent.message', TIME_NOW, WCF::getUser()->userID);
$this->saved(); $this->saved();
} }

View File

@ -243,6 +243,9 @@ public function show() {
parent::show(); parent::show();
// add activity points
\wcf\system\user\activity\point\UserActivityPointHandler::getInstance()->fireEvent('be.bastelstu.wcf.chat.activityPointEvent.join', TIME_NOW, WCF::getUser()->userID);
// break if not using ajax // break if not using ajax
if ($this->useTemplate) exit; if ($this->useTemplate) exit;
@header('Content-type: application/json'); @header('Content-type: application/json');

View File

@ -5,5 +5,17 @@
<name>be.bastelstu.wcf.chat.room</name> <name>be.bastelstu.wcf.chat.room</name>
<definitionname>com.woltlab.wcf.acl</definitionname> <definitionname>com.woltlab.wcf.acl</definitionname>
</type> </type>
<type>
<name>be.bastelstu.wcf.chat.activityPointEvent.join</name>
<definitionname>com.woltlab.wcf.user.activityPointEvent</definitionname>
<points>0</points>
<classname>wcf\system\user\activity\point\DefaultUserActivityPointObjectProcessor</classname><!-- We are unable to recalc those points -->
</type>
<type>
<name>be.bastelstu.wcf.chat.activityPointEvent.message</name>
<definitionname>com.woltlab.wcf.user.activityPointEvent</definitionname>
<points>0</point>
<classname>wcf\system\user\activity\point\DefaultUserActivityPointObjectProcessor</classname><!-- We are unable to recalc those points -->
</type>
</import> </import>
</data> </data>