Skip to content

Instantly share code, notes, and snippets.

Curtis Blackwell curtisblackwell

Block or report user

Report or block curtisblackwell

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
@curtisblackwell
curtisblackwell / README.md
Last active Dec 31, 2015
Support for Markdown in Statamic's dashboard.
View README.md

Markdown in Statamic Dashboard

Replace admin/themes/ascent/templates/dashboard.php with this dashboard.php.

Tables

If you're using tables, you'll also need to include the override add-on with the following directory structure:

_add-ons
  override
    js
      tuchus.js
@curtisblackwell
curtisblackwell / README.md
Last active Jan 2, 2016
Statamic Suggest Hack
View README.md

Statamic Suggest Hack

This is a hack on Statamic's Suggest fieldtype to allow options to be passed in via a separate file. This way global variables can populate the options.

Usage

Paste the code from ft.suggest.hack.php into cp/fieldtypes/suggest/ft.suggest.php after the "Hardcoded list of options" section.

In your fieldset, do something like this:

brand:
  display: Brand
@curtisblackwell
curtisblackwell / README.md
Created Mar 2, 2013
Non-Destructive Sass Twitter Bootstrap Gutterless Fluid Grid Hack
View README.md

Non-Destructive Sass Twitter Bootstrap Gutterless Fluid Grid Hack

Why?

Sometimes I need a row sans gutters. This uses the same mixins and whathaveyou to create another grid that sits alongside the normal grid.

Difference in Markup

You'll need to wrap your .row-fluid in a .gutterless div.

@curtisblackwell
curtisblackwell / README.md
Created Oct 14, 2012
Statamic setup script
View README.md

NOTICE

Discontinued in favor of Statamechanic.

Legacy Info

This script will:

  1. Remove the following files/directories:
    • _config/fieldsets/* (everything in dir)
    • _config/settings.yaml.sample
    • _config/users/admin.yaml.sample
@curtisblackwell
curtisblackwell / index.haml
Created Oct 3, 2012
Any Image to CSS by Emad Elsaid
View index.haml
%h1
Any Image to CSS converter
.container
.config
%label Choose Image:
%input#upload{:type=>"file"}
%label PixelSize:
%input#size{:type=>"number",:value=>"1"}
%label Space:
%input#space{:type=>"number",:value=>"0"}
View unzip.php
<?php
$zip = new ZipArchive;
$res = $zip->open('FILE_NAME.zip');
if ($res === TRUE) {
$zip->extractTo(dirname(__FILE__)); // Same dir
$zip->close();
echo 'ok';
} else {
echo 'failed';
View ban_member_snippet
{!-- Snippet: ban_member_snippet --}
{if can_moderate_comment}
[<a href="{cp_url}?S=0&D=cp&C=addons_modules&M=show_module_cp&module=comment&method=index&entry_id={entry_id}">delete &amp; ban</a>]
{/if}
{!-- Template --}
{exp:comment:entries}
<p>{url_as_author} wrote: {ban_member_snippet}</p>
{comment}
@curtisblackwell
curtisblackwell / Custom.css
Created Sep 7, 2011 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
View Custom.css
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@curtisblackwell
curtisblackwell / pagination
Created Aug 22, 2011
Pagination snippet using [Bjørn Børresen's AB Pagination](http://www.addonbakery.com/) and [Mark Croxton's Switchee](http://devot-ee.com/add-ons/switchee)
View pagination
{!--
This will only work if embedded in another switchee tag pair.
If it's not embedded, change the {switchee} tags to {exp:switchee}.
--}
{paginate}
{switchee variable="{abp_has_previous}"}
{case value="1"}
@curtisblackwell
curtisblackwell / index.html
Created Aug 13, 2011
Cache and resize images in entries using Lumis imgsizer, Matrix, and Stash
View index.html
{!--
# FIELDS
1. Matrix: images
* File: image
* PT Pill: alignment (left, right, or block)
* Text: description
* PT Pill: width
2. Textarea/WYSIWYG: body
You can’t perform that action at this time.