Skip to content

Instantly share code, notes, and snippets.

iso100

Block or report user

Report or block iso100

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
View .htaccess
#added by Nevin Lyne - DoS protection against /entry/vote-ajax URL
Redirect 403 /entry/vote-ajax
RewriteEngine On
RewriteBase /
# For SLP Site
RewriteCond %{HTTP_HOST} ^slp.pbinsight.com$
RewriteCond %{REQUEST_FILENAME} !slp/
RewriteRule ^(.*)$ slp/$1
@iso100
iso100 / wygwam_styles.js
Created Mar 18, 2013
Example Editor Styles for Wygwam
View wygwam_styles.js
CKEDITOR.stylesSet.add( 'editor_styles',
[
// Block Styles
//{ name: 'Blue Title', element: 'h2', styles: { 'color': 'Blue' } },
{ name: 'Legal Text', element: 'p', attributes: { 'class': 'legal' } },
{ name: 'CTA Button', element: 'a', attributes: { 'class': 'ctabutton' } },
{ name: 'Citation', element: 'span', attributes: { 'class': 'cite' } },
@iso100
iso100 / Statamic Gallery
Created Feb 24, 2013
Sample code for Gareth that I'm using to size images used in a gallery.
View Statamic Gallery
@iso100
iso100 / GAOutboundTracking
Created Jan 10, 2013
Outbound link tracking with Google Analytics with special support for opening new tabs
View GAOutboundTracking
// Track outbound links in GA via events
$("a").on('click',function(e){
var url = $(this).attr("href");
var target = $(this).attr("target");
if (e.currentTarget.host !== window.location.host) {
var newtab;
try {
_gaq.push(['_trackEvent', 'Outbound Links', e.currentTarget.host, url, 0]);
} catch(err) {}
if (target || e.metaKey || e.ctrlKey) { // If there's a target specified or if the user is holding down a new tab key
@iso100
iso100 / pi.list_linker.php
Created Dec 11, 2012
Plugin to create href links from delimited text
View pi.list_linker.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* List Linker Plugin
*
* @package ExpressionEngine
* @subpackage Addons
* @category Plugin
* @author Adam Wiggall
* @link http://turnandface.com
@iso100
iso100 / statamic13
Created Nov 21, 2012
Statamic 1.3 changes
View statamic13
# On branch official-1.3
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: public_html/_add-ons/redactor/css/redactor.css
# modified: public_html/_add-ons/redactor/ft.redactor.php
# modified: public_html/_add-ons/redactor/hooks.redactor.php
# modified: public_html/_add-ons/redactor/js/fullscreen.js
# modified: public_html/_add-ons/redactor/js/redactor.min.js
@iso100
iso100 / ga-link-tracking.js
Created Nov 16, 2012
Track outbound links as events in GA
View ga-link-tracking.js
@iso100
iso100 / PillResize.html
Created Nov 13, 2012
Sizing Images based on P&T Pill Settings
View PillResize.html
{exp:stash:set name="blocks" parse="inward"}
{ov_blocks}
<div class="block{switch="| even"} size-{block_image_size}" id="block-{row_count}">
<div class="img">{exp:ce_img:single src="{block_image}" width="{block_image_size}" max_width="{block_image_size}" quality="72" alt="size:{block_image_size}"}</div>
{if block_headline}<h2>{block_headline}</h2>{/if}
{if block_content}{block_content}{/if}
</div>
{/ov_blocks}
{/exp:stash:set}
View Image Sizing
{exp:ce_img:pair
src="{block_image}"
width="{if '{block_image_size}'=='large'}293{if:elseif '{block_image_size}'=='small'}137{if:else}215{/if}"
max_width="{if '{block_image_size}'=='large'}293{if:elseif '{block_image_size}'=='small'}137{if:else}215{/if}"
quality="72"
}
<img src="{made}" width="{width}" height="{height}">
{/exp:ce_img:pair}
@iso100
iso100 / XHR-Mega-Menu.html
Created Nov 8, 2012
XHR-loaded megamenu content
View XHR-Mega-Menu.html
HTML Markup:
<ul id="primary-nav" role="navigation">
<li id="nav_home" class="current"><a href="homepage.html">Home</a></li>
<li id="nav_products" class="hasMenu"><a href="overview.html">Products</a><div class="megamenu get-remote-content" data-remote-url="/nav_products.html" style="display:none"></div></li>
<li id="nav_shop"><a href="#">Shop</a></li>
</ul>
Script (requires jQuery):
You can’t perform that action at this time.