bind script to cache

hi, i have custom js script and css at the head of page

how do i make them part of the gzip that dolphin creates (js & css) ?

there are recommendation to combine all script and css together for page speed and seo.

the script located in plugins folder in root.

 

thanks

Always remember that the future comes one day at a time.
Quote · 4 Aug 2015

You need to add it to inc/params.inc.php file, for example if the script is in /plugins/some_script.js then it should look like this:

//--- Add default JS ---//
$oSysTemplate->addJsSystem(array(
    'jquery.js',
    'jquery-migrate.min.js',
    'jquery.jfeed.js',
    'jquery.embedly.min.js',
    'jquery.ui.core.min.js',
    'jquery.ui.widget.min.js',
    'jquery.ui.position.min.js',
    'jquery.ui.tabs.min.js',
    'functions.js',
    'jquery.dolRSSFeed.js',
    'jquery.float_info.js',
    'jquery.webForms.js',
    'jquery.form.min.js',
    'jquery.dolEmbedly.js',
    'jquery.dolPopup.js',
    'jquery.dolRetina.js',
    'common_anim.js',
'join.js', 'login.js', 'BxDolVoting.js', 'user_status.js', 'jquery.cookie.min.js', 'some_script.js', ));
Rules → http://www.boonex.com/terms
Quote · 4 Aug 2015

Hi Alex,

Does it work the current dolphin version? i tried to bind js by writing the path to it and it did not  bind it to gzip/cache. the same goes for the css

Always remember that the future comes one day at a time.
Quote · 9 Feb 2017

It should work, just make sure that cache and gzipping is on. Also clean cache after this change.

Rules → http://www.boonex.com/terms
Quote · 11 Feb 2017

i try to did it with no success  in the attachment i showing the path to the file

maybe i am doing it wrong?

123.PNG · 68.2K · 185 views
Always remember that the future comes one day at a time.
Quote · 12 Feb 2017

and also how can i bind it to the latest CSS/JS to load (from all site CSS's )?

Always remember that the future comes one day at a time.
Quote · 12 Feb 2017

If your css file is located at /templates/tmpl_buddies/css/buddies.css

Then use this in params.inc.php instead:
'../../tmpl_buddies/css/buddies.css',

For js files use this in params.inc.php instead:
'../../path/to/your/file.js',

Example:
'../../templates/tmpl_buddies/js/your-js-file.js',

Save the changes to params.inc.php, and clear your Dolphin cache so they get regenerated/gzip'd with your files.

DialMe.com - Your One and Only Source For Boonex Dolphin Tutorials and Resources
Quote · 13 Feb 2017
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.