github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

teknoid / cakephp-asset-host-helper

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 6
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

CakePHP helper to link to assets from a dedicated asset server — Read more

  cancel

http://teknoid.wordpress.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Proper markdown ... in markdown README 
teknoid (author)
Thu Sep 24 18:43:33 -0700 2009
commit  9fbe9311adbc93b7617f8e24bb4cf5a7ce1d24f9
tree    600189cd6467cb47de1ec596e63f7c0739c01e03
parent  5b4f59e1f93ed95d933e6fa2f5d9854fd2421ec8
cakephp-asset-host-helper /
name age
history
message
file README.md Thu Sep 24 18:43:33 -0700 2009 Proper markdown ... in markdown README [teknoid]
directory views/ Wed Sep 23 12:45:18 -0700 2009 Adding README file [teknoid]
README.md

CAKEPHP CDN/Clould Front helper

Inspired by: Amazon's Cloud Front

And RoR's asset host helper: RoR's api docs :{

(Please read the above link for a detailed explanation of what's going on here)

Instead of using Javascript or HTML helpers, you can use the provided Cf (Cloud Front) helper to create links to assets, you can now use:

  • $cf->image();
  • $cf->jsLink();
  • $cf->css();

All options are exactly the same as default CakePHP helpers.

We make an assumption that local file system mirrors the remote one (on S3/Cloud Front/etc.)

The only settings you need to be concerned about are:

  • $assetHost = 'assets%d.example.com';
  • $numHostsMin = 0;
  • $numHostsMax = 3;
  • $sslHost = 'sslhost.example.com';

Be sure to replace the above values in the helper to match your setup

For any questions please contact me at the relevant blog post: Over here

Your input is greatly appreciated.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server