コード例 #1
0
/**
 * ------------------------------------------------------------------------
 * JUDirectory for Joomla 2.5, 3.x
 * ------------------------------------------------------------------------
 *
 * @copyright      Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved.
 * @license        GNU General Public License version 2 or later; see LICENSE.txt
 * @author         JoomUltra Co., Ltd
 * @website        http://www.joomultra.com
 * @----------------------------------------------------------------------@
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
//@todo properties has called in view
$user = JFactory::getUser();
$isOwnDashboard = JUDirectoryFrontHelperPermission::isOwnDashboard();
JLoader::register('JUDirectoryAvatarHelper', JPATH_SITE . '/components/com_judirectory/helpers/avatar.php');
$avatar = JUDirectoryAvatarHelper::getJUAvatar($user->id);
$userId = JUDirectoryFrontHelper::getDashboardUserId();
$linkDashboard = JRoute::_(JUDirectoryHelperRoute::getDashboardRoute($userId));
$linkUserProfile = JRoute::_(JUDirectoryHelperRoute::getUserProfileRoute());
$linkCreateListing = JRoute::_(JUDirectoryHelperRoute::getFormRoute());
$linkUserComments = JRoute::_(JUDirectoryHelperRoute::getUserCommentsRoute($userId));
$linkUserCollection = JRoute::_(JUDirectoryHelperRoute::getCollectionsRoute($userId));
$linkUserListings = JRoute::_(JUDirectoryHelperRoute::getUserListingsRoute($userId));
$linkUserSubscriptions = JRoute::_(JUDirectoryHelperRoute::getUserSubscriptionsRoute($userId));
$linkLogOutReturn = JRoute::_('index.php', false);
?>
	<div class="navbar">
		<div class="navbar-inner">
			<ul class="nav">
コード例 #2
0
 public static function canViewDashboard()
 {
     $params = JUDirectoryHelper::getParams();
     $public_user_dashboard = $params->get("public_user_dashboard", 0);
     $user = JFactory::getUser();
     if ($public_user_dashboard) {
         $app = JFactory::getApplication();
         $userId = $app->input->getInt('id', 0);
         if ($user->id == 0 && $userId == 0) {
             return false;
         }
         return true;
     } else {
         if ($user->id == 0) {
             return false;
         } else {
             $isOwnDashboard = JUDirectoryFrontHelperPermission::isOwnDashboard();
             return $isOwnDashboard;
         }
     }
 }