This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Javascript create function - safe use of 'new'. | |
* By Juliette Culver. | |
*/ | |
function create(parent) { | |
f = function(); | |
f.prototype = parent; | |
a = new f(); | |
return a; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> <title>*HTML5 shim - minimal/ elements only</title> | |
<!--[if lt IE 9]> | |
<script> | |
// http://html5shim.googlecode.com/svn/trunk/html5-els.js | |
// For discussion and comments, see: http://remysharp.com/2009/01/07/html5-enabling-script/ (credit to @jdalton for minif) | |
/*@cc_on'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary subline time video' | |
.replace(/\w+/g,function(n){document.createElement(n)});alert('html5shim-els')@*/ | |
</script> | |
<![endif]--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function drupal_http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3, $timeout = 30.0) { | |
global $db_prefix; | |
$result = new stdClass(); | |
// Parse the URL and make sure we can handle the schema. | |
$uri = parse_url($url); | |
if ($uri == FALSE) { | |
$result->error = 'unable to parse URL'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Enable a default provider. | |
*/ | |
function oembedcore_enable_provider($provider) { | |
if (!is_object($provider)) { | |
$provider = oembedcore_provider_load($provider); | |
} | |
ctools_include('export'); | |
ctools_export_set_status('oembedcore_provider', $provider->name, FALSE); | |
cache_clear_all('oembedcore:providers', 'cache'); //NDF $table='cache' is mandatory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Override or insert PHPTemplate variables into the templates. | |
*/ | |
function phptemplate_preprocess_page(&$vars) { | |
$vars['tabs2'] = menu_secondary_local_tasks(); | |
// Hook into color.module | |
if (module_exists('color')) { | |
_color_page_alter($vars); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Uptime responder. | |
/* | |
Prevent Cron emails, eg. | |
From: Cron Daemon <***@***st.net> | |
Subject: Cron <h***@***> wget -O - -q -t 1 http://path/to/cron | |
http://drupal.org/node/553430 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Example styles for iSpot embeds. | |
* Copyright 2012 The Open University. | |
*/ | |
/* HTML page styles. | |
*/ | |
body{ | |
font:.8em sans-serif; | |
background:#fcfcfc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* a backwards compatable implementation of postMessage | |
* by Josh Fraser (joshfraser.com) | |
* released under the Apache 2.0 license. | |
* | |
* this code was adapted from Ben Alman's jQuery postMessage code found at: | |
* http://benalman.com/projects/jquery-postmessage-plugin/ | |
* | |
* other inspiration was taken from Luke Shepard's code for Facebook Connect: | |
* http://github.com/facebook/connect-js/blob/master/src/core/xd.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html><meta charset=utf-8/><title>*iSpot map embeds / postMessage / overlay</title> | |
<!-- Include example style sheet, see #ispot-overlay. --> | |
<link rel="stylesheet" href="http://ispot-approval.open.ac.uk/sites/all/modules/custom/ispot_oembed/assets/ispot-embed.css" /> | |
<div id="ispot-overlay"></div> | |
<!-- Add a map embed. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@charset "UTF-8"; | |
/* CSS Document */ | |
/* Background Colours*/ | |
.default_blue { | |
background-color: rgb(41,110,143); | |
} | |
.orange { |