Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
/(((.|\n)*)[\/$])|(\.(.|\n)*)/g |
// Add this to your module tag | |
if($no_results_prefix = $this->EE->TMPL->fetch_param('no_results_prefix')) | |
{ | |
if(preg_match('/\\'.LD.'if '.$no_results_prefix.'no_results\\'.RD.'.*\\'.LD.'\\/if\\'.RD.'/us', $this->EE->TMPL->tagdata, $matches)) | |
{ | |
$this->EE->TMPL->no_results = $this->EE->TMPL->parse_variables_row($matches[0], array( | |
$no_results_prefix.'no_results' => 1 | |
)); | |
} |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
function submit(form, callback) { | |
var action = form.attr('action'); | |
var post = {}; | |
form.find('input, select, textarea').each(function() { | |
var $t = $(this); |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* ExpressionEngine - by EllisLab | |
* | |
* @package ExpressionEngine | |
* @author ExpressionEngine Dev Team | |
* @copyright Copyright (c) 2003 - 2011, EllisLab, Inc. | |
* @license http://expressionengine.com/user_guide/license.html | |
* @link http://expressionengine.com |
SELECT GROUP_CONCAT(CONVERT(CONCAT(',', `exp_category_posts`.`cat_id`), CHAR(8)) SEPARATOR ' ') as `category_ids` | |
FROM `exp_channel_data` | |
LEFT JOIN `exp_category_posts` ON `exp_channel_data`.`entry_id` = `exp_category_posts`.`entry_id` | |
LEFT JOIN `exp_channel_titles` ON `exp_channel_data`.`entry_id` = `exp_channel_titles`.`entry_id` | |
GROUP BY `exp_channel_data`.`entry_id` | |
HAVING `category_ids` LIKE '%,10 %' AND `category_ids` LIKE '%,1 %' | |
LIMIT 0 , 30 |
<?php | |
// backwards compabitility for EE < 2.4 | |
defined('URL_THIRD_THEMES') OR define('URL_THIRD_THEMES', $this->EE->config->item('theme_folder_url').'third_party/'); |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* Simple Date Formatting Plugin | |
* | |
* @package ExpressionEngine | |
* @category Plugin | |
* @author Justin Kimbrell | |
* @copyright Copyright (c) 2012, Justin Kimbrell | |
* @link http://objectivehtml.com/ |
<!-- This goes in the document HEAD and will add an additional click event to the objects with a class of 'trigger' --> | |
<script type="text/javascript"> | |
/* By using the $(document).ready() function, we can ensure this JavaScript gets loaded after all the global map variables are set. */ | |
$(document).ready(function() { | |
$('.trigger').click(function() { | |
var $t = $(this); |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Email_Template { | |
public $to, | |
$from, | |
$cc, | |
$bcc, | |
$channel_id, | |
$categories, |