Skip to content

Instantly share code, notes, and snippets.

Curtis Blackwell curtisblackwell

Block or report user

Report or block curtisblackwell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@curtisblackwell
curtisblackwell / .gitignore
Created Jul 1, 2011
ExpressionEngine add-on .gitignore
View .gitignore
## OS X GENERATED FILES
.DS_Store
Icon
Icon?
Thumbs.db
._*
.Spotlight-V100
.Trashes
@curtisblackwell
curtisblackwell / .gitignore
Created Jul 1, 2011
Above root .gitignore for developing ExpressionEngine sites on a Mac
View .gitignore
## OS X GENERATED FILES
.DS_Store
Icon
Icon?
Thumbs.db
._*
.Spotlight-V100
.Trashes
## MISCELLANEOUS
@curtisblackwell
curtisblackwell / config.php
Created Jul 5, 2011
ExpressionEngine add-on config file. Belongs in add-on root.
View config.php
<?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 Jul 6, 2011
NSM Add-On Updater RSS feed for ExpressionEngine add-ons.
View rss_[WEBSAFE_ADD-ON_NAME].xml
<?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 Aug 13, 2011
Inline styling for individual entries in ExpressionEngine using [eMarketSouth's String](http://emarketsouth.com/add-ons/string-plugin/)
View inline_styling.html
{!--
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 Aug 13, 2011
eecms: <title> using stash and switchee
View head
<title>{exp:stash:get name="title"}</title>
@curtisblackwell
curtisblackwell / string_noindex
Created Aug 13, 2011
ExpressionEngine noindexing handled with [eMarketSouth's String](http://emarketsouth.com/add-ons/string-plugin/)
View string_noindex
{!--
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 Aug 13, 2011
eecms: canonical uris with stash and switchee
View sn_canonical_uri.html
{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 Aug 13, 2011
Cache and resize images in entries using Lumis imgsizer, Matrix, and Stash
View index.html
{!--
# 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 Aug 22, 2011
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)
View pagination
{!--
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"}
You can’t perform that action at this time.