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


PHP JLoader类代码示例

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


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

示例1: getItems

 /**
  * Method to get a list of tasks
  *
  * @return    array    $items    The tasks
  */
 public static function getItems($params)
 {
     JLoader::register('PFtasksModelTasks', JPATH_SITE . '/components/com_pftasks/models/tasks.php');
     $model = JModelLegacy::getInstance('Tasks', 'PFtasksModel', array('ignore_request' => true));
     // Set application parameters in model
     $app = JFactory::getApplication();
     $appParams = $app->getParams();
     $model->setState('params', $appParams);
     // Set the filters based on the module params
     $model->setState('list.start', 0);
     $model->setState('list.limit', (int) $params->get('count', 10));
     $model->setState('filter.published', 1);
     // Set project filter
     if (!(int) $params->get('tasks_of')) {
         $model->setState('filter.project', PFApplicationHelper::getActiveProjectId());
     } else {
         $project = (int) $params->get('project');
         if ($project) {
             $model->setState('filter.project', $project);
         } else {
             $model->setState('filter.project', PFApplicationHelper::getActiveProjectId());
         }
     }
     // Set completition filter
     $model->setState('filter.complete', $params->get('filter_complete'));
     // Sort and order
     $model->setState('list.ordering', $params->get('sort'));
     $model->setState('list.direction', $params->get('order'));
     $items = $model->getItems();
     return $items;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:36,代码来源:helper.php

示例2: display

 /**
  * Return JSON encoded data for Statistic page
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $params = $app->getParams();
     jimport('joomla.environment.request');
     /* validating request */
     $guild_id = $params->get('guild_id', '0');
     $groups = $params->get('allowed_groups');
     $by_chars = $params->get('stats_by_chars', 0);
     $show_rating = $params->get('show_rating', 0);
     if ($guild_id != 0) {
         JRequest::setVar('guild_id', $guild_id, 'get', true);
     }
     if ($by_chars == 0) {
         JRequest::setVar('character_id', 0, 'get', true);
     }
     if ($show_rating != 0) {
         JRequest::setVar('show_rating', 1, 'get', true);
     }
     if (JRequest::getVar('group_id', '', 'get', 'int') != '') {
         if (!in_array(JRequest::getVar('group_id', '', 'get', 'int'), $groups)) {
             JRequest::setVar('group_id', '', 'get', true);
         }
     }
     /* load backend controller */
     JLoader::register('RaidPlannerControllerStats', JPATH_ADMINISTRATOR . '/components/com_raidplanner/controllers/stats.php');
     $tmp = new RaidPlannerControllerStats();
     $tmp->display();
 }
开发者ID:dnaoverride,项目名称:RaidPlanner,代码行数:32,代码来源:view.json.php

示例3: onUserTwofactorShowConfiguration

 /**
  * Shows the configuration page for this two factor authentication method.
  *
  * @param   object   $otpConfig  The two factor auth configuration object
  * @param   integer  $user_id    The numeric user ID of the user whose form we'll display
  *
  * @return  boolean|string  False if the method is not ours, the HTML of the configuration page otherwise
  *
  * @see     UsersModelUser::getOtpConfig
  * @since   3.2
  */
 public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)
 {
     if ($otpConfig->method == $this->methodName) {
         // This method is already activated. Reuse the same Yubikey ID.
         $yubikey = $otpConfig->config['yubikey'];
     } else {
         // This methods is not activated yet. We'll need a Yubikey TOTP to setup this Yubikey.
         $yubikey = '';
     }
     // Is this a new TOTP setup? If so, we'll have to show the code validation field.
     $new_totp = $otpConfig->method != $this->methodName;
     // Start output buffering
     @ob_start();
     // Include the form.php from a template override. If none is found use the default.
     $path = FOFPlatform::getInstance()->getTemplateOverridePath('plg_twofactorauth_yubikey', true);
     JLoader::import('joomla.filesystem.file');
     if (JFile::exists($path . '/form.php')) {
         include_once $path . '/form.php';
     } else {
         include_once __DIR__ . '/tmpl/form.php';
     }
     // Stop output buffering and get the form contents
     $html = @ob_get_clean();
     // Return the form contents
     return array('method' => $this->methodName, 'form' => $html);
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:37,代码来源:yubikey.php

示例4: fetchElement

 /**
  * Fetch custom Element view.
  *
  * @param   string  $name          Field Name.
  * @param   mixed   $value         Field value.
  * @param   mixed   $node          Field node.
  * @param   mixed   $control_name  Field control_name/Id.
  *
  * @since   2.2
  * @return   null
  */
 public function fetchElement($name, $value, $node, $control_name)
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     // Load Zone helper.
     $path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "zoneHelper.php";
     JLoader::register('zoneHelper', $path);
     JLoader::load('zoneHelper');
     $zoneHelper = new zoneHelper();
     // Get user's accessible zone list
     $zoneList = $zoneHelper->getUserZoneList('', array(1));
     $options = array();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $taxrate_id = $jinput->get('id');
     $defaultZoneid = "";
     if ($taxrate_id) {
         $defaultZoneid = $zoneHelper->getZoneFromTaxRateId($taxrate_id);
     }
     foreach ($zoneList as $zone) {
         $zoneName = ucfirst($zone['name']);
         $options[] = JHtml::_('select.option', $zone['id'], $zoneName);
     }
     $fieldName = $name;
     return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required"  size="1"  ', 'value', 'text', $defaultZoneid, $control_name);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:37,代码来源:zonelist.php

示例5: onAdd

 protected function onAdd($tpl = null)
 {
     /** @var AkeebaModelCpanels $model */
     $model = $this->getModel();
     $aeconfig = Factory::getConfiguration();
     // Load the helper classes
     $this->loadHelper('utils');
     $this->loadHelper('status');
     $statusHelper = AkeebaHelperStatus::getInstance();
     // Load the model
     if (!class_exists('AkeebaModelStatistics')) {
         JLoader::import('models.statistics', JPATH_COMPONENT_ADMINISTRATOR);
     }
     $statmodel = new AkeebaModelStatistics();
     $this->profileid = $model->getProfileID();
     // Active profile ID
     $this->profilelist = $model->getProfilesList();
     // List of available profiles
     $this->statuscell = $statusHelper->getStatusCell();
     // Backup status
     $this->detailscell = $statusHelper->getQuirksCell();
     // Details (warnings)
     $this->statscell = $statmodel->getLatestBackupDetails();
     $this->fixedpermissions = $model->fixMediaPermissions();
     // Fix media/com_akeeba permissions
     $this->needsdlid = $model->needsDownloadID();
     $this->needscoredlidwarning = $model->mustWarnAboutDownloadIDInCore();
     $this->extension_id = $model->getState('extension_id', 0, 'int');
     // Should I ask for permission to display desktop notifications?
     JLoader::import('joomla.application.component.helper');
     $this->desktop_notifications = \Akeeba\Engine\Util\Comconfig::getValue('desktop_notifications', '0') ? 1 : 0;
     $this->statsIframe = F0FModel::getTmpInstance('Stats', 'AkeebaModel')->collectStatistics(true);
     return $this->onDisplay($tpl);
 }
开发者ID:jvhost,项目名称:A-Website,代码行数:34,代码来源:view.html.php

示例6: onAdd

 public function onAdd($tpl = null)
 {
     $media_folder = JURI::base() . '../media/com_akeeba/';
     // Get a JSON representation of GUI data
     $json = AkeebaHelperEscape::escapeJS(AEUtilInihelper::getJsonGuiDefinition(), '"\\');
     $this->assignRef('json', $json);
     // Get profile ID
     $profileid = AEPlatform::getInstance()->get_active_profile();
     $this->assign('profileid', $profileid);
     // Get profile name
     $profileName = FOFModel::getTmpInstance('Profiles', 'AkeebaModel')->setId($profileid)->getItem()->description;
     $this->assign('profilename', $profileName);
     // Get the root URI for media files
     $this->assign('mediadir', AkeebaHelperEscape::escapeJS($media_folder . 'theme/'));
     // Are the settings secured?
     if (AEPlatform::getInstance()->get_platform_configuration_option('useencryption', -1) == 0) {
         $this->assign('securesettings', -1);
     } elseif (!AEUtilSecuresettings::supportsEncryption()) {
         $this->assign('securesettings', 0);
     } else {
         JLoader::import('joomla.filesystem.file');
         $filename = JPATH_COMPONENT_ADMINISTRATOR . '/akeeba/serverkey.php';
         if (JFile::exists($filename)) {
             $this->assign('securesettings', 1);
         } else {
             $this->assign('securesettings', 0);
         }
     }
     // Add live help
     AkeebaHelperIncludes::addHelp('config');
 }
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:31,代码来源:view.html.php

示例7: getDownloadHtml

 public static function getDownloadHtml($product_id)
 {
     $app = JFactory::getApplication();
     $html = '';
     JLoader::register("J2StoreViewDownloads", JPATH_SITE . "/components/com_j2store/views/downloads/view.html.php");
     $layout = 'freefiles';
     $view = new J2StoreViewDownloads();
     //$view->_basePath = JPATH_ROOT.DS.'components'.DS.'com_j2store';
     $view->addTemplatePath(JPATH_SITE . '/components/com_j2store/views/downloads/tmpl');
     $view->addTemplatePath(JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_j2store/downloads');
     require_once JPATH_SITE . '/components/com_j2store/models/downloads.php';
     $model = new J2StoreModelDownloads();
     $files = $model->getFreeFiles($product_id);
     $view->assign('_basePath', JPATH_SITE . '/components/com_j2store');
     $view->set('_controller', 'downloads');
     $view->set('_view', 'downloads');
     $view->set('_doTask', true);
     $view->set('hidemenu', true);
     $view->setModel($model, true);
     $view->setLayout($layout);
     $view->assign('product_id', $product_id);
     $config = JComponentHelper::getParams('com_j2store');
     $view->assign('params', $config);
     $view->assign('files', $files);
     ob_start();
     $view->display();
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:30,代码来源:downloads.php

示例8: renderInput

        function renderInput($articleid, $fieldsid, $value, $extras = null )
        {
             $required="";
            global $sitepath; 
            JLoader::register('fieldattach',  $sitepath.DS.'components/com_fieldsattach/helpers/fieldattach.php');
            
            
            $boolrequired = fieldattach::isRequired($fieldsid);
            if($boolrequired) $required="required";
            
             //Add CSS ***********************
            $str =  '<link rel="stylesheet" href="'.JURI::root() .'plugins/fieldsattachment/vimeo/vimeo.css" type="text/css" />'; 
            $app = JFactory::getApplication();
            $templateDir = JURI::base() . 'templates/' . $app->getTemplate();
            $css =  JPATH_SITE ."/administrator/templates/". $app->getTemplate(). "/html/com_fieldsattach/css/vimeo.css";
            $pathcss= JURI::root()."administrator/templates/". $app->getTemplate()."/html/com_fieldsattach/css/vimeo.css"; 
            if(file_exists($css)){ $str .=  '<link rel="stylesheet" href="'.$pathcss.'" type="text/css" />'; } 

             $str  .= '<div class="vimeo"><div class="file">';
             $str .= '<span>'.JText::_("CODE").'</span>';
             $str  .= '<input  name="field_'.$fieldsid.'" type="text" size="150" value="'.$value.'" class="customfields '.$required.'" />';
             $str  .= '</div>';
             $str  .= '<iframe src="http://player.vimeo.com/video/'.$value    .'" frameborder="0"></iframe>';
             $str .= '</div>';
             return $str  ;
        }
开发者ID:xenten,项目名称:swift-kanban,代码行数:26,代码来源:vimeo.php

示例9: __construct

 public function __construct()
 {
     JLoader::import('joomla.filesystem.file');
     //	$isPro = defined('ARS_PRO') ? (ARS_PRO == 1) : false;
     // Load the component parameters, not using JComponentHelper to avoid conflicts ;)
     JLoader::import('joomla.html.parameter');
     JLoader::import('joomla.application.component.helper');
     $db = JFactory::getDbo();
     $sql = $db->getQuery(true)->select($db->quoteName('params'))->from($db->quoteName('#__extensions'))->where($db->quoteName('type') . ' = ' . $db->quote('component'))->where($db->quoteName('element') . ' = ' . $db->quote('com_j2store'));
     $db->setQuery($sql);
     $rawparams = $db->loadResult();
     $params = new JRegistry();
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $params->loadString($rawparams, 'JSON');
     } else {
         $params->loadJSON($rawparams);
     }
     // Dev releases use the "newest" strategy
     if (substr($this->_currentVersion, 1, 2) == 'ev') {
         $this->_versionStrategy = 'newest';
     } else {
         $this->_versionStrategy = 'vcompare';
     }
     // Get the minimum stability level for updates
     $this->_minStability = $params->get('minstability', 'stable');
     // Do we need authorized URLs?
     $this->_requiresAuthorization = false;
     // Should I use our private CA store?
     if (@file_exists(dirname(__FILE__) . '/../assets/cacert.pem')) {
         $this->_cacerts = dirname(__FILE__) . '/../assets/cacert.pem';
     }
     parent::__construct();
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:33,代码来源:config.php

示例10: __construct

 /**
  * Constructor
  *
  * @since 0.1
  */
 function __construct()
 {
     // Include the tables in path
     JLoader::import('xmlrpc', JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'phpxmlrpc');
     JLoader::import('xmlrpcs', JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'phpxmlrpc');
     parent::__construct();
 }
开发者ID:Tommar,项目名称:vino2,代码行数:12,代码来源:xmlrpc.php

示例11: getOrderDetails

 public function getOrderDetails()
 {
     $orderModel = VmModel::getModel('orders');
     $orderDetails = 0;
     // If the user is not logged in, we will check the order number and order pass
     if ($orderPass = JRequest::getString('order_pass', false) and $orderNumber = JRequest::getString('order_number', false)) {
         $orderId = $orderModel->getOrderIdByOrderPass($orderNumber, $orderPass);
         if (empty($orderId)) {
             vmDebug('Invalid order_number/password ' . JText::_('COM_VIRTUEMART_RESTRICTED_ACCESS'));
             return 0;
         }
         $orderDetails = $orderModel->getOrder($orderId);
     }
     if ($orderDetails == 0) {
         $_currentUser = JFactory::getUser();
         $cuid = $_currentUser->get('id');
         // If the user is logged in, we will check if the order belongs to him
         $virtuemart_order_id = JRequest::getInt('virtuemart_order_id', 0);
         if (!$virtuemart_order_id) {
             $virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber(JRequest::getString('order_number'));
         }
         $orderDetails = $orderModel->getOrder($virtuemart_order_id);
         JLoader::register('Permissions', JPATH_VM_ADMINISTRATOR . '/helpers/permissions.php');
         if (!Permissions::getInstance()->check("admin")) {
             if (!empty($orderDetails['details']['BT']->virtuemart_user_id)) {
                 if ($orderDetails['details']['BT']->virtuemart_user_id != $cuid) {
                     echo 'view ' . JText::_('COM_VIRTUEMART_RESTRICTED_ACCESS');
                     return;
                 }
             }
         }
     }
     return $orderDetails;
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:34,代码来源:invoice.php

示例12: getInput

 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     $input = parent::getInput();
     return $input;
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:7,代码来源:jevcheckbox.php

示例13: jflanguagesType

 function jflanguagesType()
 {
     $this->values = array();
     if (ACYMAILING_J16 && file_exists(JPATH_SITE . DS . 'libraries' . DS . 'joomfish' . DS . 'manager.php') || !ACYMAILING_J16 && file_exists(JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_joomfish' . DS . 'classes' . DS . 'JoomfishManager.class.php')) {
         include_once JPATH_SITE . DS . 'components' . DS . 'com_joomfish' . DS . 'helpers' . DS . 'defines.php';
         if (!ACYMAILING_J16) {
             include_once JOOMFISH_ADMINPATH . DS . 'classes' . DS . 'JoomfishManager.class.php';
         } else {
             include_once JPATH_SITE . DS . 'libraries' . DS . 'joomfish' . DS . 'manager.php';
         }
         $jfManager = JoomFishManager::getInstance();
         $langActive = $jfManager->getActiveLanguages();
         $this->values[] = JHTML::_('select.option', '', JText::_('DEFAULT_LANGUAGE'));
         foreach ($langActive as $oneLanguage) {
             $this->values[] = JHTML::_('select.option', $oneLanguage->shortcode . ',' . $oneLanguage->id, $oneLanguage->name);
         }
         $this->found = true;
     }
     if (empty($this->values) && file_exists(JPATH_SITE . DS . 'components' . DS . 'com_falang' . DS . 'helpers' . DS . 'defines.php') && (include_once JPATH_SITE . DS . 'components' . DS . 'com_falang' . DS . 'helpers' . DS . 'defines.php')) {
         JLoader::register('FalangManager', FALANG_ADMINPATH . '/classes/FalangManager.class.php');
         $fManager = FalangManager::getInstance();
         $langActive = $fManager->getActiveLanguages();
         $this->values[] = JHTML::_('select.option', '', JText::_('DEFAULT_LANGUAGE'));
         foreach ($langActive as $oneLanguage) {
             $this->values[] = JHTML::_('select.option', $oneLanguage->lang_code . ',' . $oneLanguage->lang_id, $oneLanguage->title);
         }
         $this->found = true;
     }
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:29,代码来源:jflanguages.php

示例14: display

 /**
  * Display the view.
  *
  * @param	string	$tpl	The subtemplate to display.
  *
  * @return	void
  */
 function display($tpl = null)
 {
     // Get params
     JLoader::import('helpers.redmigrator', JPATH_COMPONENT_ADMINISTRATOR);
     $params = redMigratorHelper::getParams();
     //
     // Joomla bug: JInstaller not save the defaults params reading config.xml
     //
     $db = JFactory::getDBO();
     if (!$params->method) {
         $default_params = '{"method":"rest","rest_hostname":"http:\\/\\/www.example.org\\/","rest_username":"","rest_password":"","rest_key":"","path":"","driver":"mysql","hostname":"localhost","username":"","password":"","database":"","prefix":"jos_","skip_checks":"0","skip_files":"1","skip_templates":"1","skip_extensions":"1","skip_core_users":"0","skip_core_categories":"0","skip_core_sections":"0","skip_core_contents":"0","skip_core_contents_frontpage":"0","skip_core_menus":"0","skip_core_menus_types":"0","skip_core_modules":"0","skip_core_modules_menu":"0","skip_core_banners":"0","skip_core_banners_clients":"0","skip_core_banners_tracks":"0","skip_core_contacts":"0","skip_core_newsfeeds":"0","skip_core_weblinks":"0","positions":"0","debug":"0"}';
         $query = "UPDATE #__extensions SET `params` = '{$default_params}' WHERE `element` = 'com_redmigrator'";
         $db->setQuery($query);
         $db->query();
         // Get params.. again
         $params = redMigratorHelper::getParams();
     }
     // Load mooTools
     JHtml::_('behavior.framework', true);
     $xmlfile = JPATH_COMPONENT_ADMINISTRATOR . '/redmigrator.xml';
     $xml = JFactory::getXML($xmlfile);
     $this->params = $params;
     $this->version = $xml->version[0];
     parent::display($tpl);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:32,代码来源:view.html.php

示例15: getInstance

 /**
  * Get's an instance of the correct class that should handle the avatars
  *
  * @param   string  $type  - the avatar system to use
  *
  * @return mixed
  *
  * @throws Exception
  */
 public static function getInstance($type)
 {
     // If we already have a database connector instance for these options then just use that.
     if (empty(self::$instances[$type])) {
         // Derive the class name from the type.
         $class = 'CompojoomAvatars' . ucfirst($type);
         // If the class doesn't exist, let's look for it and register it.
         if (!class_exists($class)) {
             // Derive the file path for the type class.
             $path = dirname(__FILE__) . '/avatars/' . strtolower($type) . '.php';
             // If the file exists register the class with our class loader.
             if (file_exists($path)) {
                 JLoader::register($class, $path);
             } else {
                 throw new Exception('Specified avatar is not supported: ' . $type);
             }
         }
         // If the class still doesn't exist we have nothing left to do but throw an exception.  We did our best.
         if (!class_exists($class)) {
             throw new Exception('Specified avatar is not supported: ' . $type);
         }
         // Set the new connector to the global instances based on signature.
         self::$instances[$type] = new $class();
     }
     return self::$instances[$type];
 }
开发者ID:compojoom,项目名称:lib_compojoom,代码行数:35,代码来源:avatars.php


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