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-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
@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 / 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
@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>
@stevewithington
stevewithington / config.xml.cfm
Last active December 14, 2023 10:10
Mura CMS : Example of how to create a Frequently Asked Questions (FAQ) area/section with Mura CMS and Bootstrap3 markup.
<!--
1) Drop this in your theme /{SiteID}/includes/themes/{Theme}/config.xml.cfm
-->
<theme>
<extensions>
<extension type="Folder" subType="FAQ" availableSubTypes="Page/Question" iconClass="icon-question-sign">
</extension>
<extension type="Page" subType="Question" iconClass="icon-question" hasSummary="0" hasBody="0" hasAssocFile="0">
</extension>
@modmedia
modmedia / muraDisplayExtendedAttributeImage.cfm
Created January 9, 2014 18:55
Method on displaying Mura extended attribute images, including custom image sizes
<!--- Assuming you've created an extended attribute 'File' type called 'extAttributeImage' --->
<!--- In a Mura Page Template --->
#$.createHREFForImage(filename=$.content('extAttributeImage'),size='myCustomSize')#
<!--- In a Mura Component --->
#$.createHREFForImage(filename=$.component('extAttributeImage'),size='myCustomSize')#
<!--- In the context of an iterator --->
#$.createHREFForImage(filename=item.getExtAttributeImage(),size='myCustomSize')#
/assets/
/cache/
.LCK
.lck
.settings
.project
settings.xml
.rds*
.svn
_mm*
@stevewithington
stevewithington / muraFindAndReplace.cfm
Last active April 25, 2019 04:08
Mura CMS : Find old links in Mura CMS and replace/update them with new ones, quickly and easily with this little script.
<cfscript>
// place this in your Site or Theme eventHandler.cfc, then reload your application!
public any function onApplicationLoad($) {
arguments.$.getBean('contentUtility').findAndReplace(
find='http://olddomain.com'
, replace='http://newdomain.com'
, siteid=arguments.$.event('siteid')
);
}
</cfscript>
@stevewithington
stevewithington / muraCustomGallery.cfm
Last active December 30, 2015 01:09
Mura CMS : This is an example of creating a custom Gallery in Mura CMS.
<!---
1) Create a directory called 'gallery' under either:
a) /{SiteID}/includes/display_objects/custom/gallery/
OR
b) /{SiteID}/includes/themes/{ThemeName}/display_objects/gallery/
2) Add an index.cfm file to the above directory, and then place this code in it.
--->
<cfscript>
$.loadShadowboxJS();
@stevewithington
stevewithington / muraSourceImage.cfm
Created November 26, 2013 21:15
Mura CMS : If you're attempting to store "source" images in your Mura CMS, then you will want to modify your /config/settings.ini.cfm file. Then, you may also want to customize the default Gallery output and add a link to download the "Source" image.
<!--- Add this to your /config/settings.ini.cfm --->
maxsourceimagewidth=99999
<!---
As long as the source image width is less than the value (in pixels) entered above,
then the source image will NOT be modified at all
--->
<!---
Then, you will probably want to copy the '/display_objects/gallery/' directory,