本文整理汇总了PHP中AlphaUserPointsHelper::getReferreid方法的典型用法代码示例。如果您正苦于以下问题:PHP AlphaUserPointsHelper::getReferreid方法的具体用法?PHP AlphaUserPointsHelper::getReferreid怎么用?PHP AlphaUserPointsHelper::getReferreid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AlphaUserPointsHelper
的用法示例。
在下文中一共展示了AlphaUserPointsHelper::getReferreid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAfterReply
public function onAfterReply($message) {
// Check for permisions of the current category - activity only if public or registered
if ( $this->_checkPermissions($message) ) {
$datareference = '<a rel="nofollow" href="' . KunenaRoute::_($message->getPermaUrl()) . '">' . $message->subject . '</a>';
$referreid = AlphaUserPointsHelper::getReferreid( $message->userid );
if (JString::strlen($message->message) > $this->params->get('activity_points_limit', 0)) {
if ( $this->_checkRuleEnabled( 'plgaup_kunena_topic_reply' ) ) {
$keyreference = $this->_buildKeyreference( 'plgaup_kunena_topic_reply', $message->id ) ;
AlphaUserPointsHelper::newpoints ( 'plgaup_kunena_topic_reply', $referreid, $keyreference, $datareference );
}
}
}
}
示例2: onAfterReply
public function onAfterReply($message)
{
// Check for permisions of the current category - activity only if public or registered
if ($this->_checkPermissions($message)) {
require_once KPATH_SITE . '/lib/kunena.link.class.php';
$datareference = '<a href="' . CKunenaLink::GetMessageURL($message->get('id'), $message->get('catid')) . '">' . $message->get('subject') . '</a>';
$referreid = AlphaUserPointsHelper::getReferreid($message->get('userid'));
if ($this->_config->alphauserpointsnumchars > 0) {
// use if limit chars for a response
if (JString::strlen($message->get('message')) > $this->_config->alphauserpointsnumchars) {
if ($this->_getAUPversion() < '1.5.12') {
if ($this->_checkRuleEnabled('plgaup_reply_kunena')) {
AlphaUserPointsHelper::newpoints('plgaup_reply_kunena', $referreid, $message->get('id'), $datareference);
} else {
return;
}
} elseif ($this->_getAUPversion() >= '1.5.12') {
if ($this->_checkRuleEnabled('plgaup_kunena_topic_reply')) {
AlphaUserPointsHelper::newpoints('plgaup_kunena_topic_reply', $referreid, $message->get('id'), $datareference);
} else {
return;
}
}
}
} else {
if ($this->_getAUPversion() < '1.5.12') {
if ($this->_checkRuleEnabled('plgaup_reply_kunena')) {
AlphaUserPointsHelper::newpoints('plgaup_reply_kunena', $referreid, $message->get('id'), $datareference);
} else {
return;
}
} elseif ($this->_getAUPversion() >= '1.5.12') {
if ($this->_checkRuleEnabled('plgaup_kunena_topic_reply')) {
AlphaUserPointsHelper::newpoints('plgaup_kunena_topic_reply', $referreid, $message->get('id'), $datareference);
} else {
return;
}
}
}
}
}
示例3: onUserLogin
public function onUserLogin($user, $options = array())
{
$app = JFactory::getApplication();
$db = JFactory::getDBO();
jimport('joomla.user.helper');
$instance = new JUser();
if ($id = intval(JUserHelper::getUserId($user['username']))) {
$instance->load($id);
}
if ($instance->get('block') == 0) {
require_once JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
// start the user session for AlphaUserpoints
AlphaUserPointsHelper::getReferreid(intval($instance->get('id')));
if ($app->isSite()) {
// load language component
$lang = JFactory::getLanguage();
$lang->load('com_alphauserpoints', JPATH_SITE);
// check raffle subscription to showing a reminder message
// check first if rule for raffle is enabled
$result = AlphaUserPointsHelper::checkRuleEnabled('sysplgaup_raffle', 1);
if ($result) {
$resultCurrentRaffle = $this->checkIfCurrentRaffleSubscription(intval($instance->get('id')));
if ($resultCurrentRaffle == 'stillRegistered') {
$messageAvailable = JText::_('AUP_YOU_ARE_STILL_NOT_REGISTERED_FOR_RAFFLE');
if ($messageAvailable != '') {
$messageRaffle = sprintf(JText::_('AUP_YOU_ARE_STILL_NOT_REGISTERED_FOR_RAFFLE'), $user['username']);
$app->enqueueMessage($messageRaffle);
}
}
}
}
//return true;
}
}