Skip to content

Instantly share code, notes, and snippets.

View jsieber's full-sized avatar

John Sieber jsieber

  • BlueLine Development
  • Missoula, Montana
View GitHub Profile
@jsieber
jsieber / muraCategoryIteratorExamples.cfm
Created September 12, 2018 23:18 — forked from stevewithington/muraCategoryIteratorExamples.cfm
Mura CMS: Category Iterator Examples
<cfscript>
// Category Iterator of Children of the Current Content Node
itKidsCats = $.content().getKidsCategoryIterator();
// Category Iterator of the CURRENT Content Node
itCats = $.content().getCategoriesIterator();
</cfscript>
<cfoutput>
<!--- Children of the Current Content Node --->
<h4>Kids Categories</h4>
<cfif itKidsCats.hasNext()>
@jsieber
jsieber / dsp_custom_search.cfm
Created September 11, 2018 21:49 — forked from stevewithington/dsp_custom_search.cfm
Mura CMS: Custom Search Example
<cfoutput>
<div>
<form action="#$.content('url')#?keywords=#$.event('keywords')#">
<dl>
<dt>Keywords</dt>
<dd><input type="text" name="keywords" value="#HTMLEditFormat($.event('keywords'))#" /></dd>
<dd><input type="submit" value="Search" /></dd>
</dl>
@jsieber
jsieber / muraRebuildImageCache.cfm
Created September 11, 2018 20:42 — forked from stevewithington/muraRebuildImageCache.cfm
Mura CMS: Rebuild image cache or re-save images on redefined image sizes
<!--- Force Image Resave for All Images --->
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID')>
<!--- or to just reset a specific image size you can use --->
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID' ,size='YOURSIZE')>
@jsieber
jsieber / mura-json-api.cfm
Created December 7, 2017 03:22 — forked from stevewithington/mura-json-api.cfm
Mura CMS: JSON API Tests & Examples
<!---
Author: Stephen J. Withington, Jr.
Notes: Place this under a temp directory within your Mura CMS root to test.
For example: http://yourdomain.com/temp/json-test.cfm
--->
<cfscript>
param name="form.endpoint" default="content/new";
param name="form.method" default="GET";
param name="form.context" default="";
param name='session.siteid' default='default';
@jsieber
jsieber / app.css
Created November 14, 2017 03:05 — forked from scottdomes/app.css
React Audio Tutorial
body {
background: #f9f9f9;
font-family: 'Open Sans', sans-serif;
text-align: center;
}
#container {
position: relative;
z-index: 2;
padding-top: 100px;
@jsieber
jsieber / config.xml.cfm
Created December 20, 2016 19:29 — forked from stevewithington/config.xml.cfm
Mura CMS v7: Sample YouTube Display Object
<displayobject name="YouTube Video" contenttypes="*"/>
<!--- Stick this in to your theme/remote/rebuild.cfm --->
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID')>
<!---
Place this file in your theme remote folder
--->
<cfscript>
// add the content ID of the folder you wish to loop through and turn on
itemID=''
content=$.getBean('content').loadBy(contentID=itemID);
// Only get the feed if it's a valid node
<cfscript>
// This will NOT work unless you have 'allowlocalfiles=true' in /config/settings.ini.cfm
// read image info on local file for default value
try {
ir = ImageRead('steve-withington.jpg');
img = ir.source;
} catch(any e) {
img = '';
}
<cfscript>
// drop this in your eventHandler.cfc
public void function onSiteCKFinderConfig($) {
var config = arguments.$.event('config');
// Override CKFinder's default image compression settings to allow for hi-res images
config.images.maxWidth = 0;
config.images.maxHeight = 0;
config.images.quality = 100;