This file contains 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
{!-- get a list of people with last names starting A-F --} | |
{exp:channel:entries channel="people" sort="asc" orderby="person_lname"} | |
{exp:stash:append name="people_a_f" match="#^[A-F]#" against="{person_lname}"} | |
<li><a href="/people/{entry_url}" title="view profile">{title}</a></li> | |
{/exp:stash:append} | |
{/exp:channel:entries} |
This file contains 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
{!-- set context for this form to namespace our vars--} | |
{!-- @ refers to the current context --} | |
{exp:stash:context name="myform"} | |
{!-- register form variables from $_POST superglobal and save for 30 mins, scope to user's session --} | |
{exp:stash:get | |
name="filter" | |
dynamic="yes" | |
type="snippet" | |
save="yes" |
This file contains 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 | |
// Look for this in mod.channel.php (around line 2635): | |
case 'custom_field' : | |
if (strpos($corder[$key], '|') !== FALSE) | |
{ | |
$end .= "CONCAT(wd.field_id_".implode(", wd.field_id_", explode('|', $corder[$key])).")"; | |
} | |
else | |
{ |
This file contains 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
// ********************************************************************************* // | |
/** | |
* Preps the data for saving | |
* | |
* @param $data Contains the submitted field data. | |
* @return string Data to be saved | |
*/ | |
public function save($data) | |
{ |
This file contains 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
{!-- build result rows --} | |
{exp:stash:set parse_tags="yes"} | |
{stash:results_rows} | |
{exp:channel:entries | |
channel="my_channel" | |
limit="10" | |
paginate="bottom" | |
} | |
<tr> |
This file contains 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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Sample form field configuration | |
|-------------------------------------------------------------------------- | |
*/ | |
$config = array( | |
This file contains 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
{exp:channel:entries | |
limit="1" | |
disable="member_data|pagination|categories" | |
channel="page" | |
} | |
{!-- set fields based on language selection --} | |
{exp:switchee variable="{global:lang}" parse="inward"} | |
{!-- default language --} |
This file contains 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
class Informer { | |
static protected $hooks = array(); | |
protected $hook_event; | |
// -------------------------------------------------------------------- | |
// Hook management | |
/** | |
* _register hook |
This file contains 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 | |
$plugin_info = array( | |
'pi_name' => 'Switchee', | |
'pi_version' =>'2.0.4a', | |
'pi_author' =>'Mark Croxton', | |
'pi_author_url' => 'http://www.hallmark-design.co.uk/', | |
'pi_description' => 'Switch/case control structure for templates', | |
'pi_usage' => Switchee::usage() | |
); |
This file contains 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
$(document).ready(function(){ | |
// colorbox | |
if ($('#modal').length > 0) { | |
var modalConfig = { | |
inline : true, | |
href : "#modal", | |
opacity : .75, | |
onLoad:function(){ | |
$('#modal').css('display','block'); |
OlderNewer