Skip to content

Instantly share code, notes, and snippets.

View curtisblackwell's full-sized avatar
🐐

Curtis Blackwell curtisblackwell

🐐
View GitHub Profile
@curtisblackwell
curtisblackwell / inline_styling.html
Created August 13, 2011 09:45
Inline styling for individual entries in ExpressionEngine using [eMarketSouth's String](http://emarketsouth.com/add-ons/string-plugin/)
{!--
Place the following line in the <head>
{exp:string name="inline_styling"}
You'll need to create a textarea and set formatting to "None." The short name in the example is inline_styling.
--}
{exp:channel:entries
@curtisblackwell
curtisblackwell / sn_canonical_uri.html
Created August 13, 2011 04:13
eecms: canonical uris with stash and switchee
{exp:stash:set
name = "canonical_uri"
save = "yes"
refresh = "525600"
}{exp:switchee variable="{last_segment}"}{case value="" default="yes"}{/case}{case value="{segment_1}"}/{segment_1}{/case}{case value="{segment_2}"}/{segment_1}/{segment_2}{/case}{case value="{segment_3}"}/{segment_1}/{segment_2}/{segment_3}{/case}{/exp:switchee}{/exp:stash:set}
@curtisblackwell
curtisblackwell / string_noindex
Created August 13, 2011 03:48
ExpressionEngine noindexing handled with [eMarketSouth's String](http://emarketsouth.com/add-ons/string-plugin/)
{!--
Place the following line in <head>
{exp:string name="noindex"}
--}
{exp:string:set name="noindex"}<meta name="robots" content="noindex">{/exp:string:set}
@curtisblackwell
curtisblackwell / head
Created August 13, 2011 03:43
eecms: <title> using stash and switchee
<title>{exp:stash:get name="title"}</title>
@curtisblackwell
curtisblackwell / rss_[WEBSAFE_ADD-ON_NAME].xml
Created July 6, 2011 03:42
NSM Add-On Updater RSS feed for ExpressionEngine add-ons.
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:ee_addon="http://ee-garage.com/nsm_addon_updater">
<channel>
<title>cpb [ADD-ON_NAME] Changelog</title>
<link>http://curtisblackwell.com/expressionengine-add-ons/cpb-[WEBSAFE ADD-ON NAME]</link>
<description>cpb [ADD-ON_NAME] Changelog</description>
{exp:channel:entries
channel = "addons"
disable = "categories|member_data|pagination"
entry_id = "[ENTRY_ID]"}
@curtisblackwell
curtisblackwell / config.php
Created July 5, 2011 02:56
ExpressionEngine add-on config file. Belongs in add-on root.
<?php
/*
Place the following line above the $plugin_info array in pi.[add_on_name].php:
require_once(PATH_THIRD . '[websafe_add-on_name]/config.php');
*/
if (! defined('ADD_ON_V')) {
define('ADD_ON_NAME', 'cpb [Add-on Name]');
define('ADD_ON_V', '0.1');
}
@curtisblackwell
curtisblackwell / .gitignore
Created July 1, 2011 09:37
ExpressionEngine add-on .gitignore
## OS X GENERATED FILES
.DS_Store
Icon
Icon?
Thumbs.db
._*
.Spotlight-V100
.Trashes
@curtisblackwell
curtisblackwell / .gitignore
Created July 1, 2011 03:35
Above root .gitignore for developing ExpressionEngine sites on a Mac
## OS X GENERATED FILES
.DS_Store
Icon
Icon?
Thumbs.db
._*
.Spotlight-V100
.Trashes
## MISCELLANEOUS