Skip to content

Instantly share code, notes, and snippets.

@electricputty
electricputty / gist:1922975
Created February 27, 2012 10:19
Auto clear
/* Auto float clearing for compliant browsers
*************************************************************************/
.group:after {
content: ".";
height:0;
display:block;
clear:both;
visibility:hidden;
}
@electricputty
electricputty / gist:2412497
Created April 18, 2012 09:54
blank stash
Sometimes this value is blank
{exp:stash:get_list name='result_data'}{if '{cf_catentry_date}' != ''}{cf_catentry_date}{/if}{/exp:stash:get_list}
@electricputty
electricputty / gist:3011882
Created June 28, 2012 15:04
authenicate forgot password
{exp:authenticate:forgot_password}
<fieldset>
<ul>
<li>
<label for="username">Username</label><input type="text" id="username" name="username" />
</li>
</ul>
</fieldset>
<button class="button send_button form_button" value="Submit" type="submit"></button>
@electricputty
electricputty / EE folder structure
Created August 10, 2012 10:51
EE Folder structure
/assets/
/__site_info
/__static_html
/config
/config.php
/database.php
/site_css
/site_fonts
/site_images
/site_js
@electricputty
electricputty / gist:3313407
Created August 10, 2012 11:00
Moving your config and database out of the system folder
config.php
===========
<?php
include($_SERVER['DOCUMENT_ROOT'].'/assets/config/config.php');
?>
database.php
============
<?php
include($_SERVER['DOCUMENT_ROOT'].'/assets/config/database.php');
@electricputty
electricputty / config.php
Created August 10, 2012 11:10
Our master config.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| ExpressionEngine Config Items
|--------------------------------------------------------------------------
|
| The following items are for use with ExpressionEngine. The rest of
| the config items are for use with CodeIgniter, some of which are not
| observed by ExpressionEngine, e.g. 'permitted_uri_chars'
@electricputty
electricputty / database.php
Created August 10, 2012 11:10
Our master database.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
switch($_SERVER['HTTP_HOST']) {
case 'local.dev':
$active_group = 'local';
break;
case 'test.site':
$active_group = 'test';
break;
@electricputty
electricputty / gist:3313789
Created August 10, 2012 11:56
Basic editorial template
{sp_header}
{exp:channel:entries channel="editorial" disable="categories|category_fields|member_data|pagination" limit="1"}
<div id="bodyContent">
<h1>{title}</h1>
{cf_editorial_body}
{sp_page_actions}
</div>
@electricputty
electricputty / gist:3313806
Created August 10, 2012 12:04
EE add-ons
Base add-ons:
SnippetsSync [http://devot-ee.com/add-ons/snippetssync/] - Free, enables snippets and global variables to be saved as flat files
Switchee [http://devot-ee.com/add-ons/switchee/] - Free, duplicates and extends on php’s switch statement using simple EE code
Expresso/Wygwam [http://devot-ee.com/add-ons/expresso/ or http://devot-ee.com/add-ons/wygwam/] - Paid, WYSIWYG editors
EE Hive Hacksaw [http://devot-ee.com/add-ons/hacksaw/] - Free, text truncating plugin
CE Image [http://devot-ee.com/add-ons/ce-image/] - Paid, Image resizing plugin
Better Workflow [http://devot-ee.com/add-ons/better-workflow/] - Paid, workflow and entry preview
Situational:
Matrix [http://devot-ee.com/add-ons/matrix/] - Paid, fieldtype that enables tabular data rows to be inputted. E.G. photo gallery
@electricputty
electricputty / gist:3350316
Created August 14, 2012 15:34
Unnecessary EE directories
/themes/wiki_themes
/themes/site_themes
/themes/profile_themes
/themes/cp_themes/corporate