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
{!-- | |
/** | |
* This is a template loader for our multi-lingual / multi-regional site | |
* It takes pieces of parameters and assembles them into template_group/template format | |
* Then checks the DB to see if such a template exists. If it does then it returns the TRUE stuff | |
* If the template does NOT exist it returns the FALSE stuff | |
* It can be run as a single template tag to return "y" or "n" on if it exists OR | |
* it can be run as a tag pair to return other data based on the result | |
* | |
* A small custom plugin was written for this functionality |
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 code for thread http://expressionengine.com/forums/viewthread/174318/ | |
class Accessory_test_acc | |
{ | |
public $name = 'Test Accessory'; | |
public $id = 'accessory_test_acc'; | |
public $version = '1.0.0'; | |
public $description = 'Test bed for accessories'; | |
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
extension=apc.so | |
[APC] | |
apc.enabled=1 | |
apc.shm_segments=1 | |
apc.shm_size=1024M | |
;Relative to the number of cached files (you may need to watch your stats for a day or two to find out a good number) | |
apc.num_files_hint=7000 |
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 | |
// get constants defined by the application | |
// All constants available | |
$constants = get_defined_constants(TRUE); | |
// just constants from the app in question | |
$app_constants = $constants['user']; | |
echo '<pre>'; |
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
{% macro getSrcSet(image, sizes, upscale) %} | |
{%- spaceless %} | |
{% set sizesOut = [] %} | |
{% set allowScaleLarger = upscale | default(false) %} | |
{# loop over sizes parameter and generate transforms #} | |
{% for size in sizes %} | |
{%- spaceless %} | |
{% set currentTransform = {} %} | |