When a user spend a point, it will deduct the spent point from the avilalbe balance and gets added to admin username.
<?php
$dispatcher =& JDispatcher::getInstance();
$trs=$dispatcher->trigger('doProfilePoint', array($user->username,'admin',$point,'ODude Ecard'));
echo "<br><b> $point ".JText::_($trs[0])." </b><br>";
?>
Syntax:
$dispatcher->trigger('doProfilePoint', array(Sender Username,'Receiver username',Total point to spend,'Remark of Transaction'));
Receiver username : Receiver username can be any if one user transfer point to other user. If no receiver, always use username as 'admin' (Site administrator)
Add comment