FUEL CMS Forum
It looks like you're new here. If you want to get involved, click one of these buttons!
FUEL CMS News
News & Announcements
Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.
How to integrate a CDN
edited March 2013
I'd like to serve assets from a CDN. How might I go about changing the server only for assets? I've already got a method for storing the assets up to the CDN, but I'm wondering how I can just convert
A couple questions:
1. Are you using .93 or the 1.0 beta?
2. Are you using the asset helpers to put in images, css and js (e.g. img_path(), css(), js())?
1. 0.93, though we haven't launched yet and could in theory put some time into upgrading to 1.0.
2. Yes, we are using the Asset Helper class and calling it with either js() or $this->asset->js().
Based on this, I made some changes yesterday to 1.0 to the Asset library to allow you to put absolute paths as the "asset_path" value in the fuel/application/config/asset.php file. This should help with the CDN path.
Thank you! Two more related questions:
1. How much re-coding could we expect going from .93 to 1.0 assuming we do very few modifications to the base Fuel and CI frameworks?
2. Without upgrading to 1.0, what might be involved in addressing the original question?
Again, thank you for your time.
1. Every project is a little different but our internal experience is pretty painless. There are a couple things to look out for. The User permissions lookup table has been removed in favor of the new fuel_relationships table which is used to do many-to-many associations. This may require you to recreate the permissions for users. The structure for putting in fields for layouts MY_fuel_layouts has changed slightly in that it now requires an array key of "fields" that attaches all the Form_builder fields too.
To update, I would recommend checking out the 1.0 branch and merge your application code into that folder (including your MY_fuel.php, MY_fuel_layouts.php and MY_fuel_modules.php config files). Start there and post back if you have any issues.
2. The change was in the Asset class for the assets_path method. Below is the commit with more info:
Forum Software Powered by Vanilla