本文整理汇总了PHP中AlphaUserPointsHelper::getItemidAupProfil方法的典型用法代码示例。如果您正苦于以下问题:PHP AlphaUserPointsHelper::getItemidAupProfil方法的具体用法?PHP AlphaUserPointsHelper::getItemidAupProfil怎么用?PHP AlphaUserPointsHelper::getItemidAupProfil使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AlphaUserPointsHelper
的用法示例。
在下文中一共展示了AlphaUserPointsHelper::getItemidAupProfil方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getProfileURL
public function getProfileURL($user, $task = '', $xhtml = true) {
if ($user == 0)
return false;
$user = KunenaFactory::getUser ( $user );
$my = JFactory::getUser ();
if ($user === false)
return false;
$userid = $my->id != $user->userid ? '&userid=' . AlphaUserPointsHelper::getAnyUserReferreID ( $user->userid ) : '';
$AUP_itemid = AlphaUserPointsHelper::getItemidAupProfil ();
return JRoute::_ ( 'index.php?option=com_alphauserpoints&view=account' . $userid . '&Itemid=' . $AUP_itemid, $xhtml );
}
示例2: getProfileURL
public function getProfileURL($user, $task = '', $xhtml = true) {
if ($user == 0)
return false;
$user = KunenaFactory::getUser ( $user );
$my = JFactory::getUser ();
if ($user === false)
return false;
$userid = $my->id != $user->userid ? '&userid=' . AlphaUserPointsHelper::getAnyUserReferreID ( $user->userid ) : '';
if (method_exists ( 'AlphaUserPointsHelper', 'getItemidAupProfil' )) {
$AUP_itemid = AlphaUserPointsHelper::getItemidAupProfil ();
} else {
$db = JFactory::getDBO ();
$query = "SELECT id FROM #__menu WHERE link='index.php?option=com_alphauserpoints&view=account' AND type='component' AND published='1'";
$db->setQuery ( $query );
$AUP_itemid = intval ( $db->loadResult () );
}
return JRoute::_ ( 'index.php?option=com_alphauserpoints&view=account' . $userid . '&Itemid=' . $AUP_itemid, $xhtml );
}
示例3: getAupAvatar
public static function getAupAvatar($userid, $linktoprofil = 0, $width = '', $height = '', $class = '', $otherprofileurl = '')
{
if (!$userid) {
return;
}
if (!defined("_AUP_AVATAR_PATH")) {
// prevent call in administrator backend
$juriroot = str_replace(DS . 'administrator', '', JURI::root());
define('_AUP_AVATAR_PATH', JURI::root() . 'components/com_alphauserpoints/assets/images/avatars/');
} else {
$juriroot = $juriroot = str_replace(DS . 'administrator', '', JURI::root());
}
if (!defined("_AUP_AVATAR_LIVE_PATH")) {
// prevent call in administrator backend
$juribase = str_replace('/administrator', '', JURI::base());
define('_AUP_AVATAR_LIVE_PATH', $juribase . 'components/com_alphauserpoints/assets/images/avatars/');
} else {
$juribase = str_replace('/administrator', '', JURI::base());
}
$startprofil = "";
$endprofil = "";
$setwidth = $width != '' ? ' width="' . $width . '"' : '';
$setheight = $height != '' ? ' height="' . $height . '"' : '';
$setclass = $class != '' ? ' class="' . $class . '"' : '';
$profile = AlphaUserPointsHelper::getUserInfo('', $userid);
$avatar = $profile->avatar != '' ? _AUP_AVATAR_LIVE_PATH . $profile->avatar : _AUP_AVATAR_PATH . 'generic_gravatar_grey.png';
//$avatar = JURI::root() . "components/com_alphauserpoints/assets/phpThumb/phpThumb.php?src=".$avatar."&w=" . $width ."&h=" . $height;
$avatar = '<img src="' . $avatar . '" border="0" alt=""' . $setwidth . $setheight . $setclass . ' />';
$profileitemid = '';
if ($linktoprofil) {
$profileitemid = '&Itemid=' . AlphaUserPointsHelper::getItemidAupProfil();
$profil = $otherprofileurl ? $otherprofileurl : "index.php?option=com_alphauserpoints&view=account&userid=" . $profile->referreid . $profileitemid;
$startprofil = "<a href=\"" . JRoute::_($profil) . "\">";
$endprofil = "</a>";
$avatar = $startprofil . $avatar . $endprofil;
}
return $avatar;
// USAGE
// $avatar = AlphaUserPointsHelper::getAupAvatar($userid, [int $linktoprofil], [int $width], [int $height], [string $class], [string $otherprofileurl]);
// if $linktoprofil set to 1, display avatar with the link to the AUP profil of this user
// Think to call and include this API helper.php in your script
}