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


PHP AlphaUserPointsHelper::getUserMedals方法代码示例

本文整理汇总了PHP中AlphaUserPointsHelper::getUserMedals方法的典型用法代码示例。如果您正苦于以下问题:PHP AlphaUserPointsHelper::getUserMedals方法的具体用法?PHP AlphaUserPointsHelper::getUserMedals怎么用?PHP AlphaUserPointsHelper::getUserMedals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AlphaUserPointsHelper的用法示例。


在下文中一共展示了AlphaUserPointsHelper::getUserMedals方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMedals

 public function getMedals($userId)
 {
     $config = EasyBlogHelper::getConfig();
     if (!$config->get('main_alpha_userpoint_medals')) {
         return false;
     }
     if (!$this->loadHelper()) {
         return false;
     }
     if (!method_exists('AlphaUserPointsHelper', 'getUserMedals')) {
         return false;
     }
     $medals = AlphaUserPointsHelper::getUserMedals('', $userId);
     $theme = new CodeThemes();
     $theme->set('medals', $medals);
     return $theme->fetch('author.aup.medals.php');
 }
开发者ID:Tommar,项目名称:vino2,代码行数:17,代码来源:aup.php

示例2: getUserMedals

 public function getUserMedals($userid)
 {
     if ($userid == 0) {
         return false;
     }
     if (!defined("_AUP_MEDALS_LIVE_PATH")) {
         define('_AUP_MEDALS_LIVE_PATH', JUri::root(true) . '/components/com_alphauserpoints/assets/images/awards/icons/');
     }
     $aupmedals = AlphaUserPointsHelper::getUserMedals('', $userid);
     $medals = array();
     foreach ($aupmedals as $medal) {
         $medals[] = '<img src="' . _AUP_MEDALS_LIVE_PATH . $this->escape($medal->icon) . '" alt="' . $this->escape($medal->rank) . '" title="' . $this->escape($medal->rank) . '" />';
     }
     return $medals;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:15,代码来源:activity.php

示例3: display

 public function display($cachable = false, $urlparams = false)
 {
     $app = JFactory::getApplication();
     require_once JPATH_ROOT . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
     $com_params = JComponentHelper::getParams('com_alphauserpoints');
     $model = $this->getModel('alphauserpoints');
     $view = $this->getView('account', 'html');
     // current user
     $user = JFactory::getUser();
     // profil request
     $userid = JFactory::getApplication()->input->get('userid', '', 'string');
     if (!$user->id && !$com_params->get('allowGuestUserViewProfil', 1)) {
         $msg = JText::_('ALERTNOTAUTH');
         $this->setRedirect('index.php', $msg);
         $this->redirect();
     }
     // check referre ID
     if (!$userid) {
         $referrerid = $model->_checkUser();
     } else {
         $referrerid = $userid;
     }
     // Rule Profile View
     if ($referrerid != @$_SESSION['referrerid']) {
         $keyreference = AlphaUserPointsHelper::buildKeyreference('sysplgaup_profile_view', $user->id);
         $username = $user->username ? $user->username : JText::_('AUP_GUEST');
         $datareference = JText::_('AUP_PROFILE_VIEW_REFERENCE') . ' ' . $username;
         AlphaUserPointsHelper::userpoints('sysplgaup_profile_view', $referrerid, 0, $keyreference, $datareference);
     }
     // End rule Profile View
     // Get the parameters of the active menu item
     $params = $model->_getParamsAUP();
     $num_item_activities = $params->get('num_item_activities', 10);
     $_get_last_points = $model->_get_last_points($referrerid, $num_item_activities);
     $_listing_last_points = $_get_last_points[0];
     $_listing_total = $_get_last_points[1];
     $_listing_limit = $_get_last_points[2];
     $_listing_limitstart = $_get_last_points[3];
     $rowsreferrees = $model->_get_referrees($referrerid);
     $pointsearned = $model->_pointsearned();
     // users points earned TOP 10
     $totalpoints = $model->_totalpoints();
     // entire community
     $mypointsearned = $model->_mypointsearned($referrerid);
     $mypointsspent = $model->_mypointsspent($referrerid);
     $mypointsearnedthismonth = $model->_mypointsearnedthismonth($referrerid);
     $mypointsspentthismonth = $model->_mypointsspentthismonth($referrerid);
     $mypointsearnedthisday = $model->_mypointsearnedthisday($referrerid);
     $mypointsspentthisday = $model->_mypointsspentthisday($referrerid);
     $_average_age = _get_average_age_community();
     $_user_info = AlphaUserPointsHelper::getUserInfo($referrerid);
     $currenttotalpoints = $_user_info->points;
     $lastupdate = $_user_info->last_update;
     $referraluser = $_user_info->referraluser;
     $myname = $_user_info->name;
     $myusername = $_user_info->username;
     $mybirthday = $_user_info->birthdate;
     $referralname = "";
     if ($referraluser) {
         $referralinfo = AlphaUserPointsHelper::getUserInfo($referraluser);
         $referralname = $referralinfo->username;
     }
     // get level/rank if exist
     $userrankinfo = AlphaUserPointsHelper::getUserRank($referrerid);
     // get medals if exist
     $medalslistuser = AlphaUserPointsHelper::getUserMedals($referrerid);
     // load avatar
     $useAvatarFrom = $com_params->get('useAvatarFrom');
     $height = 100;
     if ($useAvatarFrom == 'alphauserpoints') {
         $lang = JFactory::getLanguage();
         $lang->load('com_media', JPATH_ADMINISTRATOR);
     }
     $avatar = getAvatar($useAvatarFrom, $_user_info, $height, $height, 'class="thumbnail"');
     // Get coupons code
     $resultCoupons = $model->_getMyCouponCode($referrerid);
     $view->assign('params', $params);
     $view->assign('cparams', $com_params);
     $view->assign('referreid', $referrerid);
     $view->assign('currenttotalpoints', $currenttotalpoints);
     $view->assign('rowslastpoints', $_listing_last_points);
     $view->assign('total', $_listing_total);
     $view->assign('limit', $_listing_limit);
     $view->assign('limitstart', $_listing_limitstart);
     $view->assign('lastupdate', $lastupdate);
     $view->assign('referraluser', $referraluser);
     $view->assign('referralname', $referralname);
     $view->assign('rowsreferrees', $rowsreferrees);
     $view->assign('userid', $user->id);
     $view->assign('userrankinfo', $userrankinfo);
     $view->assign('medalslistuser', $medalslistuser);
     $view->assign('pointsearned', $pointsearned);
     $view->assign('totalpoints', $totalpoints);
     $view->assign('mypointsearned', $mypointsearned);
     $view->assign('mypointsspent', $mypointsspent);
     $view->assign('mypointsearnedthismonth', $mypointsearnedthismonth);
     $view->assign('mypointsspentthismonth', $mypointsspentthismonth);
     $view->assign('mypointsearnedthisday', $mypointsearnedthisday);
     $view->assign('mypointsspentthisday', $mypointsspentthisday);
     $view->assign('myname', $myname);
//.........这里部分代码省略.........
开发者ID:q0821,项目名称:esportshop,代码行数:101,代码来源:account.php

示例4: getMedals

 public function getMedals($userId)
 {
     $config = EasyBlogHelper::getConfig();
     if (!$config->get('main_alpha_userpoint_medals')) {
         return false;
     }
     if (!$this->loadHelper()) {
         return false;
     }
     if (!method_exists('AlphaUserPointsHelper', 'getUserMedals')) {
         return false;
     }
     $medals = AlphaUserPointsHelper::getUserMedals('', $userId);
     $theme = EB::template();
     $theme->set('medals', $medals);
     return $theme->output('site/aup/medals');
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:17,代码来源:aup.php


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