Skip to content

Instantly share code, notes, and snippets.

View adamfairholm's full-sized avatar

Adam Fairholm adamfairholm

View GitHub Profile
@adamfairholm
adamfairholm / gist:703929
Created November 17, 2010 19:44
EE Deployment Helper Accessory
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* EE2 Deploy Helper Accessory
*
* @package ExpressionEngine
* @subpackage Control Panel
* @category Accessories
* @author Green Egg Media
* @link http://www.greeneggmedia.com
@adamfairholm
adamfairholm / Migrations Library Example
Created April 13, 2011 22:25
Migrations Library Example
<?php defined('BASEPATH') or exit('No direct script access allowed');
/**
* Migrations Library
*
* Allows you to update a table based on a master
*
* Schema structure
*
* deprecated_tables => array of table names no longer user
@adamfairholm
adamfairholm / gist:1215762
Created September 14, 2011 03:01
EE vs. Wordpress
// ExpressionEngine Fully-Functional Blog Code:
{exp:channel:entries channel="blog"}
{title}
{/exp:channel:entries}
// Stripped Down Wordpress Blog Code:
// Get your blog code random access key
// this will
@adamfairholm
adamfairholm / gist:1222382
Created September 16, 2011 15:35
My Trigger EE site setup file
title: Site Setup
desc: My site setup
author: Adam Fairholm
author url: http://www.adamfairholm.com
TRIGGER SEQUENCE START
ee : site : enable op
ee : site : enable template debug
ee : site : set word sep (dash)
ee : templates : set base ({app_path}/templates)
@adamfairholm
adamfairholm / gist:1291157
Created October 16, 2011 17:25
PyroCMS 1.3 vs 1.4 beck end
// PyroCMS 1.3.x and below:
<h3>Your Title</h3>
<table>
// Table Content Here
</table>
// PyroCMS 1.4
@adamfairholm
adamfairholm / gist:1291179
Created October 16, 2011 17:41
PyroCMS 1.4 Blog Filter
<fieldset id="filters">
<legend><?php echo lang('global:filters'); ?></legend>
<?php echo form_open(); ?>
<?php echo form_hidden('f_module', $module_details['slug']); ?>
<ul>
<li>
<?php echo lang('blog_status_label', 'f_status'); ?>
@adamfairholm
adamfairholm / gist:1291186
Created October 16, 2011 17:49
Example PyroCMS 1.4 Details Information Array
<?php defined('BASEPATH') or exit('No direct script access allowed');
class Module_Sample extends Module {
public $version = '1.0';
public function info()
{
return array(
'name' => array(
@adamfairholm
adamfairholm / gist:1311570
Created October 25, 2011 06:35
Sample Formojo Form: Bug Report
{mojo:formojo:form
form_class="form" form_id="bug_report_form"
notify1="email" notify1_layout="bug-thank-you" notify1_subject="Thanks for the Bug Report"
notify1_from="[email protected]|Example"
notify2="[email protected]|[email protected]" notify2_layout="bug-report" notify2_subject="New Bug Report"}
<p>Name: {name_error} {input:text name="name" label="Name" required="yes"}</p>
<p>Email: {email_error} {input:email name="email" label="E-mail" required="yes"}</p>
@adamfairholm
adamfairholm / gist:1312729
Created October 25, 2011 13:29
Formojo Bug Report Example Email
Bug Report:
Report ID: {bug_id}
Submitted {when_submitted}
Name: {name}
Email: {email}
Their Problem: {problem}
Urgency: {urgency}
Send Newsletter? {send_newsletter}
@adamfairholm
adamfairholm / gist:1335498
Created November 3, 2011 01:22
PyroStreams Delete Form
{pyro:streams:delete_entry stream="clients" entry_id="[segment_3]"}
{form_open}
{entry}
<p>Are you sure you want to delete {name}? This cannot be undone.</p>
{/entry}