Skip to content

Instantly share code, notes, and snippets.

@jcc2010
jcc2010 / Assets.php
Created April 18, 2011 23:53
A quick assets file to give you control over header and footer templates with codeigniter. Not fully documented (yet) but should be relatively easy to figure out how to get access from your controller to tpl.view files.
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
class Assets
{
var $ci;
var $siteTitle;
var $siteJSPath;
var $siteCSSPath;
var $siteImgPath;
@jcc2010
jcc2010 / Profiler.php
Created April 19, 2011 00:01
Some slight modifications to the codeigniter profiler to dynamically display session vars, and to add EXPLAIN to all queries.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2010, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html