Skip to content

Instantly share code, notes, and snippets.

View philsturgeon's full-sized avatar
🌳
Planting Trees

Phil Sturgeon philsturgeon

🌳
Planting Trees
View GitHub Profile
@philsturgeon
philsturgeon / MY_Parser.php
Created November 15, 2009 15:53
Subtle CodeIgniter Dwoo implementation via MY_Parser
<?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, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
<?php
class Prowl
{
var $username = '';
var $password = '';
var $application = 'CI Prowl';
/**
* Constructor - Sets Preferences
<?php
$array = array(
'Appt with my IFA: cxzcsdf Wed. 10:30',
'Transfer some cas\\zh to my SIPP ready to invest in R&M Global Opportunities on launch'."\n",
'Research and switch from my gilts fund to an emerging markets fund'
);
$serialized = serialize($array);
<?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, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
v0.9.8 Documentation
--------------------
Dont worry guys this will be broken down into page hierarchy, just filling out the content while I work out how to lay it all out.
Modules
PyroCMS is broken down into modules. A module can be frontend only (shows only to the public on the user-facing part of the site) and some might be
<?php
$g=$_GET;$c=@$g['c']?$g['c']:'Home';
if(!@include"c/$c.php")die('fail');
$m=method_exists($c,$m=@$g['m'])?$m:'index';
$o=new$c();$o->$m($g);
class MY_Loader extends CI_Loader {
function image($file_path, $mime_type_or_return = 'image/png')
{
$this->load->helper('file');
$image_content = read_file($file_path);
// Image was not found
if($image_content === FALSE)
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class MY_Config extends CI_Config
{
function __get($item)
{
return parent::item($item);
}
function __set($item, $value)
<?php
/**
* @author Phil Sturgeon - PyroCMS development team
* @package PyroCMS
* @subpackage Installer
*
* @since v0.9.8
*
*/
class Installer_lib
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
# NOTICE: If you get a 404 play with combinations of the following commented out lines
#AllowOverride All
#RewriteBase /wherever/ci/is
# Keep people out of codeigniter directory and Git/Mercurial data