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
@ronnieduke
ronnieduke / mura-single-page.cfm
Created April 12, 2014 20:25
Display a single page site using the Mura Iterator. This is in context of a parallax theme that needed multiple dom elements of the same content.
<cfoutput>
<cfinclude template="inc/html_head.cfm" />
<!--- By getting a feed with a blank value, Mura will return all pages underneith the homepage --->
<cfset feed=$.getBean("content").loadBy(filename='',siteID=$.event("siteid"))>
<cfset iterator=feed.getKidsIterator()>
<cfif iterator.hasNext()>
<body id="home">
<!--- add the "home" page statically --->
<div class="scroll-holder" data-stub="###$.createCSSid($.content('menuTitle'))#-stub" data-image="#$.content().getImageURL('source')#" data-speed="#$.content('pDataSpeed')#"></div>
@ronnieduke
ronnieduke / script.js
Created May 6, 2014 18:10
Treat responsive mobile nav differently
/*================================================================*/
/* DESKTOP MENU
/*================================================================*/
if (document.documentElement.clientWidth > 767) { //if client width is greater than 767px
ddsmoothmenu.init({
mainmenuid: "main_menu",
orientation: 'h',
contentsource: "markup",
showhidedelay: {showdelay: 300, hidedelay: 100} //set delay in milliseconds before sub menus appear and disappear, respectively
@stevewithington
stevewithington / onSiteCKFinder.cfm
Created June 11, 2014 22:32
Mura CMS : Override CKFinder's default image compression settings to allow for hi-res images
<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;
@ronnieduke
ronnieduke / mura-bulk-update.cfm
Last active August 29, 2015 14:03
Create bulk updates in Mura such as setting items to display, or show in nav
<!---
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
<cffunction name="onContentEdit">
<cfargument name="$" />
<cfset var scripts = ''>
<cfif $.getSubType() Eq 'Vacancy'>
<cfsavecontent variable="scripts">
<script>
jQuery(document).ready(function($){
var newSummary = 'Vacancy summary ' + '<br /><span style="font-weight:normal">Place the single line vacancy description here, this will be visible in the vacancy search</span>';
$('.summaryContainer label a').html(newSummary);
@stevewithington
stevewithington / muraCategorizedContent.cfm
Last active October 5, 2018 17:56
Mura CMS: How to loop over categories and output any categorized content.
<cfoutput>
<cfset cats = 'Weather,Local News,Arts & Culture' />
<ul>
<cfloop array="#ListToArray(cats)#" index="c">
<li>
<h3>#HTMLEditFormat(c)#</h3>
<cfscript>
catBean = $.getBean('category').loadBy(name=c, siteid=$.event('siteid'));
feed = $.getBean('feed');
@pauldenato
pauldenato / getContentByLastUpdateAndCredits.cfm
Last active December 30, 2015 00:42 — forked from stevewithington/getCustomSearch.cfm
Get the Content a User most Recently Updated or is Credited in.
<!--- Adapted from Steve's original gist - https://gist.github.com/stevewithington/5880459 getCustomSearch.cfm --->
<!--- Needed a way to display content a user was credited for or had edited on the front end --->
<!---Add this to the Theme or Site contentrenderer.cfc--->
<cffunction name="getUserActivity" output="no">
<cfargument name="authorid" default="" required="yes" />
<cfscript>
var local = {};
local.feed=$.getBean('feed');
@jeaguilar
jeaguilar / gist:83a3e784d4b02f390887
Last active March 12, 2019 02:52
Mura Settings.ini.cfm documented and undocumented settings
@stevewithington
stevewithington / mura-json-api.cfm
Last active December 14, 2020 18:11
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';
@ronnieduke
ronnieduke / gist:a77da30f1e20fbaf84d1
Created July 16, 2015 17:19
Mura Categories Iterator
<cfoutput>
<cfset catList="">
<cfset it=$.content().getCategoriesIterator()>
<!--- Only run if there are categories applied to the page --->
<cfif it.hasNext()>
<!--- Loop through the categories and append them to the list --->
<cfloop condition="it.hasNext()">
<cfset cat=it.next()>
<!--- Append the current category to the list --->