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


PHP AlphaUserPointsHelper::getAupAvatar方法代码示例

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


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

示例1: getLink

 public function getLink($user, $class = '', $sizex = 90, $sizey = 90)
 {
     $user = KunenaFactory::getUser($user);
     $size = $this->getSize($sizex, $sizey);
     if ($size->y > 100) {
         $avatar = AlphaUserPointsHelper::getAupAvatar($user->userid, 0, 100 * (double) $size->x / (double) $size->y, '100');
     } else {
         $avatar = AlphaUserPointsHelper::getAupAvatar($user->userid, 0, $size->x, $size->y);
     }
     if (!$avatar) {
         $avatar = '<img border="0" width="100" height="100" alt="" src="' . JUri::root() . 'components/com_alphauserpoints/assets/images/avatars/generic_gravatar_grey.png">';
     }
     return $avatar;
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:14,代码来源:avatar.php

示例2: getLink

	public function getLink($user, $class='', $sizex=90, $sizey=90)
	{
		$user = KunenaFactory::getUser($user);
		$size = $this->getSize($sizex, $sizey);
		if ($size->y > 100) {
			$avatar = AlphaUserPointsHelper::getAupAvatar ( $user->userid, 0, 100*(float)$size->x/(float)$size->y, '100'  );
		} else {
			$avatar = AlphaUserPointsHelper::getAupAvatar ( $user->userid, 0, $size->x, $size->y  );
		}
		if (!$avatar) {
			// FIXME: need a better way to do this
			$avatar = '<img border="0" width="100" height="100" alt="" src="http://kunena16cb/components/com_alphauserpoints/assets/images/avatars/generic_gravatar_grey.gif">';
		}
		return $avatar;
	}
开发者ID:rich20,项目名称:Kunena,代码行数:15,代码来源:avatar.php

示例3:

 if ($fbConfig->avatar_src == "jomsocial") {
     // Get CUser object
     $jsuser =& CFactory::getUser($userinfo->userid);
     $msg_avatar = '<span class="fb_avatar"><img src="' . $jsuser->getThumbAvatar() . '" alt=" " /></span>';
 } else {
     if ($fbConfig->avatar_src == "clexuspm") {
         $msg_avatar = '<span class="fb_avatar"><img src="' . MyPMSTools::getAvatarLinkWithID($userinfo->userid) . '" /></span>';
     } else {
         if ($fbConfig->avatar_src == "cb") {
             $msg_avatar = '<span class="fb_avatar">' . $kunenaProfile->showAvatar($userinfo->userid, '') . '</span>';
         } else {
             if ($fbConfig->avatar_src == "aup") {
                 $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
                 if (file_exists($api_AUP)) {
                     $fbConfig->fb_profile == 'aup' ? $showlink = 1 : ($showlink = 0);
                     $msg_avatar = '<span class="fb_avatar">' . AlphaUserPointsHelper::getAupAvatar($userinfo->userid, $showlink) . '</span>';
                 }
             } else {
                 $avatar = $userinfo->avatar;
                 if (!empty($avatar)) {
                     if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/s_' . $avatar)) {
                         $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" style="max-width: ' . $fbConfig->avatarwidth . 'px; max-height: ' . $fbConfig->avatarheight . 'px;" /></span>';
                     } else {
                         $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" /></span>';
                     }
                 } else {
                     $msg_avatar = '<span class="fb_avatar"><img  border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/nophoto.jpg" alt="" /></span>';
                 }
             }
         }
     }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:view.php

示例4: showlist


//.........这里部分代码省略.........
            echo CKunenaLink::GetUserlistLink('&amp;orderby=uhits&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=uhits&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
								</th>
                                <?php 
        }
        ?>

                            </tr>

                            <?php 
        $i = 1;
        foreach ($ulrows as $ulrow) {
            $evenodd = $i % 2;
            if ($evenodd == 0) {
                $usrl_class = "sectiontableentry1";
            } else {
                $usrl_class = "sectiontableentry2";
            }
            $nr = $i + $limitstart;
            // Avatar
            $uslavatar = '';
            if ($fbConfig->avatar_src == "clexuspm") {
                $uslavatar = '<img  border="0" class="usl_avatar" src="' . MyPMSTools::getAvatarLinkWithID($ulrow->id, "s") . '" alt="" />';
            } else {
                if ($fbConfig->avatar_src == "cb") {
                    $kunenaProfile =& CKunenaCBProfile::getInstance();
                    $uslavatar = $kunenaProfile->showAvatar($ulrow->id);
                } else {
                    if ($fbConfig->avatar_src == "aup") {
                        $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
                        if (file_exists($api_AUP)) {
                            $fbConfig->fb_profile == 'aup' ? $showlink = 1 : ($showlink = 0);
                            $uslavatar = AlphaUserPointsHelper::getAupAvatar($ulrow->id, $showlink, $fbConfig->avatarsmallwidth, $fbConfig->avatarsmallheight);
                        }
                        // end integration AlphaUserPoints
                    } else {
                        $kunena_db->setQuery("SELECT avatar FROM #__fb_users WHERE userid='{$ulrow->id}'");
                        $avatar = $kunena_db->loadResult();
                        if ($avatar != '') {
                            if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/s_' . $avatar)) {
                                $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" />';
                            } else {
                                $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_' . $avatar . '" alt="" />';
                            }
                        } else {
                            $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt="" />';
                        }
                    }
                }
            }
            //
            ?>

                                <tr class = "<?php 
            echo $boardclass;
            echo $usrl_class;
            ?>
  fbm">
                                    <td class = "td-1 frst fbs" align="center">
<?php 
            echo $nr;
            ?>
                                    </td>

                                    <?php 
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:67,代码来源:userlist.php

示例5: getUserAvatar

 /**
  * Gets the avatar of the user. Currently supporting JomSocial, Kunena, AUP and CB.
  *
  * @global <type> $cwConfig
  * @param <type> $userid
  * @param <type> $height
  * @return <type>
  */
 function getUserAvatar($userid = 0, $height = 48)
 {
     $app =& JFactory::getApplication();
     $cwConfig = $app->getUserState(SESSION_CONFIG);
     $db = JFactory::getDBO();
     $avatar = '';
     $username = $cwConfig[USER_NAME];
     switch ($cwConfig[USER_AVTAR]) {
         case 'jomsocial':
             $jspath = JPATH_BASE . DS . 'components' . DS . 'com_community';
             include_once $jspath . DS . 'libraries' . DS . 'core.php';
             // Get CUser object
             $jsuser =& CFactory::getUser($userid);
             $usrname = $jsuser->{$username};
             $avatarLoc = $jsuser->getThumbAvatar();
             $link = CRoute::_('index.php? option=com_community&view=profile&userid=' . $userid . '&Itemid=' . JRequest::getInt('Itemid'));
             $avatar = '<a href="' . $link . '"><img class="hasTip" style="border: 1px solid #cccccc; height: ' . $height . 'px;" src="' . $avatarLoc . '" alt="' . $usrname . '"  title="' . $usrname . '"/></a>';
             break;
         case 'cb':
             $strSql = "SELECT `avatar`, firstname FROM #__comprofiler WHERE `user_id`='{$userid}' AND `avatarapproved`='1'";
             $db->setQuery($strSql);
             $result = $db->loadObject();
             $link = JRoute::_('index.php?option=com_comprofiler&amp;task=userProfile&amp;user=' . $userid);
             if ($result && !empty($result->avatar)) {
                 $avatarLoc = JURI::base(true) . "/images/comprofiler/" . $result->avatar;
             } else {
                 $avatarLoc = JURI::base(true) . "/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_n.png";
             }
             $avatar = '<a href="' . $link . '"><img src="' . $avatarLoc . '" class="hasTip" style="border: 1px solid #cccccc; height: ' . $height . 'px;" alt="' . $result->firstname . '" title="' . $result->firstname . '"/></a>';
             break;
         case 'touch':
             $avatarLoc = JURI::base(true) . '/index2.php?option=com_community&amp;controller=profile&amp;task=avatar&amp;width=' . $height . '&amp;height=' . $height . '&amp;user_id=' . $userid . '&amp;no_ajax=1';
             $avatar = '<img src="' . $avatarLoc . '" style="border: 1px solid #cccccc; height: ' . $height . 'px;" alt=""/>';
             $link = JRoute::_("index.php?option=com_community&view=profile&user_id={$userid}&Itemid=" . JRequest::getInt('Itemid'));
             $avatar = '<a href="' . $link . '">' . $avatar . '</a>';
             break;
         case 'gravatar':
             $strSql = 'SELECT email FROM #__users WHERE id=' . $userid;
             $db->setQuery($strSql);
             $email = $db->loadResult();
             $url = 'http://www.gravatar.com/avatar/' . md5(strtolower(trim($email)));
             $url .= "?s={$height}&d=mm&r=g";
             $avatar = '<img src="' . $url . '"/>';
             break;
         case 'kunena':
             $query = "SELECT a.avatar, b." . $username . " FROM #__fb_users as a" . " LEFT JOIN #__users as b on b.id=a.userid where a.userid=" . $userid;
             $db->setQuery($query);
             $kunenaUser = $db->loadObject();
             $kunena_avtar = @$kunenaUser->avatar;
             $kunena_avtars = JURI::base(true) . '/images/fbfiles';
             if ($kunena_avtar != '') {
                 if (!file_exists(JPATH_ROOT . '/images/fbfiles/avatars/l_' . $kunena_avtar)) {
                     $avatarLoc = $kunena_avtars . '/avatars/' . $kunena_avtar;
                 } else {
                     $avatarLoc = $kunena_avtars . '/avatars/l_' . $kunena_avtar;
                 }
             } else {
                 $avatarLoc = $kunena_avtars . '/avatars/nophoto.jpg';
             }
             //URL
             $usrname = $kunenaUser->{$username} ? $kunenaUser->{$username} : JText::_('GUEST');
             $link = JRoute::_('index.php?option=com_kunena&amp;func=fbprofile&amp;userid=' . $userid);
             $avatar = '<a href="' . $link . '" title="' . $usrname . '"><img src="' . $avatarLoc . '" class="hasTip" style="border: 1px solid #cccccc; height: ' . $height . 'px;" alt="' . $usrname . '"/></a>';
             break;
         case 'aup':
             $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
             if (file_exists($api_AUP)) {
                 require_once $api_AUP;
                 $avatar = AlphaUserPointsHelper::getAupAvatar($userid, 1, $height, $height);
             }
             break;
     }
     return $avatar;
 }
开发者ID:phat20092009,项目名称:community-crosswords,代码行数:82,代码来源:helper.php

示例6: showAvatar

 public static function showAvatar($userid)
 {
     static $jva_avatars;
     $model = jvarcadeModelCommon::getInst();
     $config = $model->getConf();
     if (!($jva_avatars && is_array($jva_avatars) && count($jva_avatars) && array_key_exists((int) $userid, $jva_avatars))) {
         if (!is_array($jva_avatars)) {
             $jva_avatars = array();
         }
         $_avatar = '';
         //Community Builder
         if ((int) $config->scorelink == 2) {
             $db = JFactory::getDBO();
             $db->setQuery('SELECT avatar FROM #__comprofiler WHERE user_id = ' . (int) $userid);
             $_avatar = $db->loadResult();
             if (strlen($_avatar) && file_exists(JPATH_BASE . '/' . 'images' . '/' . 'comprofiler' . '/' . $_avatar) && ($img_size = @getimagesize(JPATH_BASE . '/' . 'images' . '/' . 'comprofiler' . '/' . $_avatar))) {
                 $_avatar = JURI::root() . 'images/comprofiler/' . $_avatar;
             } else {
                 $_avatar = JURI::root() . 'components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png';
             }
             //JomSocial
         } elseif ((int) $config->scorelink == 1 && is_file(JPATH_ROOT . '/' . 'components' . '/' . 'com_community' . '/' . 'libraries' . '/' . 'core.php')) {
             include_once JPATH_ROOT . '/' . 'components' . '/' . 'com_community' . '/' . 'libraries' . '/' . 'core.php';
             $js_user = CFactory::getUser((int) $userid);
             $_avatar = $js_user->getThumbAvatar();
             //AlphaUserPoints
         } elseif ((int) $config->scorelink == 3) {
             $api_AUP = JPATH_SITE . '/components/com_alphauserpoints/helper.php';
             if (file_exists($api_AUP)) {
                 require_once $api_AUP;
                 $avatar = AlphaUserPointsHelper::getAupAvatar($userid, 0, '50', '50', '', '');
                 echo $avatar;
             }
         }
         $_avatar = $_avatar ? '<img src="' . $_avatar . '" border="0" height="50" width="50" align="middle" />' : '';
         $jva_avatars[(int) $userid] = $_avatar;
     }
     return $jva_avatars[(int) $userid];
 }
开发者ID:Tfrez,项目名称:jVarcade,代码行数:39,代码来源:helper.php

示例7: array

			//alert('<?php 
echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));
?>
');
		//}
	}
</script>
<div id="j-main-container">
<div class="span2">
		<?php 
$com_params = JComponentHelper::getParams('com_alphauserpoints');
$useAvatarFrom = $com_params->get('useAvatarFrom');
if ($com_params->get('useAvatarFrom') == 'alphauserpoints') {
    $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
    require_once $api_AUP;
    $avatar = AlphaUserPointsHelper::getAupAvatar($row->userid, 0, '', 100);
    echo '<div>';
    echo $avatar;
    echo '</div>';
}
?>
</div>

<div class="form-horizontal span10">
<form action="index.php?option=com_alphauserpoints" method="post" name="statistic-form" id="statistic-form" class="form-validate">
	<?php 
echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details'));
?>
		<?php 
echo JHtml::_('bootstrap.addTab', 'myTab', 'details', JText::_('AUP_DETAILS', true));
?>
开发者ID:q0821,项目名称:esportshop,代码行数:31,代码来源:default_form.php

示例8: get_user_avatar_image


//.........这里部分代码省略.........
             break;
         case 'jomsocial':
             include_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'defines.community.php';
             require_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php';
             require_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'helpers' . DS . 'string.php';
             $user = CFactory::getUser($userid);
             $avatar = $user->getThumbAvatar();
             if ($path_only == false) {
                 $attribs['height'] = $height . 'px';
                 $avatar = '<img src="' . $avatar . '" alt="' . $alt . '" ' . trim((is_array($attribs) ? JArrayHelper::toString($attribs) : $attribs) . ' /') . '>';
             }
             break;
         case 'cb':
             global $_CB_framework, $_CB_database, $ueConfig, $mainframe;
             $api = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
             if (!is_file($api)) {
                 return;
             }
             require_once $api;
             cbimport('cb.database');
             cbimport('cb.tables');
             cbimport('cb.field');
             cbimport('language.front');
             outputCbTemplate($_CB_framework->getUi());
             //TODO: Here
             $img_attribs['height'] = $height . 'px';
             if ($userid > 0) {
                 $cbUser = CBuser::getInstance($userid);
                 if ($cbUser !== null) {
                     $avatar = $cbUser->getField('avatar', null, 'php', 'profile', 'list');
                     $name = $cbUser->getField('name');
                     $avatar = $avatar['avatar'];
                     if ($path_only == false) {
                         $avatar = '<img src="' . $avatar . '" alt="' . $alt . '" ' . trim((is_array($attribs) ? JArrayHelper::toString($attribs) : $attribs) . ' /') . '>';
                     }
                 }
             } else {
                 if ($height <= 90) {
                     $avatar = $path_only ? selectTemplate() . 'images/avatar/tnnophoto_n.png' : Jhtml::image(selectTemplate() . 'images/avatar/tnnophoto_n.png', '', $img_attribs);
                 } else {
                     $avatar = $path_only ? selectTemplate() . 'images/avatar/nophoto_n.png' : Jhtml::image(selectTemplate() . 'images/avatar/nophoto_n.png', '', $img_attribs);
                 }
             }
             break;
         case 'touch':
             $avatarLoc = JURI::base(true) . '/index2.php?option=com_community&amp;controller=profile&amp;task=avatar&amp;width=' . $height . '&amp;height=' . $height . '&amp;user_id=' . $userid . '&amp;no_ajax=1';
             $attribs[] = array('style' => 'height: ' . $height . 'px');
             $avatar = $path_only ? $avatarLoc : JHtml::image($avatarLoc, $alt, $attribs);
             break;
         case 'gravatar':
             if (null == $email && $userid > 0) {
                 $strSql = 'SELECT email FROM #__users WHERE id=' . $userid;
                 $db->setQuery($strSql);
                 $email = $db->loadResult();
             }
             $avatar = 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($email))) . '?s=' . $height . '&d=mm&r=g';
             if ($path_only == false) {
                 $avatar = '<img src="' . $avatar . '" alt="' . $alt . '" ' . trim((is_array($attribs) ? JArrayHelper::toString($attribs) : $attribs) . ' /') . '>';
             }
             break;
         case 'kunena':
             if (CJFunctions::_initialize_kunena()) {
                 $class = 'avatar';
                 $user = KunenaFactory::getUser($userid);
                 $avatar = $user->getAvatarImage($class, $height, $height);
                 if ($path_only) {
                     preg_match_all('/<img .*src=["|\']([^"|\']+)/i', $avatar, $matches);
                     foreach ($matches[1] as $key => $value) {
                         $avatar = $value;
                         break;
                     }
                 }
             }
             break;
         case 'aup':
             $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
             if (file_exists($api_AUP)) {
                 require_once $api_AUP;
                 if ($path_only) {
                     $avatar = AlphaUserPointsHelper::getAvatarPath($userid);
                 } else {
                     $avatar = AlphaUserPointsHelper::getAupAvatar($userid, 0, $height, $height);
                 }
             }
             break;
         case 'easysocial':
             $api = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_easysocial' . DS . 'includes' . DS . 'foundry.php';
             if (file_exists($api)) {
                 require_once $api;
                 $my = Foundry::user();
                 $avatar = $my->getAvatar($height < 64 ? SOCIAL_AVATAR_SMALL : ($height < 128 ? SOCIAL_AVATAR_MEDIUM : SOCIAL_AVATAR_LARGE));
                 $attribs[] = array('style' => 'height: ' . $height . 'px');
                 if ($path_only == false) {
                     $avatar = '<img src="' . $avatar . '" alt="' . $alt . '" ' . trim((is_array($attribs) ? JArrayHelper::toString($attribs) : $attribs) . ' /') . '>';
                 }
             }
             break;
     }
     return $avatar;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:101,代码来源:functions.php

示例9: getUserAvatarImage


//.........这里部分代码省略.........
             }
             break;
         case 'jomsocial':
             require_once JPATH_ROOT . '/components/com_community/defines.community.php';
             require_once JPATH_ROOT . '/components/com_community/libraries/core.php';
             require_once JPATH_ROOT . '/components/com_community/helpers/string.php';
             $user = CFactory::getUser($userId);
             $avatar = $user->getThumbAvatar();
             if ($urlOnly == false) {
                 $imgAttribs['height'] = $height . 'px';
                 $avatar = '<img src="' . $avatar . '" alt="' . $alt . '" ' . trim((is_array($imgAttribs) ? JArrayHelper::toString($imgAttribs) : $imgAttribs) . ' /') . '>';
             }
             break;
         case 'cb':
             global $_CB_framework, $_CB_database, $ueConfig, $mainframe;
             $api = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
             if (!is_file($api)) {
                 return;
             }
             require_once $api;
             cbimport('cb.database');
             cbimport('cb.tables');
             cbimport('cb.field');
             cbimport('language.front');
             outputCbTemplate($_CB_framework->getUi());
             //TODO: Here
             $imgAttribs['height'] = $height . 'px';
             if ($userId > 0) {
                 $cbUser = CBuser::getInstance($userId);
                 if ($cbUser !== null) {
                     $avatar = $cbUser->getField('avatar', null, 'php', 'profile', 'list');
                     $alt = $cbUser->getField('name');
                     $avatar = $avatar['avatar'];
                 }
             } else {
                 if ($height <= 90) {
                     $avatar = selectTemplate() . 'images/avatar/tnnophoto_n.png';
                 } else {
                     $avatar = selectTemplate() . 'images/avatar/nophoto_n.png';
                 }
             }
             if ($urlOnly == false) {
                 $avatar = '<img src="' . $avatar . '" alt="' . $alt . '" ' . trim((is_array($imgAttribs) ? JArrayHelper::toString($imgAttribs) : $imgAttribs) . ' /') . '>';
             }
             break;
         case 'gravatar':
             if (null == $email && $userId > 0) {
                 try {
                     $db = JFactory::getDbo();
                     $query = $db->getQuery(true)->select('email')->from('#__users')->where('id = ' . $userId);
                     $db->setQuery($query);
                     $email = $db->loadResult();
                 } catch (Exception $e) {
                 }
             }
             $avatar = 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($email))) . '?s=' . $height . '&d=mm&r=g';
             if ($urlOnly == false) {
                 $avatar = JHtml::image($avatar, $alt, $imgAttribs);
             }
             break;
         case 'kunena':
             if ($this->_initialize_kunena()) {
                 $class = 'avatar';
                 $user = KunenaFactory::getUser($userId);
                 $avatar = $user->getAvatarImage($class, $height, $height);
                 if ($urlOnly) {
                     preg_match_all('/<img .*src=["|\']([^"|\']+)/i', $avatar, $matches);
                     foreach ($matches[1] as $key => $value) {
                         $avatar = $value;
                         break;
                     }
                 }
             }
             break;
         case 'aup':
             $api_AUP = JPATH_SITE . '/components/com_alphauserpoints/helper.php';
             if (file_exists($api_AUP)) {
                 require_once $api_AUP;
                 if ($urlOnly) {
                     $avatar = AlphaUserPointsHelper::getAvatarPath($userId);
                 } else {
                     $avatar = AlphaUserPointsHelper::getAupAvatar($userId, 0, $height, $height);
                 }
             }
             break;
         case 'easysocial':
             $api = JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
             if (file_exists($api)) {
                 require_once $api;
                 $my = Foundry::user($userId);
                 $avatar = $my->getAvatar($height < 64 ? SOCIAL_AVATAR_SMALL : ($height < 128 ? SOCIAL_AVATAR_MEDIUM : SOCIAL_AVATAR_LARGE));
                 $imgAttribs[] = array('style' => 'height: ' . $height . 'px');
                 if ($urlOnly == false) {
                     $avatar = '<img src="' . $avatar . '" alt="' . $alt . '" ' . trim((is_array($imgAttribs) ? JArrayHelper::toString($imgAttribs) : $imgAttribs) . ' /') . '>';
                 }
             }
             break;
     }
     return $avatar;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:101,代码来源:api.php

示例10:

if ($fbConfig->avatar_src == "jomsocial") {
    // Get CUser object
    $jsuser =& CFactory::getUser($kunena_my->id);
    $jr_avatar = '<img src="' . $jsuser->getThumbAvatar() . '" alt=" " />';
} else {
    if ($fbConfig->avatar_src == "clexuspm") {
        $jr_avatar = '<img src="' . MyPMSTools::getAvatarLinkWithID($kunena_my->id) . '" alt=" " />';
    } else {
        if ($fbConfig->avatar_src == "cb") {
            $jr_avatar = $kunenaProfile->showAvatar($kunena_my->id);
        } else {
            if ($fbConfig->avatar_src == "aup") {
                $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
                if (file_exists($api_AUP)) {
                    $fbConfig->fb_profile == 'aup' ? $showlink = 1 : ($showlink = 0);
                    $jr_avatar = AlphaUserPointsHelper::getAupAvatar($kunena_my->id, $showlink, $fbConfig->avatarsmallwidth, $fbConfig->avatarsmallheight);
                }
                // end integration AlphaUserPointselse
            } else {
                if ($fbavatar != "") {
                    if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/s_' . $fbavatar)) {
                        $jr_avatar = '<img src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $fbavatar . '" alt=" " style="max-width: ' . $fbConfig->avatarsmallwidth . 'px; max-height: ' . $fbConfig->avatarsmallheight . 'px;" />';
                    } else {
                        $jr_avatar = '<img src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_' . $fbavatar . '" alt=" " />';
                    }
                } else {
                    $jr_avatar = '<img src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt=" " />';
                    $jr_profilelink = '<a href="' . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=myprofile') . '" >' . _PROFILEBOX_MYPROFILE . '</a>';
                }
            }
        }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:profilebox.php

示例11: uddeIMgetPicOnly


//.........这里部分代码省略.........
			$imgurl = "<img class='uddeim-tn'".$picstyle." src='".$filenameglive."' alt='' />";
		} elseif ($config->gravatar) {
			$email = uddeIMgetEMailFromID((int)$ofanid, $config);
			$grurl = uddeIMgetGravatar($email, $grsize, $config->gravatard, $config->gravatarr);
			$imgurl = "<img class='uddeim-tn'".$picstyle." src='".$grurl."' alt='' />";
		} elseif (uddeIMfileExists($filename2local)) {
			$imgurl = "<img class='uddeim-tn'".$picstyle." src='".$filename2live."' alt='' />";
		}

		if ($noanchor)
			$gimmeback = $imgurl;
		else
			$gimmeback = uddeIMgetLinkOnly($ofanid, $imgurl, $config);

	} elseif ($config->showcbpic==6) {		// JOMSOCIAL, no gravatar

		if (class_exists('CFactory')) {
			$jsuser = CFactory::getUser((int)$ofanid);
			$filenameglive = $jsuser->getThumbAvatar();
			$imgurl = "<img class='uddeim-tn'".$picstyle." src='".$filenameglive."' alt='' />";
		}

		if ($noanchor)
			$gimmeback = $imgurl;
		else
			$gimmeback = uddeIMgetLinkOnly($ofanid, $imgurl, $config);

	} elseif ($config->showcbpic==7) {		// AUP, no gravatar

		$api_AUP = JPATH_SITE.'/components/com_alphauserpoints/helper.php';
		if ( file_exists($api_AUP) ) {
			require_once($api_AUP);
			if ($config->avatarw && $config->avatarh)
				$avatar = AlphaUserPointsHelper::getAupAvatar($ofanid, 0, $config->avatarw, $config->avatarh);
			else
				$avatar = AlphaUserPointsHelper::getAupAvatar($ofanid, 0);	// [int $width], [int $height]
			$imgurl = $avatar;
		}

		if ($noanchor)
			$gimmeback = $imgurl;
		else
			$gimmeback = uddeIMgetLinkOnly($ofanid, $imgurl, $config);

	} elseif ($config->showcbpic==8) {		// JooCM

		$avatarFile = "";
		$sql = "SELECT a.* FROM #__joocm_avatars AS a INNER JOIN #__joocm_users AS u ON u.id_avatar = a.id WHERE u.id = ".(int)$ofanid;
		$database->setQuery($sql);
		$avatar = $database->loadObject();
		if (is_object($avatar)) {
			$pos = strpos($avatar->avatar_file, 'http://');
			if ($pos === false) {
				if ($avatar->avatar_file) {
					$avatarFile = uddeIMgetPath('live_site')."/media/joocm/avatars/";
					if ($avatar->id_user) {
						$avatarFile .= $avatar->id_user.'/'.$avatar->avatar_file;
					} else {
						$avatarFile .= 'standard/'.$avatar->avatar_file;
					}
				}
			} else {
				$avatarFile = $avatar->avatar_file;
			}
		}
		if (!$avatarFile) {
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:67,代码来源:getpiclink.php

示例12:

 <?php 
           if ($fbConfig->avatar_src == "jomsocial" && $leaf->userid) {
               // Get CUser object
               $jsuser =& CFactory::getUser($last_reply[$leaf->id]->userid);
               $useravatar = '<img class="fb_list_avatar" src="' . $jsuser->getThumbAvatar() . '" alt=" " />';
               echo CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, $useravatar);
           } else {
               if ($fbConfig->avatar_src == "cb") {
                   $useravatar = $kunenaProfile->showAvatar($last_reply[$leaf->id]->userid, 'fb_list_avatar');
                   echo CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, $useravatar);
               } else {
                   if ($fbConfig->avatar_src == "aup") {
                       $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
                       if (file_exists($api_AUP)) {
                           $fbConfig->fb_profile == 'aup' ? $showlink = 1 : ($showlink = 0);
                           echo AlphaUserPointsHelper::getAupAvatar($last_reply[$leaf->id]->userid, $showlink, 40, 40);
                       }
                       // end integration AlphaUserPoints
                   } else {
                       $javatar = $last_reply[$leaf->id]->avatar;
                       if ($javatar != '') {
                           echo CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, '<img class="fb_list_avatar" src="' . (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/s_' . $javatar) ? KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $javatar : KUNENA_LIVEUPLOADEDPATH . '/avatars/s_' . $javatar) . '" alt="" />');
                       } else {
                           echo CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, '<img class="fb_list_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt="" />');
                       }
                   }
               }
           }
           ?>
 </span>
   <?php 
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:flat.php

示例13: showprf

function showprf($userid, $page)
{
    $fbConfig =& CKunenaConfig::getInstance();
    $kunena_acl =& JFactory::getACL();
    $kunena_my =& JFactory::getUser();
    $kunena_db =& JFactory::getDBO();
    // ERROR: mixed global $fbIcons
    global $fbIcons;
    //Get userinfo needed later on, this limits the amount of queries
    unset($userinfo);
    $kunena_db->setQuery("SELECT a.*, b.* FROM #__fb_users AS a INNER JOIN #__users AS b ON b.id=a.userid WHERE a.userid='{$userid}'");
    $userinfo = $kunena_db->loadObject();
    check_dberror('Unable to get user profile info.');
    if (!$userinfo) {
        $kunena_db->setQuery("SELECT * FROM #__users WHERE id='{$userid}'");
        $userinfo = $kunena_db->loadObject();
        check_dberror('Unable to get user profile info.');
        if (!$userinfo) {
            echo '<h3>' . _KUNENA_PROFILE_NO_USER . '</h3>';
            return;
        } else {
            // Check moderator status (admin is moderator)
            $aro_group = $kunena_acl->getAroGroup($userid);
            $is_admin = strtolower($aro_group->name) == 'super administrator' || strtolower($aro_group->name) == 'administrator';
            // there's no profile; set userid and moderator status.
            $kunena_db->setQuery("INSERT INTO #__fb_users (userid,moderator) VALUES ('{$userid}','{$is_admin}')");
            $kunena_db->query();
            check_dberror('Unable to create user profile.');
            $kunena_db->setQuery("SELECT a.*, b.* FROM #__fb_users AS a LEFT JOIN #__users AS b ON b.id=a.userid WHERE a.userid='{$userid}'");
            $userinfo = $kunena_db->loadObject();
            check_dberror('Unable to get user profile info.');
            // TODO: For future use
            // echo '<h3>' . _KUNENA_PROFILE_NOT_FOUND . '</h3>';
            // return;
        }
    }
    // User Hits
    $kunena_db->setQuery('UPDATE #__fb_users SET uhits=uhits+1 WHERE userid=' . $userid);
    $kunena_db->query() or trigger_dberror("Unable to update user hits.");
    // get userprofile hits
    $msg_userhits = $userinfo->uhits;
    //get the username:
    $fb_username = "";
    if ($fbConfig->username) {
        $fb_queryName = "username";
    } else {
        $fb_queryName = "name";
    }
    $fb_username = $userinfo->{$fb_queryName};
    $lists["userid"] = $userid;
    $msg_username = $fb_username;
    // $msg_username = ($fmessage->email != "" && $kunena_my->id > 0 && $fbConfig->showemail == '1') ? "<a href=\"mailto:" . $fmessage->email . "\">" . $fb_username . "</a>" : $fb_username;
    if ($fbConfig->allowavatar) {
        $Avatarname = $userinfo->username;
        if ($fbConfig->avatar_src == "jomsocial") {
            // Get CUser object
            $user =& CFactory::getUser($userid);
            $msg_avatar = '<span class="fb_avatar"><img src="' . $user->getAvatar() . '" alt="" /></span>';
        } else {
            if ($fbConfig->avatar_src == "clexuspm") {
                $msg_avatar = '<span class="fb_avatar"><img src="' . MyPMSTools::getAvatarLinkWithID($userid, "b") . '" alt="" /></span>';
            } else {
                if ($fbConfig->avatar_src == "cb") {
                    $kunenaProfile = CKunenaCBProfile::getInstance();
                    $msg_avatar = '<span class="fb_avatar">' . $kunenaProfile->showAvatar($userid, '', 0) . '</span>';
                } else {
                    if ($fbConfig->avatar_src == "aup") {
                        $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
                        if (file_exists($api_AUP)) {
                            $fbConfig->fb_profile == 'aup' ? $showlink = 1 : ($showlink = 0);
                            $msg_avatar = '<span class="fb_avatar">' . AlphaUserPointsHelper::getAupAvatar($userinfo->userid, $showlink) . '</span>';
                        }
                    } else {
                        $avatar = $userinfo->avatar;
                        if ($avatar != '') {
                            if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/l_' . $avatar)) {
                                $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '"  alt="" style="max-width: ' . $fbConfig->avatarwidth . 'px; max-height: ' . $fbConfig->avatarheight . 'px;" /></span>';
                            } else {
                                $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '"  alt="" /></span>';
                            }
                        } else {
                            $msg_avatar = '<span class="fb_avatar"><img  border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/nophoto.jpg"  alt="" /></span>';
                        }
                    }
                }
            }
        }
    }
    if ($fbConfig->showuserstats) {
        //user type determination
        $ugid = $userinfo->gid;
        $uIsMod = 0;
        $uIsAdm = 0;
        if ($ugid > 0) {
            //only get the groupname from the ACL if we're sure there is one
            $agrp = strtolower($kunena_acl->get_group_name($ugid, 'ARO'));
        }
        if ($ugid == 0) {
            $msg_usertype = _VIEW_VISITOR;
        } else {
//.........这里部分代码省略.........
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:101,代码来源:fbprofile.php


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