コード例 #1
0
ファイル: profile.php プロジェクト: Ruud68/Kunena-Forum
 public function getProfileURL($userid, $task = '', $xhtml = true)
 {
     if ($userid) {
         $user = ES::user($userid);
         // When simple urls are enabled, we just hardcode the url
         $config = ES::config();
         $jConfig = ES::jConfig();
         if (!ES::isSh404Installed() && $config->get('users.simpleUrl') && $jConfig->getValue('sef')) {
             $url = rtrim(JURI::root(), '/') . '/' . $user->getAlias(false);
             return $url;
         }
         // If it's not configured for simple urls, just set the alias
         $alias = $user->getAlias();
     } else {
         $alias = $userid;
     }
     $options = array('id' => $alias);
     if ($task) {
         $options['layout'] = $task;
     }
     $url = FRoute::profile($options, $xhtml);
     return $url;
 }
コード例 #2
0
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
// Include EasyBlog's library
require_once JPATH_ROOT . '/administrator/components/com_easyblog/includes/easyblog.php';
$my = ES::user();
// Load up the module engine
$modules = ES::modules('mod_easysocial_easyblog_posts');
$model = EB::model('Blog');
// Get the module options
$total = (int) $params->get('total', 5);
$sorting = $params->get('sorting', 'latest');
// Let's load the list of posts now
$posts = $model->getBlogsBy('latest', '', $sorting, $total);
// We need to format the blog post accordingly.
$posts = EB::formatter('list', $posts, false);
// Get the author of the blog posts
foreach ($posts as $post) {
    $post->user = ES::user($post->created_by);
}
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_easyblog_posts', $layout);
コード例 #3
0
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
FD::language()->loadSite();
// Check if Foundry exists
if (!FD::exists()) {
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
// Load up helper file
require_once dirname(__FILE__) . '/helper.php';
$events = EasySocialModEventsHelper::getEvents($params);
if (empty($events)) {
    return;
}
$my = ES::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_events');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_events', $layout);
コード例 #4
0
ファイル: profiles.php プロジェクト: knigherrant/decopatio
 /**
  * Updates the user groups assigned
  *
  * @since	1.3
  * @access	public
  * @param	string
  * @return	
  */
 public function updateJoomlaGroup($userId, $profileId)
 {
     $profile = ES::table('Profile');
     $profile->load($profileId);
     // Get the list of groups
     $gid = $profile->getJoomlaGroups();
     $options = array('gid' => $gid);
     // Get the current user object and assign it
     $user = ES::user($userId);
     $user->bind($options);
     // Save the user object
     $state = $user->save();
     return $state;
 }
コード例 #5
0
ファイル: group.php プロジェクト: knigherrant/decopatio
 /**
  * Determines if the provided user id is a member of this group
  *
  * @since	1.0
  * @access	public
  * @param	int		The user's id to check against.
  * @return	bool	True if he / she is a member already.
  */
 public function isMember($userId = null)
 {
     $userId = ES::user($userId)->id;
     if (isset($this->members[$userId])) {
         return true;
     }
     return false;
 }