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


PHP JModuleHelper::getModules方法代码示例

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


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

示例1: parseXmenu

 function parseXmenu($temp)
 {
     while (($ini = strpos($temp, "{xm ")) !== false) {
         $fin = strpos($temp, "}", $ini);
         $parms = substr($temp, $ini + 4, $fin - $ini - 4);
         list($position, $width, $height) = explode(',', $parms);
         if (!empty($position)) {
             settype($width, 'integer');
             settype($height, 'integer');
             $width = $width == 0 ? '' : 'width:' . $width . 'px;';
             $height = $height == 0 ? '' : 'height:' . $height . 'px;';
             $modules = JModuleHelper::getModules($position);
             $attribs = array('style' => 'xhtml');
             $positionhtml = "<div class=\"xmenu_position {$position}\" style=\"{$width} {$height}\">";
             foreach ($modules as $module) {
                 $positionhtml .= JModuleHelper::renderModule($module, $attribs);
             }
             $positionhtml .= "</div>";
         } else {
             $positionhtml = '';
         }
         $temp = substr_replace($temp, $positionhtml, $ini, $fin - $ini + 1);
     }
     // Do double lines
     $temp = str_replace('{xm}', '<span class=\'xmenu\'>', $temp);
     $temp = str_replace('{/xm}', '</span>', $temp);
     return $temp;
 }
开发者ID:jputz12,项目名称:OneNow-Vshop,代码行数:28,代码来源:responsive.php

示例2: display

 function display($tpl = null)
 {
     $this->canDo = JSolrIndexHelper::getActions();
     $this->modules = JModuleHelper::getModules('jsolrindex');
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:bellodox,项目名称:jsolr,代码行数:7,代码来源:view.html.php

示例3: jdocIncludeModules

function jdocIncludeModules($position)
{
    $modules = JModuleHelper::getModules($position);
    foreach ($modules as $module) {
        echo JModuleHelper::renderModule($module);
    }
}
开发者ID:xi,项目名称:kub-template,代码行数:7,代码来源:functions.php

示例4: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a Error object.
  */
 public function display($tpl = null)
 {
     // Set toolbar items for the page
     JToolbarHelper::title(JText::_('COM_CPANEL'), 'home-2 cpanel');
     JToolbarHelper::help('screen.cpanel');
     $input = JFactory::getApplication()->input;
     /*
      * Set the template - this will display cpanel.php
      * from the selected admin template.
      */
     $input->set('tmpl', 'cpanel');
     // Display the cpanel modules
     $this->modules = JModuleHelper::getModules('cpanel');
     // Load the RAD layer and count the number of post-installation messages
     if (!defined('FOF_INCLUDED')) {
         require_once JPATH_LIBRARIES . '/fof/include.php';
     }
     try {
         $messages_model = FOFModel::getTmpInstance('Messages', 'PostinstallModel')->eid(700);
         $messages = $messages_model->getItemList();
     } catch (RuntimeException $e) {
         $messages = array();
         // Still render the error message from the Exception object
         JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
     }
     $this->postinstall_message_count = count($messages);
     parent::display($tpl);
 }
开发者ID:deenison,项目名称:joomla-cms,代码行数:35,代码来源:view.html.php

示例5: renderModules

 /**
  * Change format of HTML when render modules using base in joomla
  *
  * @return  void
  */
 public function renderModules()
 {
     $renderer = $this->_document->loadRenderer('module');
     $positions = $this->_template->getTemplatePositions();
     if ($positions != null) {
         /** if template using joomla modules load **/
         foreach ($positions as $position) {
             if ($this->_document->countModules($position->name)) {
                 $buffer = JSNHtmlHelper::openTag('div', array('class' => "jsn-element-container_inner"));
                 $buffer .= JSNHtmlHelper::openTag('div', array('class' => "jsn-position", 'id' => $position->name . '-jsnposition'));
                 foreach (JModuleHelper::getModules($position->name) as $mod) {
                     $buffer .= JSNHtmlHelper::openTag('div', array('class' => "poweradmin-module-item", 'id' => $mod->id . '-jsnposition-published', 'title' => $mod->title, 'showtitle' => $mod->showtitle)) . JSNHtmlHelper::openTag('div', array('id' => $mod->id . '-content', 'class' => 'jsnpw-module-content')) . $renderer->render($mod, $position->params) . JSNHtmlHelper::closeTag('div') . JSNHtmlHelper::closeTag('div');
                 }
                 $buffer .= JSNHtmlHelper::closeTag('div');
                 $buffer .= JSNHtmlHelper::closeTag('div');
                 $this->_document->setBuffer($buffer, 'modules', $position->name);
             }
         }
     } else {
         /** if template not set load positions in index.php file **/
         $positions = $this->_template->loadXMLPositions();
         foreach ($positions as $position) {
             if ($this->_document->countModules($position->name)) {
                 $buffer = JSNHtmlHelper::openTag('div', array('class' => "jsn-element-container_inner"));
                 $buffer .= JSNHtmlHelper::openTag('div', array('class' => "jsn-position", 'id' => $position->name . '-jsnposition'));
                 foreach (JModuleHelper::getModules($position) as $mod) {
                     $buffer .= JSNHtmlHelper::openTag('div', array('class' => "poweradmin-module-item", 'id' => $mod->id . '-jsnposition-published', 'title' => $mod->title, 'showtitle' => $mod->showtitle)) . JSNHtmlHelper::openTag('div', array('id' => "moduleid-' . {$mod->id} . '-content")) . $renderer->render($mod, $position->params) . JSNHtmlHelper::closeTag('div') . JSNHtmlHelper::closeTag('div');
                 }
                 $buffer .= JSNHtmlHelper::closeTag('div');
                 $buffer .= JSNHtmlHelper::closeTag('div');
                 $this->_document->setBuffer($buffer, 'modules', $position->name);
             }
         }
     }
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:40,代码来源:model.php

示例6: bc_loadBanner

function bc_loadBanner()
{
    $pos = mosGetParam($_REQUEST, 'pos', '');
    $style = mosGetParam($_REQUEST, 'st', 0);
    $no_html = mosGetParam($_REQUEST, 'no_html', 0);
    $format = mosGetParam($_REQUEST, 'format', null);
    //raw
    $tmpl = mosGetParam($_REQUEST, 'tmpl', null);
    //component
    $dynamic = mosGetParam($_REQUEST, 'dyn', 0);
    if (!$pos) {
        return;
    }
    if ($dynamic) {
        //set no caching in browser, this is for dynamic reloading of banner
        header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
        header("Cache-Control: no-store, no-cache, must-revalidate");
        header("Pragma: no-cache");
    }
    if ($format == "raw") {
        //show RAW output, what are 1.5 parameters for render function torender raw output?
        echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" . "\n<html xmlns=\"http://www.w3.org/1999/xhtml\">" . "\n<head>" . "\n<title></title>" . "\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />" . "\n<meta name=\"robots\" content=\"noindex, nofollow\" />" . "\n</head>" . "\n<body>\n";
    }
    // Include the syndicate functions only once
    jimport('joomla.application.module.helper');
    $modules =& JModuleHelper::getModules($pos);
    $total = count($modules);
    for ($i = 0; $i < $total; $i++) {
        JModuleHelper::renderModule($modules[$i]);
    }
    if ($format == "raw") {
        echo "\n</body>\n</html>";
    }
}
开发者ID:hrishikesh-kumar,项目名称:NBSNIP,代码行数:35,代码来源:banner.blastchatc.php

示例7: load

 function load($position)
 {
     // init vars
     $modules = JModuleHelper::getModules($position);
     // set params, force no style
     $params['style'] = 'none';
     // get modules content
     foreach ($modules as $index => $module) {
         // set module params
         $module->parameter = new JRegistry($module->params);
         // set parameter show all children for accordion menu
         if ($module->module == 'mod_menu') {
             if (strpos($module->parameter->get('class_sfx', ''), 'accordion') !== false) {
                 if ($module->parameter->get('showAllChildren') == 0) {
                     $module->parameter->set('showAllChildren', 1);
                     $module->showAllChildren = 0;
                 } else {
                     $module->showAllChildren = 1;
                 }
                 $module->params = $module->parameter->toString();
             }
         }
         $modules[$index]->content = $this->_renderer->render($module, $params);
     }
     return $modules;
 }
开发者ID:smart-one,项目名称:3kita,代码行数:26,代码来源:modules.php

示例8: Joom_ShowMenu_HTML

function Joom_ShowMenu_HTML()
{
    $database =& JFactory::getDBO();
    $document =& JFactory::getDocument();
    $config = Joom_GetConfig();
    jimport('joomla.html.pane');
    $document->addStyleDeclaration('
.joom_cpanel img {
  padding:21px 0px !important;
}');
    $database->setQuery("SELECT id\n      FROM #__components\n      WHERE link = 'option=" . _JOOM_OPTION . "' AND parent=''");
    $id = $database->loadResult();
    $database->setQuery("SELECT *\n      FROM #__components\n      WHERE parent='" . $id . "' ORDER BY id ASC");
    $rows = $database->loadObjectList();
    ?>
<table border="0" cellpadding="10" style="margin-right:auto; margin-left:auto;" class="adminform">
  <tbody>
    <tr>
      <td width="55%" valign="top">
        <div id="cpanel" class="joom_cpanel">
<?php 
    foreach ($rows as $row) {
        Joom_QuickIconButton($row->admin_menu_link, $row->admin_menu_img, $row->name);
    }
    ?>
        </div>
      </td>
      <td width="45%" valign="top">
<?php 
    $modules =& JModuleHelper::getModules('joom_cpanel');
    // TODO: allowAllClose should default true in J!1.6, so remove the array when it does.
    $pane =& JPane::getInstance('sliders', array('allowAllClose' => true));
    echo $pane->startPane("content-pane");
    if ($config->jg_checkupdate) {
        Joom_ShowDatedExtensions($pane);
    }
    foreach ($modules as $module) {
        echo $pane->startPanel($module->title, 'cpanel-panel-' . $module->name);
        echo JModuleHelper::renderModule($module);
        echo $pane->endPanel();
    }
    echo $pane->endPane();
    if ($config->jg_checkupdate) {
        if (!count(Joom_CheckUpdate())) {
            ?>
  <div style=" weight:100%; text-align:center; color:#008000; font-weight:bold;">
    <?php 
            echo JText::_('JGA_SYSTEM_UPTODATE');
            ?>
  </div>
<?php 
        }
    }
    ?>
      </td>
    </tr>
  </tbody>
</table>
<?php 
}
开发者ID:planetangel,项目名称:Planet-Angel-Website,代码行数:60,代码来源:admin.joomgallery.html.php

示例9: parseJdocTags

 public static function parseJdocTags($data)
 {
     $replace = array();
     $matches = array();
     if (preg_match_all('#<jdoc:include\\ type="([^"]+)" (.*)\\/>#iU', $data, $matches)) {
         $matches[0] = array_reverse($matches[0]);
         $matches[1] = array_reverse($matches[1]);
         $matches[2] = array_reverse($matches[2]);
         $count = count($matches[1]);
         for ($i = 0; $i < $count; $i++) {
             $attribs = JUtility::parseAttributes($matches[2][$i]);
             $type = $matches[1][$i];
             if ($type != 'modules') {
                 continue;
             }
             $name = isset($attribs['name']) ? $attribs['name'] : null;
             if (empty($name)) {
                 continue;
             }
             unset($attribs['name']);
             jimport('joomla.application.module.helper');
             $modules = JModuleHelper::getModules($name);
             $moduleHtml = null;
             if (!empty($modules)) {
                 foreach ($modules as $module) {
                     $moduleHtml .= JModuleHelper::renderModule($module, $attribs);
                 }
             }
             $data = str_replace($matches[0][$i], $moduleHtml, $data);
         }
     }
     return $data;
 }
开发者ID:apiceweb,项目名称:MageBridgeCore,代码行数:33,代码来源:block.php

示例10: render

 /**
  * Renders multiple modules script and returns the results as a string
  *
  * @param string 	$name		The position of the modules to render
  * @param array 	$params		Associative array of values
  * @return string	The output of the script
  */
 public function render($position, array $params = array(), $content = null)
 {
     $renderer = KFactory::get('lib.koowa.document.html.renderer.module');
     $contents = '';
     foreach (JModuleHelper::getModules($position) as $mod) {
         $contents .= $renderer->render($mod, $params, $content);
     }
     return $contents;
 }
开发者ID:janssit,项目名称:www.reliancelaw.be,代码行数:16,代码来源:modules.php

示例11: render

 /**
  * Renders multiple modules script and returns the results as a string
  *
  * @access public
  * @param string 	$name		The position of the modules to render
  * @param array 	$params		Associative array of values
  * @return string	The output of the script
  */
 function render($position, $params = array(), $content = null)
 {
     $renderer =& $this->_doc->loadRenderer('module');
     $contents = '';
     foreach (JModuleHelper::getModules($position) as $mod) {
         $contents .= $renderer->render($mod, $params, $content);
     }
     return $contents;
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:17,代码来源:modules.php

示例12: loadModules

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

示例13: modChrome_canvastabs

function modChrome_canvastabs($module, $params, $attribs)
{
    $area = isset($attribs['id']) ? (int) $attribs['id'] : '1';
    $area = 'area-' . $area;
    static $modulecount;
    static $modules;
    if ($modulecount < 1) {
        $modulecount = count(JModuleHelper::getModules($attribs['name']));
        $modules = array();
    }
    if ($modulecount == 1) {
        $temp = new stdClass();
        $temp->content = $module->content;
        $temp->title = $module->title;
        $temp->params = $module->params;
        $temp->id = $module->id;
        $modules[] = $temp;
        // list of moduletitles
        echo '<ul class="nav nav-tabs" id="tab' . $temp->id . '">';
        foreach ($modules as $rendermodule) {
            //prepare the module title
            if (strpos($rendermodule->title, '::') !== false) {
                $moduleTitle = explode('::', $rendermodule->title);
                $moduleTitle = "<span>" . $moduleTitle[0] . "</span>" . $moduleTitle[1];
            } else {
                $moduleTitle = $rendermodule->title;
            }
            echo '<li><a data-toggle="tab" href="#module-' . $rendermodule->id . '" >' . $moduleTitle . '</a></li>';
        }
        echo '</ul>';
        echo '<div class="tab-content">';
        $counter = 0;
        // modulecontent
        foreach ($modules as $rendermodule) {
            $counter++;
            echo '<div class="tab-pane  fade in" id="module-' . $rendermodule->id . '">';
            echo $rendermodule->content;
            echo '</div>';
        }
        echo '</div>';
        echo '<script type="text/javascript">';
        echo 'jQuery(document).ready(function(){';
        echo 'jQuery("#tab' . $temp->id . ' a:first").tab("show")';
        echo '});';
        echo '</script>';
        $modulecount--;
    } else {
        $temp = new stdClass();
        $temp->content = $module->content;
        $temp->params = $module->params;
        $temp->title = $module->title;
        $temp->id = $module->id;
        $modules[] = $temp;
        $modulecount--;
    }
}
开发者ID:shamsbd71,项目名称:canvas-framework,代码行数:56,代码来源:modules.php

示例14: render

 /**
  * Renders multiple modules
  *
  * Returns the results as an string using the __onString magic method.
  * Doing so allows you to use this method directly in an foreach()
  *
  * String example:
  *	<pre>
  *		<?= @ninja('module.render', 'left') ?>
  *	</pre>
  *
  * Array example:
  *	<pre>
  *		<?= @$helper('tabs.startpane', 'tabs', array('display' => 0)) ?>
  * 		<? foreach (@$helper('module.render', 'left') as $title => $content) : ?>
  * 			<?= @$helper('tabs.startpanel', @text($title)) ?>
  *				<?= $content ?>
  *			<?= @$helper('tabs.endpanel') ?>
  *		<? endforeach ?>
  *		<?= @$helper('tabs.endpane') ?>
  * </pre>
  *
  * @param	string			$position	The position of the modules to render
  * @param	array			$params		Associative array of values
  * @return	KObjectArray	$this		Allows you to either echo the result as a string
  *										or iterate over each module
  */
 public function render($position, $params = array(), $content = null)
 {
     // We need to clear the array in order to use this more than once
     $this->_data = array();
     foreach (JModuleHelper::getModules($position) as $module) {
         $this->_data[$module->title] = $this->renderer->render($module, $params, $content);
     }
     return $this->_data;
     //	    $renderer->render($mod, $params, $content);
 }
开发者ID:ravenlife,项目名称:Ninja-Framework,代码行数:37,代码来源:module.php

示例15: getInput

 public function getInput()
 {
     $document = JFactory::getDocument();
     $position = (string) $this->element['position'];
     jimport('joomla.application.module.helper');
     $module = JModuleHelper::getModules('');
     echo '<pre>';
     var_dump($module);
     echo '</pre>';
 }
开发者ID:quyip8818,项目名称:joomla,代码行数:10,代码来源:positions.php


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