http://www.bootstrapcdn.com/ provides free Bootstrap hosting. This would be extremely valuable for Drupal distros that cannot package Bootstrap as part of the download due to licensing issues (detailed here: https://github.com/twitter/bootstrap/issues/2054) and would allow some users to skip a step.

This should be fairly easy to do:

function hook_preprocess_page(&$vars) {
  // Check for https and set $protocol to either 'http' or 'https'
  drupal_add_js($protocol . '://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js', 'external');
  drupal_add_css($protocol . '://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css', 'external');
}

Wrap that with a conditional for the theme setting and you're all set.

CommentFileSizeAuthor
#3 example_cdn_settings.patch1.58 KBfrankbaele
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cweagans’s picture

Might also consider integrating with the Bootswatch section of bootstrap cdn to allow end users to quickly customize colors and whatnot.

wundo’s picture

Assigned: Unassigned » wundo

I've split the bootswatch into a different issue: #1840374: Integrate with Bootswatch

frankbaele’s picture

FileSize
1.58 KB

something like this ? its a PO patch so just too show

frankbaele’s picture

hi i wrote a patch here : https://drupal.org/node/1846736

that also includes latest jquery through cdn and no conflict

frankbaele’s picture

Status: Active » Closed (duplicate)
cweagans’s picture

Status: Closed (duplicate) » Active

Uh, no. Your issue is newer than this one. Mark yours as a duplicate.

wundo’s picture

#1846736: Remove jQuery CDN setting in favor of using jQuery Update module is fixed, cweagans, could you take a look at it and confirm that it implements everything discussed in this one?

cweagans’s picture

Status: Active » Closed (duplicate)

Looking at the other issue, I'm choosing to pick my battles and because of the changes in the other issue, I no longer care about this theme.