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


PHP AlphaUserPointsHelper::getAupLinkToProfil方法代码示例

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


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

示例1: getUserProfileUrl

 function getUserProfileUrl($userid = 0, $username = 'Guest')
 {
     $app =& JFactory::getApplication();
     $cwConfig = $app->getUserState(SESSION_CONFIG);
     $link = null;
     switch ($cwConfig[USER_AVTAR]) {
         case 'jomsocial':
             $jspath = JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php';
             if (file_exists($jspath)) {
                 include_once $jspath;
                 $link = '<a href="' . CRoute::_('index.php? option=com_community&view=profile&userid=' . $userid) . '">' . $username . '</a>';
             }
             break;
         case 'cb':
             $link = '<a href="' . JRoute::_('index.php?option=com_comprofiler&amp;task=userProfile&amp;user=' . $userid) . '">' . $username . '</a>';
             break;
         case 'touch':
             $link = CommunityAnswersHelper::getTouchPopup($userid, $username);
             break;
         case 'kunena':
             $link = '<a href="' . JRoute::_('index.php?option=com_kunena&amp;func=fbprofile&amp;userid=' . $userid) . '">' . $username . '</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;
                 $link = '<a href="' . AlphaUserPointsHelper::getAupLinkToProfil($userid) . '">' . $username . '</a>';
             }
             break;
     }
     return !$link ? $username : $link;
 }
开发者ID:phat20092009,项目名称:community-crosswords,代码行数:32,代码来源:helper.php

示例2: userlink

 public static function userlink($userid, $username)
 {
     static $jva_userlinks;
     $model = jvarcadeModelCommon::getInst();
     $config = $model->getConf();
     if (!($jva_userlinks && is_array($jva_userlinks) && count($jva_userlinks) && array_key_exists((int) $userid, $jva_userlinks))) {
         if (!is_array($jva_userlinks)) {
             $jva_userlinks = array();
         }
         $_name = '';
         // Guest
         if ((int) $userid == 0) {
             $_name = $config->guest_name;
             //Alpha User Points
         } elseif ((int) $config->scorelink == 3) {
             $api_AUP = JPATH_SITE . '/components/com_alphauserpoints/helper.php';
             if (file_exists($api_AUP)) {
                 require_once $api_AUP;
                 $linktoAUPprofil = AlphaUserPointsHelper::getAupLinkToProfil($userid, (int) $config->aup_itemid);
                 $_name = '<a href="' . $linktoAUPprofil . '">' . $username . '</a>';
             }
             //Community Builder
         } elseif ((int) $config->scorelink == 2) {
             $_name = '<a href="' . JRoute::_('index.php?option=com_comprofiler&task=userProfile&user=' . (int) $userid . '&Itemid=' . (int) $config->communitybuilder_itemid) . '">' . $username . '</a>';
             //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);
             $_name = '<a href="' . CRoute::_('index.php?option=com_community&view=profile&userid=' . (int) $userid) . '">' . $js_user->getDisplayName() . '</a>';
             // No integration
         } else {
             $_name = '<a href="' . JRoute::_('index.php?option=com_jvarcade&task=profile&id=' . (int) $userid) . '">' . $username . '</a>';
         }
         $jva_userlinks[(int) $userid] = $_name;
     }
     return $jva_userlinks[(int) $userid];
 }
开发者ID:Tfrez,项目名称:jVarcade,代码行数:37,代码来源:helper.php

示例3: getUserProfileUrl

 public function getUserProfileUrl($system, $userId, $urlOnly = true, $name = 'Guest', $attribs = array())
 {
     $url = '#';
     if ($userId) {
         switch ($system) {
             case 'cjforum':
                 $api = JPATH_ROOT . '/components/com_cjforum/lib/api.php';
                 if (file_exists($api)) {
                     require_once $api;
                     $profileApi = CjForumApi::getProfileApi();
                     $url = $profileApi->getUserProfileLink($userId, 'name', true);
                 }
                 break;
             case 'cjblog':
                 $api = JPATH_ROOT . '/components/com_cjblog/api.php';
                 if (file_exists($api)) {
                     require_once $api;
                     $url = CjBlogApi::get_user_profile_url($userId, 'name', true, $attribs);
                 }
                 break;
             case 'easyprofile':
                 $api = JPATH_ROOT . '/components/com_jsn/helpers/helper.php';
                 if (file_exists($api)) {
                     require_once $api;
                     $user = new JsnUser($userId);
                     $url = $user->getLink();
                 }
                 break;
             case 'jomsocial':
                 $jspath = JPATH_BASE . '/components/com_community/libraries/core.php';
                 if (file_exists($jspath)) {
                     include_once $jspath;
                     $url = CRoute::_('index.php? option=com_community&view=profile&userid=' . $userId);
                 }
                 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('language.front');
                 cbimport('cb.field');
                 $url = cbSef('index.php?option=com_comprofiler&amp;task=userProfile&amp;user=' . (int) $userId . getCBprofileItemid(true, false));
                 break;
             case 'kunena':
                 if ($this->_initialize_kunena() && $userId > 0) {
                     $user = KunenaFactory::getUser($userId);
                     if ($user === false) {
                         break;
                     }
                     $url = KunenaRoute::_('index.php?option=com_kunena&func=profile&userid=' . $user->userid, true);
                 }
                 break;
             case 'aup':
                 $api_AUP = JPATH_SITE . '/components/com_alphauserpoints/helper.php';
                 if (file_exists($api_AUP)) {
                     require_once $api_AUP;
                     $url = AlphaUserPointsHelper::getAupLinkToProfil($userId);
                 }
                 break;
             case 'easysocial':
                 $api = JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
                 if (file_exists($api)) {
                     require_once $api;
                     $my = Foundry::user($userId);
                     $url = FRoute::profile(array('id' => $my->getAlias()));
                     $name = $my->getName();
                 }
                 break;
         }
     }
     if ($url && !$urlOnly) {
         $url = JHtml::link($url, $name, $attribs);
     }
     return null == $url ? $name : $url;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:80,代码来源:api.php

示例4: get_user_profile_url

 /**
  * Gets the user profile url of selected <code>system</code>. Currently supported systems are <br><br> 
  * 
  * JomSocial - jomsocial, Community Builder - cb, Touch - touch, Kunena - kunena, Alpha User Points - aup
  * 
  * @param string $system User profile system
  * @param int $userid user id
  * @param string $username User name to be used to display with link
  * @param array $links array of links for mighty touch
  * @param path_only boolean want to retrive just the url or the full html hyperlink markup?
  * 
  * @return string user profile url
  */
 public static function get_user_profile_url($system, $userid = 0, $username = 'Guest', $path_only = true, $attribs = array())
 {
     $link = null;
     switch ($system) {
         case 'cjforum':
             $api = JPATH_ROOT . '/components/com_cjforum/helpers/api.php';
             if (file_exists($api)) {
                 require_once $api;
                 $link = CjForumApi::get_user_profile_url($userid, $path_only, $attribs);
             }
             break;
         case 'cjblog':
             $api = JPATH_ROOT . DS . 'components' . DS . 'com_cjblog' . DS . 'api.php';
             if (file_exists($api)) {
                 require_once $api;
                 $link = CjBlogApi::get_user_profile_url($userid, 'name', $path_only, $attribs);
             }
             break;
         case 'jomsocial':
             $jspath = JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php';
             if (file_exists($jspath)) {
                 include_once $jspath;
                 if ($path_only) {
                     $link = CRoute::_('index.php? option=com_community&view=profile&userid=' . $userid);
                 } else {
                     $link = JHtml::link(CRoute::_('index.php? option=com_community&view=profile&userid=' . $userid), $username, $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('language.front');
             cbimport('cb.field');
             $url = cbSef('index.php?option=com_comprofiler&amp;task=userProfile&amp;user=' . (int) $userid . getCBprofileItemid(true, false));
             if ($path_only) {
                 $link = $url;
             } else {
                 $link = JHtml::link($url, $username, $attribs);
             }
             break;
         case 'kunena':
             if (CJFunctions::_initialize_kunena() && $userid > 0) {
                 $user = KunenaFactory::getUser($userid);
                 if ($user === false) {
                     break;
                 }
                 if ($path_only) {
                     $link = KunenaRoute::_('index.php?option=com_kunena&func=profile&userid=' . $user->userid, true);
                 } else {
                     $link = JHtml::link(KunenaRoute::_('index.php?option=com_kunena&func=profile&userid=' . $user->userid, true), $user->name, $attribs);
                 }
             }
             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) {
                     $link = AlphaUserPointsHelper::getAupLinkToProfil($userid);
                 } else {
                     $link = JHtml::link(AlphaUserPointsHelper::getAupLinkToProfil($userid), $username, $attribs);
                 }
             }
             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($userid);
                 $link = FRoute::profile(array('id' => $my->getAlias()));
                 if (!$path_only) {
                     $username = $my->getName();
                     $link = JHtml::link($link, $username, $attribs);
                 }
             }
             break;
     }
     return null == $link ? $username : $link;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:99,代码来源:functions.php

示例5: uddeIMgetLinkOnly

function uddeIMgetLinkOnly($ofanid, $ofaname, $config) {	// LINK only
	$database = uddeIMgetDatabase();
	$itemid = "";
	if ($config->cbitemid)
		$itemid = "&Itemid=".$config->cbitemid;
	$gimmeback = "";

	if ($config->showcblink==1) {			// CB
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} elseif ($config->showcblink==2) {		// FB
        // $sql = "SELECT id FROM #__menu WHERE link = 'index.php?option=com_fireboard' AND published = 1";
		// $database->setQuery($sql);
        // $fbid = (int)$database->loadResult();
		// $gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_fireboard&task=showprf&func=fbprofile&userid=".(int)$ofanid."&Itemid=".(int)$fbid)."'>".$ofaname."</a>";
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_fireboard&task=showprf&func=fbprofile&userid=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} elseif ($config->showcblink==3) {		// Agora
		$sql = "SELECT id FROM #__agora_users WHERE jos_id=".(int)$ofanid;
		$database->setQuery($sql);
		$agoraid = (int)$database->loadResult($sql);
		if ($agoraid)
			$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_agora&task=profile&id=".(int)$agoraid.$itemid)."'>".$ofaname."</a>";
		else
			$gimmeback = $ofaname;			// user has not visited the forum before, so no agora profile exists
	} elseif ($config->showcblink==4) {		// CBE
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_cbe&task=userProfile&user=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} elseif ($config->showcblink==5) {		// KUNENA
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_kunena&task=showprf&func=fbprofile&userid=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} elseif ($config->showcblink==6) {		// JOMSOCIAL
        // $database->setQuery("SELECT id FROM #__menu WHERE link = 'index.php?option=com_community' AND published=1");
        // $JOMSOCIAL_Itemid = $database->loadResult();
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_community&view=profile&userid=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} elseif ($config->showcblink==7) {		// AUP
		$api_AUP = JPATH_SITE.'/components/com_alphauserpoints/helper.php';
		if (file_exists($api_AUP)) {
			require_once($api_AUP);
			$linktoAUPprofil = AlphaUserPointsHelper::getAupLinkToProfil($ofanid);
			$gimmeback = "<a href='".$linktoAUPprofil."'>".$ofaname."</a>";
		}
	} elseif ($config->showcblink==8) {		// JooCM
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_joocm&view=profile&layout=joocm&id=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} elseif ($config->showcblink==9) {		// KUNENA 1.6
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_kunena&func=profile&userid=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} elseif ($config->showcblink==10) {	// NINJABOARD
		// $sql = "SELECT id FROM #__agora_users WHERE jos_id=".(int)$ofanid;
		// $database->setQuery($sql);
		// $agoraid = (int)$database->loadResult($sql);
		//if ($agoraid)
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_ninjaboard&view=person&id=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
		//else
		//	$gimmeback = $ofaname;			// user has not visited the forum before, so no agora profile exists
	} elseif ($config->showcblink==11) {	// KUNENA 2.0
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_kunena&func=profile&userid=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} elseif ($config->showcblink==12) {	// KUNENA 3.0
		// $gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_kunena&func=user&userid=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
		// same as 2.0
		$gimmeback = "<a href='".uddeIMsefRelToAbs("index.php?option=com_kunena&func=profile&userid=".(int)$ofanid.$itemid)."'>".$ofaname."</a>";
	} else {
		$gimmeback = $ofaname;
	}
	return $gimmeback;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:61,代码来源:getpiclink.php


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