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 | |
/** | |
* NSM Example Addon Display | |
* | |
* Usage: | |
* | |
* $this->EE->load->library("nsm_live_look_display"); | |
* | |
* # Add the custom field stylesheet to the header | |
* $this->EE->nsm_live_look_display->addCSS('custom_field.css'); |
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
{!-- | |
Add this to your index page. | |
Returns the content before <!-- #more --> including the replacement | |
The idea is you can use a comment in a single custom field and only return a sub-section. | |
find="" accepts a regular expression which allows you to add <!-- #more --> inside a paragraph block. | |
--} | |
{exp:nsm_content_split:split find="#<!-- #more -->(<\p>)?#"} | |
{replace_with}<a href="{comment_url_title}">More …</a>$1{/replace_with} | |
{news_content} | |
{exp:nsm_content_split:split} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>iPhone Toggle</title> | |
<style> | |
label.checkbox{ | |
background:url('../img/toggle.png') no-repeat top left; | |
cursor:pointer; | |
display:block; | |
height:0; |
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${1: | |
cache="yes" refresh="${2:10}"}${3: | |
disable="categories|category_fields|${4:custom_fields|}member_data|pagination|trackbacks"}${5: | |
entry_id="${6:{segment_$7\}}"}${8: | |
limit="1"}${9: | |
rdf="off"}${10: | |
url_title="${11:{segment_$12\}}"}${13: | |
weblog="$14" | |
}} | |
$15 |
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' | |
); |
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
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 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
<?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
<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"; |
NewerOlder