Example #1
0
 function getData(&$params)
 {
     $data = array();
     for ($x = 1; $x <= 6; $x++) {
         $col = $params->get('data_col' . $x);
         if ($col) {
             $lines = explode("\n", $col);
             foreach ($lines as $line) {
                 $line = trim($line);
                 $previous = isset($row) ? $row[0] : null;
                 $row = explode("::", $line);
                 $helper = new modRokFeatureTableHelper();
                 if (isset($row[1])) {
                     if (preg_match("/\\-sub/", $row[0])) {
                         $previous = str_replace("-sub", '', str_replace("-link", '', str_replace("-classes", '', $previous)));
                         $prev = $data[$x][$previous];
                         $cur_data = $helper->getLineData($row[1]);
                         $prev->sub = $cur_data->data;
                     } elseif (preg_match("/\\-link/", $row[0])) {
                         $previous = str_replace("-sub", '', str_replace("-link", '', str_replace("-classes", '', $previous)));
                         $prev = $data[$x][$previous];
                         $cur_data = $helper->getLineData($row[1]);
                         $prev->link = $cur_data->data;
                     } elseif (preg_match("/\\-classes/", $row[0])) {
                         $previous = str_replace("-sub", '', str_replace("-link", '', str_replace("-classes", '', $previous)));
                         $prev = $data[$x][$previous];
                         $cur_data = $helper->getLineData($row[1]);
                         $prev->classes = $cur_data->data;
                     } else {
                         $data[$x][$row[0]] = $helper->getLineData($row[1]);
                     }
                     $previous = str_replace("-sub", '', str_replace("-link", '', str_replace("-classes", '', $previous)));
                 }
             }
         }
     }
     return $data;
 }
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2014 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only once
require_once dirname(__FILE__) . '/helper.php';
//modRokFeatureTableHelper::loadScripts($params);
JHtml::_('behavior.framework', true);
$doc = JFactory::getDocument();
$doc->addScript(JURI::Root(true) . '/modules/mod_rokfeaturetable/tmpl/js/rokfeaturetable.js');
if ($params->get('builtin_css', 1)) {
    $doc->addStyleSheet(JURI::Root(true) . '/modules/mod_rokfeaturetable/tmpl/css/rokfeaturetable.css');
}
$document = JFactory::getDocument();
// Cache this basd on access level
$conf = JFactory::getConfig();
if ($conf->get('caching') && $params->get('module_cache')) {
    $user = JFactory::getUser();
    $cache = JFactory::getCache('mod_rokfeaturetable');
    $cache->setCaching(true);
    $args = array(&$params);
    $checksum = md5($args[0]->_raw);
    $data = $cache->get(array('modRokFeatureTableHelper', 'getData'), $args, 'mod_rokfeaturetable-' . $user->get('aid', 0) . '-' . $checksum);
} else {
    $helper = new modRokFeatureTableHelper();
    $data = $helper->getData($params);
}
$counter = 0;
require JModuleHelper::getLayoutPath('mod_rokfeaturetable');
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2011 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 *
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only once
require_once dirname(__FILE__) . DS . 'helper.php';
//modRokFeatureTableHelper::loadScripts($params);
JHTML::_('behavior.mootools');
$doc =& JFactory::getDocument();
$doc->addScript(JURI::Root(true) . '/modules/mod_rokfeaturetable/tmpl/js/rokfeaturetable.js');
if ($params->get('builtin_css', 1)) {
    $doc->addStyleSheet(JURI::Root(true) . '/modules/mod_rokfeaturetable/tmpl/css/rokfeaturetable.css');
}
$document =& JFactory::getDocument();
// Cache this basd on access level
$conf =& JFactory::getConfig();
if ($conf->getValue('config.caching') && $params->get("module_cache", 0)) {
    $user =& JFactory::getUser();
    $cache =& JFactory::getCache('mod_rokfeaturetable');
    $cache->setCaching(true);
    $args = array(&$params);
    $checksum = md5($args[0]->_raw);
    $data = $cache->get(array('modRokFeatureTableHelper', 'getData'), $args, 'mod_rokfeaturetable-' . $user->get('aid', 0) . '-' . $checksum);
} else {
    $data = modRokFeatureTableHelper::getData($params);
}
$counter = 0;
require JModuleHelper::getLayoutPath('mod_rokfeaturetable');