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
if [ -x /usr/libexec/path_helper ]; then | |
eval `/usr/libexec/path_helper -s` | |
fi | |
if [ "${BASH-no}" != "no" ]; then | |
[ -r /etc/bashrc ] && . /etc/bashrc | |
fi | |
#http://gist.github.com/31934 | |
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 | |
$routes = array( | |
array( | |
"route" => "^(.*)/addon/(.*)/tickets", | |
"template_group" => "site", | |
"template" => "archives", | |
"query_string" => "%1/%2/%3/%4" | |
) | |
); | |
?> |
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
function insert($at, $html) | |
{ | |
global $SESS; | |
$SESS->cache['lg'][LG_POL_addon_id]['snippets'][$at][] = $html; | |
} | |
function insert_css($css, $file = TRUE, $at = "head") | |
{ | |
if($file) | |
{ |
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 | |
function load_settings($force_refresh = FALSE, $return_all = FALSE) | |
{ | |
global $SESS, $DB, $REGX, $PREFS; | |
$settings = array(); | |
$site_id = $PREFS->ini('site_id'); | |
if( |
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
<a href="http://expressionengine.com/forums/viewthread/108855/">Link1</a> | | |
<a href="http://expressionengine.com/">Link2</a> | | |
<a href="http://expressionengine.comindex.php/?affiliate=newism&page=/forums/viewthread/108855/">Link 3</a> | |
<a href="http://expressionengine.com">Link4</a> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> | |
eeregexp = new RegExp("^(http://(www\.)?expressionengine\.com)"); | |
affiliateregexp = new RegExp("affiliate"); | |
affiliate = "newism"; |
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 | |
class Nsm_module_CP { | |
var $module_name = "Nsm_module"; | |
var $version = '1.0.0'; | |
public function __construct($switch = TRUE) | |
{ | |
global $IN; |
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 function render_collection($collection, $tagdata, $prefix = "", $depth = "0") | |
{ | |
global $TMPL; | |
$count = 0; | |
foreach ((array)$collection as $key => $data) | |
{ | |
++$count; | |
// print(str_repeat(" ", $depth). $prefix . $key."<br />"); | |
if(is_array($data) || is_object($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
function update_last_revision($entry_id) | |
{ | |
global $DB, $IN; | |
$weblog_id = $IN->GBL('weblog_id'); | |
$query = $DB->query("SELECT | |
enable_versioning, | |
enable_qucksave_versioning | |
FROM exp_weblogs | |
WHERE weblog_id = '".$weblog_id | |
); |
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 | |
// Written by Leevi Graham - Technical Director - http://newism.com.au | |
// All the best EE extensions can be found at: http://leevigraham.com !! | |
/** | |
The function below demonstrates how to use the weblog obect | |
to parse your own custom module / plugin tags | |
Usage {exp:my_plugin:use_weblog_object} ... {exp:my_plugin:use_weblog_object} | |
The tag will now behave like an exp:weblog:entries tag accepting the same params |
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 | |
make_embed_params_tag_params() | |
{ | |
// the valid params for the tag | |
$valid_params = array( | |
'entry_id', | |
'weblog_id', | |
'url_title' | |
); |
OlderNewer