Skip to content

Instantly share code, notes, and snippets.

View lonnieezell's full-sized avatar

Lonnie Ezell lonnieezell

View GitHub Profile
@lonnieezell
lonnieezell / bonfire_menu_thoughts.md
Created August 26, 2013 20:13
An early documentation for discussion of the new menu system in Bonfire.

Bonfire Menus

Bonfire Menus provides a low-level, under-the-hood approach to maintaining menus and navigation in Bonfire application, using files and smart-tags to handle restricting access to links, as well as allowing modules to insert their menu needs.

Proposed Features

The following features are deemed as desirable and/or necessary for this system to work at it's highest peak and maintain simplicity of use.

  • Allow for easy manual creation of menus by editing a single text file
  • Using text files allow for versioning between different environments of an application.
@lonnieezell
lonnieezell / gist:1328435
Created October 31, 2011 18:48
Email Validation
/*
Method: valid_email()
Verifies that an email could at least potentially be real
by verifying the domain accepts email it seems to be proper format.
Parameter:
$str - The email address to verify
Returns:
@lonnieezell
lonnieezell / 001_Create_initial_tables.php
Created February 8, 2011 16:02
An example database migration using a modified version of Phil Sturgeon's migrations lib.
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Migration_Create_initial_tables extends Migration {
var $migration_type = 'sql';
public function up()
{
$sql =<<<SQL
#
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>