// jQuery
$(document).ready(function() {
// code
})
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 | |
/** | |
* Custom configuration bootstrap file for ExpressionEngine | |
* | |
* Place config.php in your site root | |
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php | |
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php | |
* If you have moved your site root you'll need to update the require_once path | |
* |
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> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |
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
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], |
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
// Load scripts asynchronously | |
jQuery.loadAsync = function(url, callback) { | |
// Don't use $.getScript since it disables caching | |
jQuery.ajax({ | |
'url': url, | |
'dataType': 'script', | |
'cache': true, | |
'success': callback || jQuery.noop | |
}); | |
}; |
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
/* | |
Use jQuery to load FB Connect javascript asynchronously, then trigger manual parsing of individual XFBML tags | |
*/ | |
window.fbAsyncInit = function() { | |
FB.init({channelUrl:'http://YOUR_SITE_URL.HERE/channel.html',xfbml: false,logging:false,status:false}); | |
}; | |
(function() { | |
jQuery(document).ready(function() { | |
jQuery.getScript('http://connect.facebook.net/en_US/all.js', function(){ | |
var parseXFBML = function() { |
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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Styling radios & checkboxes using CSS3</title> | |
<link rel="stylesheet" media="screen" href="styles.css" > | |
</head> | |
<body> | |
<h1>Styling radios & checkboxes using CSS3</h1> |
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
{exp:switchee variable="{segment_1}/{segment_2}/{segment_3}" parse="inward"} | |
{case value = "//"} | |
{!-- s1, s2 and s3 are empty - Show home page --} | |
{embed="site/_home"} | |
{/case} | |
{case value="#^products/\S+/\S+$#"} | |
{!-- s1 is 'products', s2 and s3 are not empty - Show single products --} | |
{embed="site/_product"} |
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
I have a new tag {exp:stash:embed} which allows you to include Stash template files and store | |
in the database. Files can be fully or partially parsed when read before saving (set), OR | |
saved and then parsed on retrieval (get). Stash variables can be accessed in the Stash | |
template files as {stash:variable} and of course all the usual {global_variables} work as | |
expected. | |
An example: | |
{exp:stash:embed | |
name="news_listing" |
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
{embed="_layouts/index"} | |
{preload_replace:channel="case_studies"} | |
{if group_id=="1"} | |
{preload_replace:featured_status="featured|closed"} | |
{preload_replace:preview_status="open|featured|closed"} | |
{if:else} | |
{preload_replace:featured_status="featured"} | |
{preload_replace:preview_status="open|featured"} | |
{/if} |
OlderNewer