This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tinymce.create('tinymce.plugins.TagInsert',{ | |
createControl: function(n, cm) { | |
switch (n) { | |
case 'taginsert': | |
var mlb = cm.createListBox('taginsert', { | |
title : 'Insert Template Tag', | |
onselect : function(v) { | |
tinyMCE.activeEditor.selection.setContent(v); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function post_max_size_exceeded() | |
{ | |
// Error occured if the POST array is empty, but the content length is not | |
return (bool) | |
( | |
$_SERVER['REQUEST_METHOD'] == 'POST' | |
AND | |
empty($_POST) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') OR die('No direct access allowed.'); | |
/** | |
* @package YurikoCMS | |
* @author Lorenzo Pisani - Zeelot | |
* @copyright (c) 2008-2010 Lorenzo Pisani | |
* @license http://yurikocms.com/license | |
*/ | |
class YForm_Field_RadioMatrix extends YForm_Field_Group { | |
protected $_has_label = TRUE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Some lovely, valid php code that prints "foofoo" | |
echo${${($f='f').(${$o='o'}).${$o}}=${$f}.$${$$o}.$$${$$$o}}; | |
echo$$$$$$$$$$$$$$$$$$$$${(${(${(${(${(${($$$foo)})})})})})}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A simple class for calculating holidays | |
* | |
* Able to calculate dates for holidays based on the stored derivations. | |
* Holidays other than Easter based on lunar cycles will not be able to be | |
* calculated. Work should be done to improve this with configuration abilities | |
*/ | |
class Holiday { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){$(function(){ | |
// Make it so you are warned when navigating away from certain unsaved forms | |
if ($('form.remember-to-save-me').length){ | |
$('form.remember-to-save-me').each(function(){ | |
$(this) | |
.data('saved', false) | |
.data('serial', $(this).serialize()) | |
.submit(function(){ | |
$(this).data('saved', true); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Domain Classes | |
abstract class Domain { // Provides means to persist models and understand relationships | |
public function __construct(Database_Interface $database, Domain_Builder_Base $builder) {/* ... */} | |
public function find($unique_key) {/* ... */} | |
public function find_all($unique_key) {/* ... */} | |
public function save(Domain_Model $model) {/* ... */} | |
public function find_all_related_to(Domain_Model $model) {/* ... */} | |
/* ... */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
class ORM extends Kohana_ORM { | |
protected $_as_object = NULL; | |
public function as_object($class) | |
{ | |
$this->_as_object = $class; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MagicProperties implements ArrayAccess | |
{ | |
protected $properties = array('foo' => 'bar'); | |
public function __get($key) | |
{ | |
return $this->properties[$key]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This overwrites the default authenticate method in sdk.class.php to address SQS queue URLs. | |
* | |
* @return CFResponse Object containing a parsed HTTP response. | |
*/ | |
public function authenticate($operation, $payload) | |
{ | |
// Save the current hostname | |
$hostname = $this->hostname; |