本文整理汇总了PHP中FD::modules方法的典型用法代码示例。如果您正苦于以下问题:PHP FD::modules方法的具体用法?PHP FD::modules怎么用?PHP FD::modules使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FD
的用法示例。
在下文中一共展示了FD::modules方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jimport
$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;
// Check if Foundry exists
if (!FD::exists()) {
FD::language()->loadSite();
echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_leaderboard');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$total = (int) $params->get('total', 10);
// Get the layout to use.
$model = FD::model('Leaderboard');
// Should we exclude admin here
$config = FD::config();
$excludeAdmin = !$config->get('leaderboard.listings.admin');
$options = array('ordering' => 'points', 'limit' => $total, 'excludeAdmin' => $excludeAdmin);
$users = $model->getLadder($options);
示例2: defined
defined('_JEXEC') or die('Unauthorized Access');
// Include main engine
$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;
// Check if Foundry exists
if (!FD::exists()) {
FD::language()->loadSite();
echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
return;
}
$my = FD::user();
// If the user is not logged in, don't show the menu
if (!$my->id) {
return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_notifications');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_notifications', $layout);
示例3: jimport
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
return;
}
// 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;
}
$my = FD::user();
// Load our own helper file.
require_once dirname(__FILE__) . '/helper.php';
// Load up the module engine
$modules = FD::modules('mod_easysocial_login');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
JFactory::getDocument()->addStylesheet('modules/mod_easysocial_signupbox/styles/style.css');
JFactory::getDocument()->addStylesheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css');
// Get the layout to use.
$suffix = $params->get('suffix', '');
$return = EasySocialModLoginHelper::getReturnURL($params);
$config = FD::config();
// Facebook codes.
$facebook = FD::oauth('Facebook');
require JModuleHelper::getLayoutPath('mod_easysocial_signupbox', 'default');
示例4: defined
defined('_JEXEC') or die('Unauthorized Access');
// Include main engine
$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;
// Check if Foundry exists
if (!FD::exists()) {
FD::language()->loadSite();
echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
return;
}
$my = FD::user();
// If the user is not logged in, don't show the menu
if (!$my->guest) {
return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_registration_requester');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css', 'javascript');
// $modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_registration_requester', $layout);
示例5:
if (!JFile::exists($file) || !JFile::exists($easyblog)) {
return;
}
// 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 . '/components/com_easyblog/helpers/helper.php';
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_easyblog_posts');
$model = EasyBlogHelper::getModel('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 = EasyBlogHelper::formatBlog($posts, false, true, true, true);
// Get the author of the blog posts
foreach ($posts as $post) {
$post->user = FD::user($post->created_by);
}
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
示例6: dirname
if (JFactory::getUser()->id) {
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;
}
$my = FD::user();
// Load our own helper file.
require_once dirname(__FILE__) . '/helper.php';
// Load up the module engine
$modules = FD::modules('mod_easysocial_logbox');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$config = FD::config();
$facebook = FD::oauth('Facebook');
// Get any callback urls.
$return = EasySocialModLogBoxHelper::getReturnURL($params);
// Get the profile id
$profileId = $params->get('profile_id');
示例7: dirname
// Load up the current user.
$my = FD::user();
// If the user is not logged in, don't show the menu
if (!$my->id) {
return;
}
// THis module will only appear on group pages
$view = JRequest::getVar('view');
$layout = JRequest::getWord('layout');
$id = JRequest::getInt('id');
if ($view != 'groups' || $layout != 'item' || !$id) {
return;
}
require_once dirname(__FILE__) . '/helper.php';
// Get the current group object
$group = FD::group($id);
// Load up the module engine
$modules = FD::modules('mod_easysocial_group_menu');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// Load list of apps for this group
$apps = EasySocialModGroupsMenuHelper::getApps($params, $group);
// Get a list of pending members from the group
$pending = EasySocialModGroupsMenuHelper::getPendingMembers($params, $group);
require JModuleHelper::getLayoutPath('mod_easysocial_group_menu', $layout);
示例8: defined
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
jimport('joomla.filesystem.file');
// Include main engine
$file = JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
if (!JFile::exists($file)) {
return;
}
// 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;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_photos');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css');
// Get the layout to use
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$options = array('ordering' => $params->get('ordering', 'created'), 'limit' => $params->get('limit', 20));
$model = FD::model('Photos');
$photos = $model->getPhotos($options);
require JModuleHelper::getLayoutPath('mod_easysocial_photos', $layout);
示例9: dirname
if (JFactory::getUser()->id) {
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;
}
$my = FD::user();
// Load our own helper file.
require_once dirname(__FILE__) . '/helper.php';
// Load up the module engine
$modules = FD::modules('mod_easysocial_register');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$config = FD::config();
// Get the profile id
$profileId = $params->get('profile_id');
$registerType = $params->get('register_type', 'quick');
// If there's no profile id, then we automatically assign the default profile id
if (empty($profileId)) {
示例10: array
}
// 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;
}
$my = FD::user();
// If user is not loagged in, just return
if (!$my->id) {
return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_followers');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$options = array();
if ($params->get('total')) {
$options['limit'] = $params->get('total');
}
// Check filter type
$filter = $params->get('filter', 'followedBy');
$model = FD::model('Followers');
if ($filter == 'following') {
示例11: dirname
}
// 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;
}
FD::language()->loadAdmin();
// Load up helper file
require_once dirname(__FILE__) . '/helper.php';
$config = FD::config();
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_dating_search');
// We need these packages
$modules->addDependency('css', 'javascript');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// module setting
$withCover = $params->get('withCover', 0);
$limit = $params->get('total', 6);
//get the fields
$modFields = EasySocialModDatingSearchHelper::getFields($params);
if (!$modFields) {
return;
}
$genderList = array();
示例12: jimport
$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;
// Check if Foundry exists
if (!FD::exists()) {
FD::language()->loadSite();
echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_stream');
// 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', '');
$total = $params->get('total', 10);
// Get the layout to use.
$stream = FD::stream();
$stream->getPublicStream($total);
$readmoreURL = '';
$readmoreText = '';
if ($my->id == 0) {
示例13: jimport
$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';
$categories = EasySocialModGroupsCategoriesHelper::getCategories($params);
if (!$categories) {
return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_groups_categories');
// 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_groups_categories', $layout);
示例14: dirname
// Load up the current user.
$my = FD::user();
// If the user is not logged in, don't show the menu
if (!$my->id) {
return;
}
// THis module will only appear on group pages
$view = JRequest::getVar('view');
$layout = JRequest::getWord('layout');
$id = JRequest::getInt('id');
if ($view != 'events' || $layout != 'item' || !$id) {
return;
}
require_once dirname(__FILE__) . '/helper.php';
// Get the current event object
$event = FD::event($id);
// Load up the module engine
$modules = FD::modules('mod_easysocial_event_menu');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// Load list of apps for this group
$apps = EasySocialModEventsMenuHelper::getApps($params, $event);
// Get a list of pending members from the event
$pending = EasySocialModEventsMenuHelper::getPendingMembers($params, $event);
require JModuleHelper::getLayoutPath('mod_easysocial_event_menu', $layout);
示例15: dirname
return;
}
// Include the engine file.
require_once $engine;
FD::language()->loadSite();
// Check if Foundry exists
if (!FD::exists()) {
return;
}
$my = FD::user();
// If module is configured to display groups from logged in user, ensure that the user is logged in
if ($params->get('filter') == '3' && $my->guest) {
return;
}
// Load up helper file
require_once dirname(__FILE__) . '/helper.php';
$groups = EasySocialModGroupsHelper::getGroups($params);
if (!$groups) {
return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_groups');
// 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_groups', $layout);