Working On It Add BASE URL Variable in CONFIG to support CDN

Andrew

New Member
Hello,

I would like to request the addition of URL variables for all JS, Skin Files, and Screenshots so that we can easily implement a CDN like MaxCDN to serve static files.

For example

<script type="text/javascript" src="{$JS_URL}/js/jquery-1.4.4.min.js"></script>

Then in the config we can have

$JS_URL = http://cdn.baptisttop1000.com

The same with screenshots.
 

cajkan

Active Member
This would be very nice feature

it will cut the pain and we dont have to check all broken links or old one :D
 

Mark

Administrator
Staff member
For an easy implementation that wont be destroyed after each update and does not require any further MySQL data, can you try this Andrew?

open settings_sql.php

add this:
PHP:
$TMPL['js_url_path'] = 'http://cdn.baptisttop1000.com/';
$TMPL['css_url_path'] = 'http://cdn.baptisttop1000.com/';
$TMPL['skin_url_path'] = 'http://cdn.baptisttop1000.com/';
then in your wrapper add:

{$skin_url_path}
{$css_url_path}
{$js_url_path}

screenshots would be more involved as all plugins need to be updated to reflect this tag
 
Top