Category Archives: CodeIgniter

CodeIgniter / Expression Engine Nashville – Slides

Slides from CodeIgniter / EE Nashville Talk

Also posted in PHP | Leave a comment

Getting HMVC to play nicely with deeply nested config files in Sparks

I was recently debugging an issue with Codeigniter Payments and HMVC. The issue was that config files were not being loaded if they were deeply nested – for example: config/payments/my_gateway.php The MX_Config path explodes the filepath provided on forward slashes, so if you do anything other than this->load->config(‘whatever’), the file you want won’t get loaded, [...]

Also posted in PHP, Programming | 2 Comments

Load Random Views in CodeIgniter (Reactor 2.0)

Perfect for loading a random testimonial, banner image, etc.  A quick helper for your coding pleasure = ) First, create your helper (helpers/randomview_helper.php).  Here are the contents: <?php if ( ! defined(‘BASEPATH’)) exit(‘No direct script access allowed’); /** * Random view */ function get_random_view($fullpath, $viewpath) { $file = str_replace(‘.php’, ”, random_element(get_filenames($fullpath))); return $viewpath.$file; } Notice [...]

Also posted in Programming | Leave a comment

CodeIgniter Payments – A New Library for CodeIgniter Reactor

UPDATE: Since writing this blog post, I’ve released a new library which replaces this one, using the CodeIgniter Sparks system. You can find it here: I am currently supporting 6 payment gateways, and should have several more added very soon. Thanks for reading! NOTE: You can skip reading the post and get right to [...]

Also posted in Career, Programming | Comments closed