Пример #1
0
 function onInitNextendLibrary()
 {
     nextendimport('nextend.data.data');
     $this->_data = new NextendData();
     $config = $this->params->toArray();
     if (!isset($config['config'])) {
         $config['config'] = array();
     }
     $this->_data->loadArray(version_compare(JVERSION, '1.6.0', 'l') ? $config : $config['config']);
     $cachetime = $this->_data->get('cachetime', 900);
     if ($cachetime != 0) {
         setNextend('cachetime', $cachetime);
     }
     $cachepath = '/' . trim($this->_data->get('cachepath', '/media/nextend/cache/'), '/') . '/';
     if ($cachepath != '') {
         $cachepath = rtrim(JPATH_SITE, DIRECTORY_SEPARATOR) . str_replace('/', DIRECTORY_SEPARATOR, $cachepath);
         setNextend('cachepath', $cachepath);
     }
     setNextend('gzip', $this->_data->get('gzip', 0));
     setNextend('debuglng', $this->_data->get('debuglng', 0));
     if (isset($_GET['nextendclearcache'])) {
         $app = JFactory::getApplication();
         if ($app->isAdmin()) {
             nextendimport('nextend.uri.uri');
             nextendimport('nextend.filesystem.filesystem');
             nextendimport('nextend.cache.cache');
             $cache = new NextendCache();
             $cache->deleteCacheFolder();
         }
     }
 }
Пример #2
0
 function __construct()
 {
     $this->_subfolder = 'css' . DIRECTORY_SEPARATOR;
     parent::__construct();
     $this->_filetype = 'css';
     $this->_gzip = getNextend('gzip', 0);
 }
Пример #3
0
 function NextendCacheCss()
 {
     $this->_subfolder = 'css' . DIRECTORY_SEPARATOR;
     parent::NextendCache();
     $this->_filetype = 'css';
     $this->_gzip = getNextend('gzip', 0);
 }
Пример #4
0
 function NextendCacheJavascript()
 {
     $this->_subfolder = 'js' . DIRECTORY_SEPARATOR;
     parent::NextendCache();
     $this->_filetype = 'js';
     $this->_inline = '';
     $this->_gzip = getNextend('gzip', 0);
 }
Пример #5
0
 function NextendImage()
 {
     $this->_subfolder = 'image' . DIRECTORY_SEPARATOR;
     parent::NextendCache();
     $this->_filetype = 'png';
     $time = time();
     $currentcachetime = $time - $time % $this->_cacheTime;
     $this->_folder = $this->_path . $this->_prename . $currentcachetime . DIRECTORY_SEPARATOR;
     $this->createCacheSubFolder($this->_folder, $currentcachetime);
 }
Пример #6
0
 function NextendCacheLess()
 {
     $this->_subfolder = 'less' . DIRECTORY_SEPARATOR;
     parent::NextendCache();
     $this->_filetype = 'css';
     $this->_less = new nlessc();
     $this->_less->addImportDir(NEXTENDLIBRARYASSETS . DIRECTORY_SEPARATOR . 'less' . DIRECTORY_SEPARATOR);
     $this->_image = new NextendImage();
     $this->_image->loadLess($this);
     $this->_image_cacheTime = $this->_cacheTime;
     $this->_context = array();
 }
Пример #7
0
 function NextendCacheImage()
 {
     $this->_subfolder = 'image' . DIRECTORY_SEPARATOR;
     $this->backgrouncolor = array(0, 0, 0);
     parent::NextendCache();
     if ($this->_cacheTime == 'static' || $this->_cacheTime == 0) {
         $this->_folder = $this->_path . 'static' . DIRECTORY_SEPARATOR;
         $currentcachetime = 0;
     } else {
         $time = time();
         $currentcachetime = $time - $time % $this->_cacheTime;
         $this->_folder = $this->_path . $this->_prename . $currentcachetime . DIRECTORY_SEPARATOR;
     }
     $this->createCacheSubFolder($this->_folder, $currentcachetime);
 }
Пример #8
0
 function __construct()
 {
     $this->_subfolder = 'image' . DIRECTORY_SEPARATOR;
     parent::__construct();
     $this->_filetype = 'png';
     if ($this->_cacheTime == 'static' || $this->_cacheTime == 0) {
         $this->_folder = $this->_path . 'static' . DIRECTORY_SEPARATOR;
         $currentcachetime = 0;
     } else {
         $time = time();
         $currentcachetime = $time - $time % $this->_cacheTime;
         $this->_folder = $this->_path . $this->_prename . $currentcachetime . DIRECTORY_SEPARATOR;
     }
     $this->createCacheSubFolder($this->_folder, $currentcachetime);
 }