Ejemplo n.º 1
0
 function getTabs($params)
 {
     $mods = $params->get('mods');
     $ordering = $params->get('ordering');
     $ordering_direction = $params->get('ordering_direction', 'ASC');
     $images = $params->get('images');
     $options = array('style' => 'none');
     $items = array();
     for ($i = 0; $i < count($mods); $i++) {
         if ($ordering == 'ordering') {
             $items[$i]->order = modgetmodtabHelper::getModule($mods[$i])->ordering;
         }
         $items[$i]->id = modgetmodtabHelper::getModule($mods[$i])->id;
         $items[$i]->title = modgetmodtabHelper::getModule($mods[$i])->title;
         $items[$i]->content = JModuleHelper::renderModule(modgetmodtabHelper::getModule($mods[$i]), $options);
     }
     $ordering_direction == 'ASC' ? asort($items) : arsort($items);
     //sorting
     return $items;
 }
Ejemplo n.º 2
0
<?php

/**
 * getmodtab Module Entry Point
 * 
 * @package    
 * @subpackage 
 * @link 
 * @license        
 * 
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only once
require_once dirname(__FILE__) . DS . 'helper.php';
JHtml::_('behavior.framework', true);
$uniqid = $module->id;
$document = JFactory::getDocument();
$document->addStylesheet(JURI::base(true) . '/modules/mod_getmodtab/assets/css/layout.css.php?id=' . $uniqid);
//Load css
$document->addScript(JURI::base(true) . '/modules/mod_getmodtab/assets/js/hide.js');
//Load javascript
if (strcmp($params->get('activator'), 'click') == 0) {
    $activator = 'onclick';
} else {
    $activator = 'onmouseover';
}
$list = modgetmodtabHelper::getTabs($params);
require JModuleHelper::getLayoutPath('mod_getmodtab');