Skip to content

Instantly share code, notes, and snippets.

Apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/system [NC]
RewriteCond %{QUERY_STRING} !ACT|URL [NC]
RewriteCond %{REQUEST_METHOD} !=POST [NC]
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
RewriteCond %{DOCUMENT_ROOT}/static/default_site/static%{REQUEST_URI}/index\.php -f
RewriteRule ^ /static/default_site/static%{REQUEST_URI}/index\.php [L,QSA]
<?php
define('XDEBUG', "xdebug");
define('ZEND_DEBUGGER', "Zend Debugger");
function createXmlHeader()
{
return "<?xml version=\"1.0\"?>";
}
@litzinger
litzinger / gist:3370382
Created August 16, 2012 14:12 — forked from objectivehtml/gist:3370357
Interface Builder example
<?php
public function settings()
{
$this->EE->cp->set_right_nav(array(
'&larr; Back to Schemas' => $this->cp_url('schemas'),
));
$fields = array(
'settings' => array(
@litzinger
litzinger / gist:3124799
Created July 16, 2012 20:23 — forked from delamedia/gist:3124739
PHP in Events
<?php
$_GET['cal_id'] = (isset($_GET['cal_id'])) ? $_GET['cal_id'] : array();
$_GET['event_id'] = (isset($_GET['event_id'])) ? $_GET['event_id'] : array();
?>
<?php if( empty($_GET['cal_id']) ) : ?>
{!-- the links from the old site didn't use cal_id or event_id. this will preserve their functionality --}
{if segment_3}
{exp:calendar:calendars calendar_name="{segment_3}" }
{redirect="events/detail/{calendar_url_title}?cal_id={calendar_id}"}