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


PHP JModuleHelper::getModule方法代码示例

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


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

示例1: site

 function site()
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUSER();
     //geting usertype from user
     $arrMultiGroups[] = $user->usertype;
     //get multigrop names if user have it
     $sqlGetMultigroups = "SELECT grp.name FROM #__core_acl_aro_groups as grp, #__noixacl_multigroups multigrp WHERE grp.id = multigrp.id_group AND multigrp.id_user = {$user->id}";
     $db->setQuery($sqlGetMultigroups);
     $multiGroups = $db->loadObjectList();
     if (!empty($multiGroups)) {
         foreach ($multiGroups as $mgrp) {
             $arrMultiGroups[] = $mgrp->name;
         }
     }
     $queryModules = "SELECT axo_section, axo_value FROM #__noixacl_rules WHERE aco_section = 'com_modules' AND aco_value = 'block' AND aro_value IN ('" . implode("','", $arrMultiGroups) . "')";
     $db->setQuery($queryModules);
     $hideModules = $db->loadObjectList();
     if (!empty($hideModules)) {
         jimport('joomla.application.module.helper');
         foreach ($hideModules as $module) {
             $moduleInstance =& JModuleHelper::getModule(str_replace('mod_', '', $module->axo_section), $module->axo_value);
             $moduleInstance->position = NULL;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:26,代码来源:plugin.php

示例2: getAuthorizeURL

 public static function getAuthorizeURL()
 {
     $params =& JComponentHelper::getParams('mod_instagallery');
     var_dump($params);
     exit;
     $myvariable = $params->get('client_id');
     var_dump($myvariable);
     exit;
     $app = JFactory::getApplication();
     $mycom_params =& $app->getParams('mod_instagallery');
     var_dump($mycom_params);
     exit;
     $module =& JModuleHelper::getModule('instagallery');
     $params = new JForm($module->params);
     $params->loadString($module->params);
     print $clientID = $params->get('client_id');
     exit;
     $clientSecret = $params->get('client_secret');
     $authCode = $params->get('auth_code');
     $accessToken = $params->get('access_token');
     $redirec_uri = $params->get('redirect_uri');
     $config = array('redirectURI' => $redirec_uri);
     $instagram = new jInstaClass($clientID, $clientSecret, '', '', $config);
     return $instagram->authURL();
 }
开发者ID:grisotto,项目名称:mod_instagallery,代码行数:25,代码来源:helper_old.php

示例3: getInput

    /**
     * Method to get the field input markup.
     *
     * @return    string    The field input markup.
     * @since    1.6
     */
    public function getInput()
    {
        $app = JFactory::getApplication();
        $app->input->set('hidemainmenu', false);
        $menu = JModuleHelper::getModule('mod_menu');
        $menu = JModuleHelper::renderModule($menu);
        $menu = str_replace('<ul id="menu" class="nav ', '<ul id="menu" class="nav nav-pills ', $menu);
        //$app->input->set('hidemainmenu', true) ;
        $script = <<<SCRIPT
\t\t
\t\t<script type="text/javascript">
\t\t\twindow.addEvent('domready', function(){
\t\t\t\ta = \$\$('.controls > ul > li ul a') ;
\t\t\t\ta.addEvent('click' , function(e){
\t\t\t\t\te.stop();
\t\t\t\t\t\$('jform_link').set('value', e.target.get('href'));
\t\t\t\t\t\$('jform_link').highlight();
\t\t\t\t} );
\t\t\t});
\t\t</script>
\t\t
SCRIPT;
        $app->input->set('hidemainmenu', true);
        echo $script;
        return $menu;
    }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:32,代码来源:menus.php

示例4: count

 /**
  * Get module by id
  *
  * @param   integer  $id   The id of the module
  * @return  object  The Module object
  * @author	Sakis Terz
  * @since	1.6.0
  */
 public static function &getModule($id)
 {
     $result = null;
     $modules =& JModuleHelper::_load();
     $total = count($modules);
     for ($i = 0; $i < $total; $i++) {
         // Match the id of the module
         if ($modules[$i]->id == (int) $id) {
             // Found it
             $result =& $modules[$i];
             break;
             // Found it
         }
     }
     // If we didn't find it, and the name is mod_something, create a dummy object
     if (is_null($result)) {
         $result = parent::getModule('mod_cf_filtering');
         if (is_null($result)) {
             $result = new stdClass();
             $result->id = 0;
             $result->title = '';
             $result->module = 'mod_cf_filtering';
             $result->position = '';
             $result->content = '';
             $result->showtitle = 0;
             $result->control = '';
             $result->params = '';
             $result->user = 0;
         }
     }
     return $result;
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:40,代码来源:cfmoduleHelper.php

示例5: loadModule

 public static function loadModule($name, $style = 'raw')
 {
     jimport('joomla.application.module.helper');
     $module = JModuleHelper::getModule($name);
     $params = array('style' => $style);
     echo JModuleHelper::renderModule($module, $params);
 }
开发者ID:ForAEdesWeb,项目名称:AEW3,代码行数:7,代码来源:templateHelper.php

示例6: getPropertyList

 function getPropertyList()
 {
     $modProperties = JModuleHelper::getModule('danh_sach_BDS', 'BAN DO');
     $attribs['style'] = 'raw';
     $dataHTML = JModuleHelper::renderModule($modProperties, $attribs);
     echo $dataHTML;
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:7,代码来源:view.html.php

示例7: getAjax

 public static function getAjax()
 {
     jimport('joomla.application.module.helper');
     $input = JFactory::getApplication()->input;
     $module = JModuleHelper::getModule('hoicoi_openmeetings');
     $params = new JRegistry();
     $params->loadString($module->params);
     $values = explode(',', rtrim($params->get('rooms'), ","));
     if (self::getVerification($values, $input->get("room_id"), $input->get("password", "", 'STRING'))) {
         $options = array("protocol" => $params->get('protocol'), "port" => $params->get('port'), "host" => $params->get('host'), "webappname" => $params->get('webappname'), "adminUser" => $params->get('adminUser'), "adminPass" => $params->get('adminPass'));
         $access = new openmeetings_gateway($options);
         if (!$access->loginuser()) {
             $data = array("error" => 03, "text" => self::getErrorInfo(03));
             return $data;
         }
         $hash = $access->setUserObjectAndGenerateRoomHash($input->get("name"), $input->get("name", "", 'STRING'), "", "", $input->get("email", "", 'STRING'), JSession::getInstance("", "")->getId(), "Joomla", $input->get("room_id"), self::$isAdmin, self::$isRecodring);
         if (preg_match('/\\D/', $hash)) {
             $url = $access->getUrl() . "/?secureHash=" . $hash;
             //Get final URL
             $data = array("url" => $url);
             return $data;
         } else {
             $data = array("error" => $hash, "text" => self::getErrorInfo($hash));
             return $data;
         }
     } else {
         $data = array("error" => 02, "text" => self::getErrorInfo(02));
         return $data;
     }
     $data = array("error" => 01, "text" => self::getErrorInfo(01));
     return $data;
 }
开发者ID:jibon57,项目名称:mod_hoicoi_openmeetings,代码行数:32,代码来源:helper.php

示例8: getParams

 private function getParams()
 {
     $module = JModuleHelper::getModule('instagram');
     $params = new JRegistry();
     $params->loadString($module->params);
     return $params;
 }
开发者ID:grisotto,项目名称:mod_instagallery,代码行数:7,代码来源:authorize.php

示例9: init

 public static function init($params = null)
 {
     // init path
     $modulePath = 'modules/' . self::$moduleName . '/';
     $path = str_replace($modulePath, "", JURI::base());
     self::$path = $path . 'modules/' . self::$moduleName . '/';
     if (!$params) {
         jimport('joomla.application.module.helper');
         $module =& JModuleHelper::getModule("mm_feedback");
         $params = new JParameter($module->params);
     }
     // init scripts and styles
     JHTML::script('jquery-1.7.1.min.js', self::$path . 'assets/js/libs/jquery/');
     JHTML::script('jquery.noconflict.js', self::$path . 'assets/js/');
     JHTML::script('jquery.mousewheel-3.0.6.pack.js', self::$path . 'assets/js/libs/jquery/');
     JHTML::script('jquery.fancybox.js', self::$path . 'assets/js/libs/jquery/fancybox/');
     JHTML::stylesheet('jquery.fancybox.css', self::$path . 'assets/js/libs/jquery/fancybox/');
     JHTML::stylesheet('jquery.fancybox-buttons.css', self::$path . 'assets/js/libs/jquery/fancybox/helpers/');
     JHTML::script('jquery.fancybox-buttons.js', self::$path . 'assets/js/libs/jquery/fancybox/helpers/');
     JHTML::stylesheet('jquery.fancybox-thumbs.css', self::$path . 'assets/js/libs/jquery/fancybox/helpers/');
     JHTML::script('jquery.fancybox-thumbs.js', self::$path . 'assets/js/libs/jquery/fancybox/helpers/');
     JHTML::script('default.js', self::$path . 'assets/js/');
     JHTML::stylesheet('zenbox.css', self::$path . 'assets/css/');
     // init inline scripts
     $doc =& JFactory::getDocument();
     $result = array();
     $result[] = "modMmFeedback.baseUrl = '" . JURI::base() . "'";
     $result[] = "modMmFeedback.moduleName = '" . self::$moduleName . "'";
     $doc->addScriptDeclaration(implode(";\n", $result) . ";");
     $instance = new modMmFeedback();
     $instance->params = $params;
     return $instance;
 }
开发者ID:rivetweb,项目名称:old-joomla-lp-ecwid,代码行数:33,代码来源:helper.php

示例10: rend_html_Module

 function rend_html_Module($params)
 {
     $list_module = array();
     $modules = array();
     if ($params->get('modulename', '')) {
         $list_module = explode(",", $params->get('modulename'));
     }
     for ($i = 0; $i < count($list_module); $i++) {
         if ($list_module[$i] != 'mod_jatoppanel') {
             $modules[$i] = JModuleHelper::getModule(substr(trim($list_module[$i]), 4));
             if ($modules[$i] && $modules[$i]->id) {
                 $modules[$i]->content = JModuleHelper::renderModule($module);
             }
         }
     }
     if ($list) {
         $class = $params->get('display', 'ja-toppanel-col');
         ob_start();
         $path = JModuleHelper::getLayoutPath('mod_jatoppanel', 'default_modules');
         if (file_exists($path)) {
             require $path;
         }
         $this->_result = ob_get_clean();
     }
 }
开发者ID:valerymargunov,项目名称:InternetShopPL,代码行数:25,代码来源:helper.php

示例11: display

 function display()
 {
     jimport('joomla.application.module.helper');
     $module =& JModuleHelper::getModule('mod_login');
     $module = JModuleHelper::renderModule($module, array('style' => 'rounded', 'id' => 'section-box'));
     echo $module;
 }
开发者ID:jicheng17,项目名称:comanova,代码行数:7,代码来源:admin.login.php

示例12: loadModule

 /**
  * KSSystem::loadModule()
  *
  * @param mixed $name
  * @param mixed $params
  * @return
  */
 public static function loadModule($name, $params = array())
 {
     $document = JFactory::getDocument();
     $module = JModuleHelper::getModule($name);
     $renderer = $document->loadRenderer('module');
     return $renderer->render($module, $params, null);
 }
开发者ID:JexyRu,项目名称:Ksenmart,代码行数:14,代码来源:system.php

示例13: update_mod

 /**
  * Function used to update
  *
  * @param   INT  $called_frm  //Mundhe complet this
  *
  * @return  Array
  *
  * @since  1.0.0
  */
 public function update_mod($called_frm = '0')
 {
     $lang = JFactory::getLanguage();
     $lang->load('mod_quick2cart', JPATH_ROOT);
     $comquick2cartHelper = new comquick2cartHelper();
     jimport('joomla.application.module.helper');
     if (JModuleHelper::getModule('mod_quick2cart')) {
         $module = JModuleHelper::getModule('mod_quick2cart');
         if (JVERSION < '1.6.0') {
             $moduleParams = new JParameter($module->params);
             $layout = $moduleParams->get('viewtype');
             $ckout_text = $moduleParams->get('checkout_text');
         } else {
             $moduleParams = json_decode($module->params);
             if (!empty($moduleParams)) {
                 $layout = $moduleParams->viewtype;
                 $ckout_text = $moduleParams->checkout_text;
             }
         }
     }
     if (isset($layout) && isset($ckout_text)) {
         $data = $comquick2cartHelper->get_module($layout, $ckout_text);
     } else {
         $data = $comquick2cartHelper->get_module();
     }
     echo $data;
     jexit();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:37,代码来源:cart.php

示例14: display

 function display($tpl = null)
 {
     jimport('joomla.html.pane');
     $pane = JPane::getInstance('Tabs');
     $this->assignRef('pane', $pane);
     $model = $this->getModel();
     $numOfK2Items = $model->countK2Items();
     $this->assignRef('numOfK2Items', $numOfK2Items);
     $numOfVmProducts = $model->countVmProducts();
     $this->assignRef('numOfVmProducts', $numOfVmProducts);
     $numOfK2martProducts = $model->countK2martProducts();
     $this->assignRef('numOfK2martProducts', $numOfK2martProducts);
     $module = JModuleHelper::getModule('mod_k2mart');
     $params = new JRegistry();
     $params->loadString($module->params);
     $params->set('modLogo', "0");
     $params->set('modCSSStyling', "1");
     $module->params = $params->toString();
     $charts = JModuleHelper::renderModule($module);
     $this->assignRef('charts', $charts);
     $document = JFactory::getDocument();
     $document->addCustomTag('<!--[if lte IE 7]><link href="' . JURI::base() . 'components/com_k2mart/css/style_ie7.css" rel="stylesheet" type="text/css" /><![endif]-->');
     $this->loadHelper('html');
     K2martHTMLHelper::title('K2MART_DASHBOARD');
     K2martHTMLHelper::toolbar();
     K2martHTMLHelper::subMenu();
     parent::display($tpl);
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:28,代码来源:view.html.php

示例15: render

 function render($position = "")
 {
     global $gantry;
     $output = '';
     $renderer = $gantry->document->loadRenderer('module');
     $options = array('style' => "raw");
     $params = array();
     $group_params = $gantry->getParams($this->_feature_prefix . "-" . $this->_feature_name, true);
     $group_params_reg = new JRegistry();
     foreach ($group_params as $param_name => $param_value) {
         $group_params_reg->set($param_name, $param_value['value']);
     }
     if ($position == $this->get('mainmenu-position')) {
         $params = $gantry->getParams($this->_feature_prefix . "-" . $this->_feature_name . "-mainmenu", true);
         $module = JModuleHelper::getModule('mod_menu', '_z_empty');
         $reg = new JRegistry();
         foreach ($params as $param_name => $param_value) {
             $reg->set($param_name, $param_value['value']);
         }
         $reg->merge($group_params_reg);
         $module->params = $reg->toString();
         $output .= $renderer->render($module, $options);
     }
     return $output;
 }
开发者ID:neppoz,项目名称:jbootstrap,代码行数:25,代码来源:navbarmenu.php


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