Skip to content

Instantly share code, notes, and snippets.

View kmgdevelopment's full-sized avatar

Kristen Grote kmgdevelopment

View GitHub Profile
@kmgdevelopment
kmgdevelopment / gist:3892991
Created October 15, 2012 15:09
Profile:Edit Registration Form
{exp:profile:register
include_jquery='no'
safecracker_head='no'
return='notifications/member/registration-success'
group_id='5'
class='member-register'
json='yes'
rules:age='required'
rules:email='required|valid_email'
rules:member_first_name='required'
@kmgdevelopment
kmgdevelopment / gist:3919974
Created October 19, 2012 18:51
Conditional Polyfills
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="/assets_site/js/polyfills.min.js"></script>
<script>
$(document).ready(function(){
$('input, textarea').placeholder();
});
</script>
<![endif]-->
@kmgdevelopment
kmgdevelopment / gist:4033821
Created November 7, 2012 19:28
EE Error Template
<html>
<head>
<title>Error</title>
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
<style type="text/css">
[<div>, prevObject: e.fn.e.init[9], context: undefined, selector: ".find(#content)"]
0: <div>
accessKey: ""
align: ""
attributes: NamedNodeMap
baseURI: ""
childElementCount: 3
childNodes: NodeList[7]
children: HTMLCollection[3]
classList: DOMTokenList
@kmgdevelopment
kmgdevelopment / gist:4035449
Created November 7, 2012 23:50
EE Error Ajax Return
[<div>, prevObject: e.fn.e.init[1], context: undefined, selector: "#content"]
0: <div>
accessKey: ""
align: ""
attributes: NamedNodeMap
baseURI: ""
childElementCount: 3
childNodes: NodeList[7]
children: HTMLCollection[3]
classList: DOMTokenList
@kmgdevelopment
kmgdevelopment / gist:4112399
Created November 19, 2012 18:09
ExpressionEngine Copyright
Copyright &copy; 2012 {if "{current_time format='%Y'}" >"2012"}- {current_time format="%Y"}{/if}
@kmgdevelopment
kmgdevelopment / gist:4355362
Created December 21, 2012 19:59
Nested Switchee Conditional
{if segment_1 == 'blog'}
{exp:switchee case='{segment_2}' parse='inward'}
{case value='#^P(\d+)$#|""|category|author'}
{!-- Content --}
{/case}
{/exp:switchee}
{/if}
@kmgdevelopment
kmgdevelopment / gist:4496135
Last active December 10, 2015 21:38
Dev Docs Broken Code Block

HTML & Javascript

HTML tags should always use double quotes, javascript should always use single quotes.

HTML <div> tags should always be closed with a comment indicating the div class and/or ID. Example:


<div class="mydiv">
  <a href="#">I'm a link!</a>
</div><!--/.mydiv-->
@kmgdevelopment
kmgdevelopment / gist:4496222
Created January 9, 2013 19:48
Dev Docs Broken Code Block - Form

Forms

All forms should be coded with the following structure:


  <form method="post" action="http://mysite.com">
    <input type="hidden" name="foo" value="foo">
    <input type="hidden" name="bar" value="bar" />
    <input type="hidden" name="lorem" value="lorem">
@kmgdevelopment
kmgdevelopment / gist:4512980
Last active December 10, 2015 23:58
Securit:ee Master Config Array
$env_config['securitee'] = array(
'license_number' => '12345',
'disable_accordions' => FALSE,
// ------------------------------------
// File Monitor
// ------------------------------------
'enable_file_monitor' => '1',
'file_monitor_notify_emails' => array('[email protected]', '[email protected]'),
'file_scan_path' => $base_path,