Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

MAX cdn

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #101  
Old 04-16-2014, 02:35 AM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default Re: MAX cdn

Figured this out finally. If you are running 4.6.x, for FOR IMAGES (W, D, P, T images in file system) skip step 4 in post #57, then vary step 7 as follows:

file: /include/func/func.files.php

FIND:
Code:
// image_path is an locally placed image return $current_location . str_replace(XC_DS, '/', substr($image_path, strlen(preg_replace('/' . preg_quote(XC_DS, '/') . '$/S', '', $xcart_dir))));

REPLACE WITH:

Code:
/** MaxCDN support */ if ($_SERVER['HTTPS'] != 'on') { return 'http://cdn.domain.com' . str_replace(XC_DS, '/', substr($image_path, strlen(preg_replace('/' . preg_quote(XC_DS, '/') . '$/S', '', $xcart_dir)))); $current_location = $current_location; } else { return $current_location . str_replace(XC_DS, '/', substr($image_path, strlen(preg_replace('/' . preg_quote(XC_DS, '/') . '$/S', '', $xcart_dir)))); } /* END MaxCDN support */
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote

The following 2 users thank kevinrm for this useful post:
carpeperdiem (04-16-2014), DavyMac (04-16-2014)
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:51 AM.

   

 
X-Cart forums © 2001-2020