Skip to content

Instantly share code, notes, and snippets.

View curtisblackwell's full-sized avatar
🐐

Curtis Blackwell curtisblackwell

🐐
View GitHub Profile
@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
@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 / 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 / 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 / head
Created August 13, 2011 03:43
eecms: <title> using stash and switchee
<title>{exp:stash:get name="title"}</title>
@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 / 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 / index.html
Created August 13, 2011 10:03
Cache and resize images in entries using Lumis imgsizer, Matrix, and Stash
{!--
# FIELDS
1. Matrix: images
* File: image
* PT Pill: alignment (left, right, or block)
* Text: description
* PT Pill: width
2. Textarea/WYSIWYG: body
@curtisblackwell
curtisblackwell / pagination
Created August 22, 2011 11:28
Pagination snippet using [Bjørn Børresen's AB Pagination](http://www.addonbakery.com/) and [Mark Croxton's Switchee](http://devot-ee.com/add-ons/switchee)
{!--
This will only work if embedded in another switchee tag pair.
If it's not embedded, change the {switchee} tags to {exp:switchee}.
--}
{paginate}
{switchee variable="{abp_has_previous}"}
{case value="1"}