当前位置: 首页>>代码示例>>PHP>>正文


PHP AlphaUserPointsHelper::getReferreid方法代码示例

本文整理汇总了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 );
				}
			}
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:13,代码来源:activity.php

示例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;
                 }
             }
         }
     }
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:41,代码来源:activity.php

示例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;
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:34,代码来源:sysplgaup_newregistered.php


注:本文中的AlphaUserPointsHelper::getReferreid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。