This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// P&T link automations | |
var ee_affiliate_name = 'brandonkelly', | |
external_re = new RegExp('^https?://(?!'+document.location.hostname+')'), | |
external_ee_re = new RegExp('^(https?://(secure\\.)?expressionengine.com\\/)([^#]*)(#(\\w+))?$'), | |
ee_affiliate_re = new RegExp('^index\\.php\\?affiliate='+ee_affiliate_name); | |
$('a').each(function(){ | |
// is this an external link? | |
if (this.href.match(external_re)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:channel:entries channel="ee" url_title="{segment_3}" limit="1"} | |
{if no_results}{embed="site/404"}{/if} | |
{exp:docs:page entry_id="{entry_id}" url_title="{segment_4}"} | |
{if no_page}{embed="site/404"}{/if} | |
{embed="site/-header" title="{title} - Docs - {docs_page_title}" id="{url_title}-docs" class="ee docs"} | |
<header class="clearafter"> | |
<hgroup class="left"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A Guide to Fieldtype Settings in EE2 | |
display_global_settings() | |
- $this->settings | |
- fieldtype's global settings | |
display_settings($data) | |
- $this->settings | |
- fieldtype's global settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* tabfocus event plugin for jQuery | |
* | |
* Mimics the focus() event, except it's only | |
* called when focus wasn't assigned via a click | |
* | |
* ------------------------------------------- | |
* Usage | |
* ------------------------------------------- | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove any <script> tags | |
// Go backwards to factor in nested script tags, e.g. <script>document.write('<script></script>')</script> | |
$offset = strlen($html) - 9; // Minimum match length is 9 chars (<script/>) | |
for ($offset; $offset >= 0; $offset--) | |
{ | |
$substr = substr($html, $offset); | |
if (preg_match('/^<script[^>]+?\/>|^<script(?:.|\s)*?\/script>/im', $substr, $match)) | |
{ | |
$html = substr($html, 0, $offset).substr($html, $offset+strlen($match[0])); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In system/expressionengine/third_party/wygwam/ft.wygwam.php, find this in the beginning of the save() function: | |
// Clear out if just whitespace | |
if (! $data || preg_match('/^\s*(<\w+>\s*( )*\s*<\/\w+>|<br \/>)?\s*$/s', $data)) | |
{ | |
return ''; | |
} | |
And replace it with this: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="file" name="fieldname"> | |
<input type="hidden" name="fieldname_filedir" value="1"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if entry.drinkAttributes.contains('alcoholic') %} | |
Alcoholic! | |
{% else %} | |
Not alcoholic | |
{% endif %} | |
<h2>Selected Attributes</h2> | |
<table> | |
{% for attr in entry.drinkAttributes %} | |
<tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set criteria = {section: 'cocktails', order: 'title'} %} | |
{% set prev = entry.getPrev(criteria) %} | |
{% set next = entry.getNext(criteria) %} | |
{% if prev or next %} | |
<div class="pane"> | |
{% if prev %} | |
<p>Previous: <a href="{{ prev.url }}">{{ prev.title }}</a></p> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Getting Started | |
* Introduction | |
* Installing & Updating | |
- Requirements | |
- Installing | |
- Updating | |
* Licensing | |
* CP Overview | |
* Packages & Plugins |