Пример #1
0
 /**
  * @param $module_id
  * @param $params
  *
  * @return mixed
  */
 protected function _load_module($module_id, $params)
 {
     $db =& JFactory::getDBO();
     $db->setQuery("SELECT * FROM #__modules WHERE id='{$module_id}' ");
     $module = $db->loadObject();
     return JModuleHelper::renderModule($module, $params);
 }
Пример #2
0
 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();
     }
 }
Пример #3
0
 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;
 }
Пример #4
0
 function renderModule()
 {
     $code = JRequest::getVar('code', '', null, 'string');
     $config = JFactory::getConfig();
     $secret = $config->get('config.secret');
     if ($code != $secret) {
         exit;
     }
     $protect = JRequest::getInt('protect');
     $time = time();
     if (empty($protect) || $time > $protect + 5 || $time < $protect) {
         exit;
     }
     $id = JRequest::getInt('id');
     if (empty($id)) {
         exit;
     }
     $db = JFactory::getDBO();
     $db->setQuery('SELECT * FROM #__modules WHERE `id`=' . $id . ' LIMIT 1');
     $module = $db->loadObject();
     if (empty($module)) {
         exit;
     }
     $module->user = substr($module->module, 0, 4) == 'mod_' ? 0 : 1;
     $module->name = $module->user ? $module->title : substr($module->module, 4);
     $module->style = null;
     $module->module = preg_replace('/[^A-Z0-9_\\.-]/i', '', $module->module);
     $params = array();
     $lang =& JFactory::getLanguage();
     $lang->load($module->module);
     echo JModuleHelper::renderModule($module, $params);
     exit;
 }
Пример #5
0
 function display()
 {
     jimport('joomla.application.module.helper');
     $module =& JModuleHelper::getModule('mod_login');
     $module = JModuleHelper::renderModule($module, array('style' => 'rounded', 'id' => 'section-box'));
     echo $module;
 }
Пример #6
0
 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);
 }
Пример #7
0
function jdocIncludeModules($position)
{
    $modules = JModuleHelper::getModules($position);
    foreach ($modules as $module) {
        echo JModuleHelper::renderModule($module);
    }
}
Пример #8
0
 function load()
 {
     $timeVar = JRequest::getInt('time');
     $time = time();
     if ($time < $timeVar or $time > $timeVar + 3) {
         exit;
     }
     $moduleId = (int) JRequest::getInt('id');
     if (empty($moduleId)) {
         echo 'OK! TEST VALID';
         exit;
     }
     $db =& JFactory::getDBO();
     $db->setQuery('SELECT * FROM #__modules WHERE id = ' . $moduleId . ' LIMIT 1');
     $module = $db->loadObject();
     if (empty($module)) {
         exit;
     }
     $module->user = substr($module->module, 0, 4) == 'mod_' ? 0 : 1;
     $module->name = $module->user ? $module->title : substr($module->module, 4);
     $module->style = null;
     $module->module = preg_replace('/[^A-Z0-9_\\.-]/i', '', $module->module);
     $params = array();
     echo JModuleHelper::renderModule($module, $params);
     exit;
 }
Пример #9
0
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>";
    }
}
Пример #10
0
    /**
     * 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;
    }
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 
}
Пример #12
0
 function display($dummy1 = false, $dummy2 = false)
 {
     $moduleId = JRequest::getInt('formid');
     if (empty($moduleId)) {
         return;
     }
     if (JRequest::getInt('interval') > 0) {
         setcookie('acymailingSubscriptionState', true, time() + JRequest::getInt('interval'), '/');
     }
     $db = JFactory::getDBO();
     $db->setQuery('SELECT * FROM #__modules WHERE id = ' . intval($moduleId) . ' AND `module` LIKE \'%acymailing%\' LIMIT 1');
     $module = $db->loadObject();
     if (empty($module)) {
         echo 'No module found';
         exit;
     }
     $module->user = substr($module->module, 0, 4) == 'mod_' ? 0 : 1;
     $module->name = $module->user ? $module->title : substr($module->module, 4);
     $module->style = null;
     $module->module = preg_replace('/[^A-Z0-9_\\.-]/i', '', $module->module);
     $params = array();
     if (JRequest::getInt('autofocus', 0)) {
         acymailing_loadMootools();
         $js = "\n\t\t\t\twindow = addEvent('load', function(){\n\t\t\t\t\tthis.focus();\n\t\t\t\t\tvar moduleInputs = document.getElementsByTagName('input');\n\t\t\t\t\tif(moduleInputs){\n\t\t\t\t\t\tvar i = 0;\n\t\t\t\t\t\twhile(moduleInputs[i].disabled == true){\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(moduleInputs[i]) moduleInputs[i].focus();\n\t\t\t\t\t}\n\t\t\t\t});";
         $doc = JFactory::getDocument();
         $doc->addScriptDeclaration($js);
     }
     echo JModuleHelper::renderModule($module, $params);
 }
Пример #13
0
 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;
 }
Пример #14
0
 function getPropertyList()
 {
     $modProperties = JModuleHelper::getModule('danh_sach_BDS', 'BAN DO');
     $attribs['style'] = 'raw';
     $dataHTML = JModuleHelper::renderModule($modProperties, $attribs);
     echo $dataHTML;
 }
Пример #15
0
 function display($tpl = null)
 {
     if ($tpl != 'message') {
         $module = JModuleHelper::getModule('mod_userregister');
         $html = JModuleHelper::renderModule($module);
         $this->assignRef('moduleregister', $html);
     }
     parent::display($tpl);
 }
Пример #16
0
 function getChiaSe($moduleTitle)
 {
     $modSearch = JModuleHelper::getModule('taoyeucau', $moduleTitle);
     $modSearch->title = 'Tạo yêu cầu bất động sản';
     $modSearch->showtitle = 0;
     $attribs['style'] = 'raw';
     $dataHTML = JModuleHelper::renderModule($modSearch, $attribs);
     return $dataHTML;
 }
Пример #17
0
 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);
     }
 }
Пример #18
0
 /**
  * Renders a module script and returns the results as a string
  *
  * @param   string  $module   The name of the module to render
  * @param   array   $attribs  Associative array of values
  * @param   string  $content  If present, module information from the buffer will be used
  *
  * @return  string  The output of the script
  *
  * @since   11.1
  */
 public function render($module, $attribs = array(), $content = null)
 {
     if (!is_object($module)) {
         $title = isset($attribs['title']) ? $attribs['title'] : null;
         $module = JModuleHelper::getModule($module, $title);
         if (!is_object($module)) {
             if (is_null($content)) {
                 return '';
             } else {
                 /**
                  * If module isn't found in the database but data has been pushed in the buffer
                  * we want to render it
                  */
                 $tmp = $module;
                 $module = new stdClass();
                 $module->params = null;
                 $module->module = $tmp;
                 $module->id = 0;
                 $module->user = 0;
             }
         }
     }
     // Get the user and configuration object
     // $user = JFactory::getUser();
     $conf = JFactory::getConfig();
     // Set the module content
     if (!is_null($content)) {
         $module->content = $content;
     }
     // Get module parameters
     $params = new JRegistry();
     $params->loadString($module->params);
     // Use parameters from template
     if (isset($attribs['params'])) {
         $template_params = new JRegistry();
         $template_params->loadString(html_entity_decode($attribs['params'], ENT_COMPAT, 'UTF-8'));
         $params->merge($template_params);
         $module = clone $module;
         $module->params = (string) $params;
     }
     $contents = '';
     // Default for compatibility purposes. Set cachemode parameter or use JModuleHelper::moduleCache from within the
     // module instead
     $cachemode = $params->get('cachemode', 'oldstatic');
     if ($params->get('cache', 0) == 1 && $conf->get('caching') >= 1 && $cachemode != 'id' && $cachemode != 'safeuri') {
         // Default to itemid creating method and workarounds on
         $cacheparams = new stdClass();
         $cacheparams->cachemode = $cachemode;
         $cacheparams->class = 'JModuleHelper';
         $cacheparams->method = 'renderModule';
         $cacheparams->methodparams = array($module, $attribs);
         $contents = JModuleHelper::ModuleCache($module, $params, $cacheparams);
     } else {
         $contents = JModuleHelper::renderModule($module, $attribs);
     }
     return $contents;
 }
Пример #19
0
 protected function loadGiantContent($module_id, $params)
 {
     $db = JFactory::getDBO();
     $db->setQuery('SELECT * FROM #__modules WHERE id = ' . $module_id . ' AND module = "mod_giantcontent" AND published = 1');
     $module = $db->loadObject();
     if ($module) {
         return JModuleHelper::renderModule($module, $params);
     } else {
         return false;
     }
 }
Пример #20
0
 function display($tpl = null)
 {
     $providerid = JRequest::getInt('providerid', '0', 'method');
     $externalid = JRequest::getVar('externalid', '', 'method', 'string');
     $moduleProviders = JModuleHelper::getModule('mod_zlogin');
     $htmlProviders = JModuleHelper::renderModule($moduleProviders);
     $this->assign('providerid', $providerid);
     $this->assign('externalid', $externalid);
     $this->assignRef('moduleproviders', $htmlProviders);
     parent::display($tpl);
 }
 /**
  * @param $module_id
  * @param $params
  *
  * @return mixed
  */
 protected function _load_module($module_id, $params)
 {
     $db = JFactory::getDBO();
     $db->setQuery("SELECT * FROM #__modules WHERE id='{$module_id}' AND published=1");
     $module = $db->loadObject();
     if ($module) {
         return JModuleHelper::renderModule($module, $params);
     } else {
         return false;
     }
 }
Пример #22
0
 function display($tpl = null)
 {
     $providerid = JRequest::getInt('providerid', '0', 'method');
     $externalid = JRequest::getVar('externalid', '', 'method', 'string');
     $moduleProviders = JModuleHelper::getModule('mod_zlogin');
     $htmlProviders = JModuleHelper::renderModule($moduleProviders);
     $this->assign('providerid', $providerid);
     $this->assign('externalid', $externalid);
     $this->assignRef('moduleproviders', $htmlProviders);
     $this->assign('message', JText::_('SYSTEM_USER_ALIAS_NOT_FOUND_AUTHENTICATE'));
     parent::display($tpl);
 }
Пример #23
0
 /**
  *
  * Load Content Modules
  */
 function modules()
 {
     $tab = JRequest::getInt('tab', 0);
     jimport('joomla.application.module.helper');
     jimport('joomla.application.component.model');
     $modules = $this->getModule($tab);
     $result = '';
     if (count($modules) > 0) {
         $result = JModuleHelper::renderModule($modules[0]);
     }
     return $result;
 }
Пример #24
0
 /**
  * Muestra la vista
  *
  * @param <type> $tpl
  */
 function display($tpl = null)
 {
     $db =& JFactory::getDBO();
     $user =& JFactory::getUser();
     // bandera que indica si mostrar la seccion
     // de habilitacion/deshabilitacion de alias
     $showAliasBlock = true;
     // si el usuario no esta logueado
     // no mostrar la seccion de habilitacion/deshabilitacion de alias
     if ($user->guest) {
         $showAliasBlock = false;
     } else {
         // recupero los alias del usuario
         $userid = $user->id;
         $query = 'select a.id, p.icon_url, a.block, p.name as providername, a.label from #__alias a, #__providers p where user_id=' . $userid . ' and a.provider_id=p.id';
         $db->setQuery($query);
         $dbaliaslist = $db->loadObjectList();
         // si el usuario no tiene alias registrados
         // no muestra la seccion de habilitacion/deshabilitacion de alias
         if (count($dbaliaslist) == 0) {
             $showAliasBlock = false;
         } else {
             // arma los mensajes y los hace accesibles a la vista
             $titleAliasBlockAdmin = JText::_('ZONALES_ALIAS_TITLE_BLOCK_ADMIN');
             $messageAliasBlockAdmin = JText::_('ZONALES_ALIAS_MESSAGE_BLOCK_ADMIN');
             $titleUnblock = JText::_('ZONALES_ALIAS_UNBLOCK');
             $titleAlias = JText::_('ZONALES_ALIAS_TITLE');
             $this->assignRef('titleAlias', $titleAlias);
             $this->assignRef('aliaslist', $dbaliaslist);
             $this->assignRef('titleAliasBlockAdmin', $titleAliasBlockAdmin);
             $this->assignRef('messageAliasBlockAdmin', $messageAliasBlockAdmin);
             $this->assignRef('titleUnblock', $titleUnblock);
         }
     }
     // si no se va a mostrar la seccion de habilitacion/deshabilitacion de alias
     // muestra un mensaje en su lugar, indicando la situacion
     if (!$showAliasBlock) {
         $noAliasMessage = JText::_('ZONALES_ALIAS_NO_ALIAS');
     }
     // arma el resto de los mensajes y los hace accesibles
     // a la vista
     $titleNewAlias = JText::_('ZONALES_ALIAS_NEW_TITLE');
     $messageNewAlias = JText::_('ZONALES_ALIAS_NEW_MESSAGE');
     $moduleProviders = JModuleHelper::getModule('mod_zlogin');
     $htmlProviders = JModuleHelper::renderModule($moduleProviders);
     $this->assignRef('titleNewAlias', $titleNewAlias);
     $this->assignRef('messageNewAlias', $messageNewAlias);
     $this->assignRef('moduleproviders', $htmlProviders);
     $this->assign('showAliasBlock', $showAliasBlock);
     $this->assignRef('noAliasMessage', $noAliasMessage);
     parent::display($tpl);
 }
Пример #25
0
 public function display($tpl = null) {
     JToolbarHelper::title(JText::_('COM_PRP') . ': ' . JText::_('COM_PRP_VIEW_DEFAULT'));
     
     PRPHelper::addSubmenu('default');
     $this->addToolbar();
     $this->sidebar = $this->addSidebar();
     
     /* mod_prp_exports */
     $mod = JModuleHelper::getModule('mod_prp_exports');
     $this->exports = JModuleHelper::renderModule($mod);
     
     return parent::display($tpl);
 }
Пример #26
0
 function onAfterDispatch()
 {
     $is_ajax = !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest';
     if ($is_ajax) {
         $db = JFactory::getDbo();
         $db->setQuery('SELECT * FROM #__modules WHERE id=' . JRequest::getInt('k2reslistingajax_moduleid'));
         $result = $db->loadObject();
         if (isset($result->module)) {
             echo JModuleHelper::renderModule($result);
             exit(0);
         }
     }
 }
Пример #27
0
 public function getItems()
 {
     //module specific
     $mods = $this->get('modules');
     $options = array('style' => 'none');
     $items = array();
     for ($i = 0; $i < count($mods); $i++) {
         $items[$i]->order = $this->getModule($mods[$i])->ordering;
         $items[$i]->title = $this->getModule($mods[$i])->title;
         $items[$i]->content = $items[$i]->introtext = JModuleHelper::renderModule($this->getModule($mods[$i]), $options);
     }
     return $items;
 }
Пример #28
0
 public static function loadModuleById($id)
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('module,title');
     $query->from('#__modules');
     $query->where('#__modules.id=' . $id);
     $db->setQuery((string) $query);
     $module = $db->loadObject();
     $module = JModuleHelper::getModule($module->module, $module->title);
     $contents = JModuleHelper::renderModule($module);
     return $contents;
 }
 function mosLoadAdminModules($position = 'left', $style = 0)
 {
     jimport('joomla.html.pane');
     $modules =& JModuleHelper::getModules($position);
     $pane =& JPane::getInstance('sliders');
     echo $pane->startPane("content-pane");
     foreach ($modules as $module) {
         $title = $module->title;
         echo $pane->startPanel($title, "{$position}-panel");
         echo JModuleHelper::renderModule($module);
         echo $pane->endPanel();
     }
     echo $pane->endPane();
 }
Пример #30
0
 /**
  * Control panel
  */
 function display()
 {
     global $mainframe;
     $modules =& JModuleHelper::getModules('cpanel');
     $pane =& JPane::getInstance('sliders');
     echo $pane->startPane("content-pane");
     foreach ($modules as $module) {
         $title = $module->title;
         echo $pane->startPanel($title, 'cpanel-panel-' . $module->name);
         echo JModuleHelper::renderModule($module);
         echo $pane->endPanel();
     }
     echo $pane->endPane();
 }