コード例 #1
0
 public function loadConfig($params, $modulename = "mod_janewspro")
 {
     global $mainframe;
     $use_cache = $mainframe->getCfg("caching");
     $this->mod_params = $params;
     if ($params->get('cache') == "1" && $use_cache == "1") {
         $cache =& JFactory::getCache();
         $cache->setCaching(true);
         $cache->setLifeTime($params->get('cache_time', 30) * 60);
         $this->_params = $cache->get(array(new modJaNewsProHelper(), 'loadProfile'), array($params, $modulename));
     } else {
         $this->_params = modJaNewsProHelper::loadProfile($params, $modulename);
     }
 }
コード例 #2
0
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once dirname(__FILE__) . DS . 'helpers' . DS . 'helper.php';
$files = JFolder::files(dirname(__FILE__) . DS . 'helpers' . DS . 'adapter');
if ($files) {
    foreach ($files as $file) {
        require_once dirname(__FILE__) . DS . 'helpers' . DS . 'adapter' . DS . $file;
    }
}
$helper = new modJaNewsProHelper($module, $params);
if (JRequest::getBool('janajax')) {
    $moduleid = JRequest::getInt('moduleid');
    if ($moduleid != $module->id) {
        return;
    }
    $group = JRequest::getString('group');
    $cookie_value = array();
    $arr_catsid = JRequest::getVar('categories', array(), 'default', 'array');
    if ($arr_catsid) {
        $cookie_value[] = 'cookie_catsid=' . implode(',', $arr_catsid);
    }
    if (isset($_REQUEST['showimage'])) {
        $cookie_value[] = 'showimage=' . JRequest::getInt('showimage', 0);
    }
    if (isset($_REQUEST['introitems'])) {
コード例 #3
0
ファイル: helper.php プロジェクト: ashanrupasinghe/slbcv2
 /**
  *
  * Load config of JA News Pro Module
  * @param object $params
  * @param string $modulename
  * @return object Config of JA News Pro Module
  */
 public function loadConfig($params, $modulename = "mod_janewspro")
 {
     $mainframe = JFactory::getApplication();
     $use_cache = $mainframe->getCfg("caching");
     $this->mod_params = $params;
     $this->_params = modJaNewsProHelper::loadProfile($params, $modulename);
 }
コード例 #4
0
defined('_JEXEC') or die('Restricted access');
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
require_once dirname(__FILE__) . DS . 'helpers' . DS . 'helper.php';
$files = JFolder::files(dirname(__FILE__) . DS . 'helpers' . DS . 'adapter');
if ($files) {
    foreach ($files as $file) {
        //only load php files
        if (strpos($file, ".php")) {
            require_once dirname(__FILE__) . DS . 'helpers' . DS . 'adapter' . DS . $file;
        }
    }
}
$mainframe = JFactory::getApplication();
$helper = new modJaNewsProHelper($module, $params);
if (JRequest::getBool('janajax')) {
    $moduleid = JRequest::getInt('moduleid');
    if ($moduleid != $module->id) {
        return;
    }
    $group = JRequest::getString('group');
    $cookie_value = array();
    $arr_catsid = JRequest::getVar('categories', array(), 'default', 'array');
    if ($arr_catsid) {
        $cookie_value[] = 'cookie_catsid=' . implode(',', $arr_catsid);
    }
    if (isset($_REQUEST['showimage'])) {
        $cookie_value[] = 'showimage=' . JRequest::getInt('showimage', 0);
    }
    if (isset($_REQUEST['introitems'])) {