Skip to content

Instantly share code, notes, and snippets.

@Eclarian
Eclarian / view.php
Created September 12, 2012 16:56
Pancake Payments: Client Invoice Health Check
/*
The code is from file found in : /third_party/themes/admin/pancake/views/modules/clients/view.php [Line 104]
Put this immediately after the "else" at approximately line 104
You will replace the <div class="invoice-block"></div> that currently contains the health check.
*/
<?php
// Requires PHP 5.2.0 or greater
// Setup the payment variables
$paid_on_time = 0;
@Eclarian
Eclarian / DateTime.php
Created March 12, 2012 18:06
PHP DateTime Object Extension
/**
* EC_DateTime
*
* By default in the PHP object, the date property is not affected when the
* method format() is run. However, it's annoying to have to constantly set
* the format you desire to output. Also, you may not have access when the
* __toString() method is executed in another function if passed as an object.
* and then treated as a string.
*
@Eclarian
Eclarian / jQueryVersion
Created December 14, 2011 20:33
jQuery Version Function
/**
* jQuery Version returned as 3 digit integer
*
* Allows you to perform version ranges if ( jQueryVersion() < 170 )
* Useful for plugin dev with events and dealing with live, delegate, and on
*
* @author Eclarian LLC
* @return integer
*/
var jQueryVersion = function() {
@Eclarian
Eclarian / MY_URI.php
Created November 8, 2011 17:12
CodeIgniter URI - Access Associative Items as URI Object Properties
class MY_URI extends CI_URI {
/**
* Config
*
* This allows the URI class to assign and access the config object
* without overloading the object
*
* @since 2.0.0
*/
@Eclarian
Eclarian / db_driver_extension.php
Created June 10, 2011 18:46
CodeIgniter Database Driver Extension to simplify the CRUD actions within your app
<?php
/**
* Database Driver Extension
*
* DEPENDENCIES:
* CodeIgniter 2.x.x (with ActiveRecord turned on)
* is_associative() function -- place in autoloaded helper file. It should load early enough before any queries.
*
* This Extension allows you to insert/update, batch insert/batch update, and delete from any
* table within your database simply with an easy interface