Exemplo n.º 1
0
 /**
  * 
  * @param type $sPath
  */
 public static function path2Url($sPath)
 {
     $oUri = clone JchPlatformUri::getInstance();
     $sBaseFolder = JchOptimizeHelper::getBaseFolder();
     $abspath = str_replace(DIRECTORY_SEPARATOR, '/', ABSPATH);
     $sPath = str_replace(DIRECTORY_SEPARATOR, '/', $sPath);
     $sUriPath = $oUri->toString(array('scheme', 'user', 'pass', 'host', 'port')) . $sBaseFolder . str_replace($abspath, '', $sPath);
     return $sUriPath;
 }
Exemplo n.º 2
0
 /**
  * 
  * @param type $function
  */
 public static function ajaxUrl($function)
 {
     $url = JUri::getInstance()->toString(array('scheme', 'user', 'pass', 'host', 'port'));
     $url .= JchOptimizeHelper::getBaseFolder();
     if (version_compare(JVERSION, '3.0', '<')) {
         $url .= 'plugins/system/jch_optimize/ajax.php?action=' . $function;
     } else {
         $url .= 'index.php?option=com_ajax&plugin=' . $function . '&format=raw';
     }
     return $url;
 }
Exemplo n.º 3
0
 /**
  * 
  */
 public static function imageFolder()
 {
     return JchOptimizeHelper::getBaseFolder() . 'media/plg_jchoptimize/images/';
 }