Skip to content

Instantly share code, notes, and snippets.

View brandoncordell's full-sized avatar

Brandon Cordell brandoncordell

View GitHub Profile
@brandoncordell
brandoncordell / cakephp component extension
Created June 17, 2011 13:28
Extending components in CakePHP without having to change all the calls to the original component
// controllers/components/custom_acl.php
App::import('Component', 'Acl');
class CustomAclComponent extends AclComponent {
public function example() {
// override the function
}
}
Then in your app_controller
@brandoncordell
brandoncordell / gist:799936
Created January 28, 2011 06:55
dZero Image Lib - CodeIgniter Library
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* dZero image library
*
* @package dZero Image Library
* @category Image Manipulation
* @author Daniel Nolan (daniel.nolan@dZerodesign.com) & Brandon Cordell (brandon.cordell@dZerodesign.com)
* @copyright Copyright (c) 2009 dZero Web Design & Development.
* @link http://dzerodesign.com
* @version 1.0
@brandoncordell
brandoncordell / gist:799934
Created January 28, 2011 06:54
dZero Auth - CodeIgniter library
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* dZero authentication library
*
* @package dZero Auth Library
* @category authentication
* @author Daniel Nolan (daniel.nolan@dZerodesign.com) & Brandon Cordell (brandon.cordell@dZerodesign.com)
* @copyright Copyright (c) 2009 dZero Web Design & Development.
@brandoncordell
brandoncordell / gist:799932
Created January 28, 2011 06:53
CreateMyScene.com/shop - products.js
<script type="text/javascript">
//<![CDATA[
var image_url = '<?=base_url()?>public/shared/images/products/';
$(document).ready(function()
{
/* hide some divs */
$('.wall, .window, .multiple_windows, .cart').hide();
/* disable checkout buttons */
@brandoncordell
brandoncordell / gist:799923
Created January 28, 2011 06:44
Authorize.net ARB library
<?php
/**
* Library for using Authorize.net's ARB (automated recurring billing)
*
* @author Brandon Cordell(brandon@leadandrock.com)
* @link http://projects.leadAndrock.com/cake_arb
* @copyright Copyright (c) 2010, Brandon Cordell
* @version 1.0
*
@brandoncordell
brandoncordell / gist:799922
Created January 28, 2011 06:43
CakePHP Link Helper
<?php
/**
* Link Helper
*
* @copyright Copyright 2010, Brandon Cordell
* @author Brandon Cordell <brandon@leadandrock.com>
* @link http://snippets.leadandrock.com/cakephp-link-helper
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*
* Usage: