Skip to content

Instantly share code, notes, and snippets.

@mattlevine
mattlevine / relatedcategoryimages.cfm
Created February 18, 2012 16:32
How to get images that match the current content nodes categories
<cfscript>
//Get current content's category assignments
rsCategories=$.content().getCategoriesQuery();
//Build a feed of images with matching categories
images=$.getBean("feed")
.setCategoryID( valueList(rsCategories.categoryID) )
.addParam(field='tcontent.type',condition="EQ",criteria='File')
.addParam(field='tfiles.fileEXT',condition="in",criteria='jpg,png,gif,jpeg')
.getIterator();

##Mura CMS / Blue River Interactive Group## Contributor Agreement, Version 1

Thank you for your interest in contributing to the Mura CMS product development com- munity. Blue River Interactive Group, the developers of Mura CMS are very interested in receiving your contributions to Mura CMS, or any other Blue River software.

However, in order to participate, we need to confirm how the rights in your contribution (“Your Contributions”) will be handled. Following the practices of the Free Software Foundation and other open source communities Blue River requests that you assign the copyrights and patents in Your Contributions to Blue River (with a license back to you to use it in any way that you please). Blue River Interactive Group, Inc. (“Blue River”) re- quires that you have a completed Contributor Agreement on file prior to using any of Your Contributions in order to help guarantee that the intellectual property (IP) embodied within Mura CMS and other Blue River products remains unencumbered for use by

DOCKER FIRST (Webinar)

7.1 was designed with a Docker first work flow in mind.

Docker allows increased support for Continuous Deployment and Testing, Multi-Cloud Platforms, Environment Standardization and Version Control. As well as better Isolation and Security (stolen from https://dzone.com/articles/5-key-benefits-docker-ci)

@mattlevine
mattlevine / README.md
Last active April 2, 2018 23:59
Super Simple CaaS example

Super Simple CaaS Example

This is just an example to build upon and in no way represents best practice. You most like would use a web component framework like React.js or Vue.js with Mura.js rather than vanilla js.

For this to work:

  1. You must be on Mura 7.1.137 or greater

  2. set your site's contentRenderer.cfc's this.hashURLs=true;

@mattlevine
mattlevine / mura-custom-form.cfm
Last active June 19, 2018 03:06 — forked from stevewithington/mura-custom-form.cfm
Mura: How to add a validation method to a custom form that doesn't override Mura's async form submission
<!--- Vanilla js --->
<script>
Mura(function(m) {
window.customFormValidation = function(theform) {
// example validation
if (theform.somefield.value === '') {
alert('Please enter a value in somefield');
theform.somefield.focus();
return false;
}
@mattlevine
mattlevine / mura-front-end-toolbar-link.cfm
Created April 27, 2018 19:05 — forked from stevewithington/mura-front-end-toolbar-link.cfm
Mura: How to add a link to the front end toolbar
@mattlevine
mattlevine / mura-recaptcha-example.cfm
Created April 27, 2018 19:05 — forked from stevewithington/mura-recaptcha-example.cfm
Mura: Custom form with Google reCAPTCHA example
<cfparam name="form.issubmitted" default="false"/>
<cfoutput>
<form id="frm-temp" action="" method="post">
<input type="text" name="testing" />
#$.dspReCAPTCHA()#
<button type="submit" class="btn btn-primary">Submit</button>
<input type="hidden" name="issubmitted" value="true"/>
</form>
@mattlevine
mattlevine / mura-form-scripts.js
Created April 27, 2018 19:05 — forked from stevewithington/mura-form-scripts.js
Mura CMS: How to add custom scripts to Mura forms loaded asynchronously
/*
Mura forms are loaded asynchronously. So, if you wish to run some scripts, you need
to use a special method to `reopen` the form, and add your scripts using
`Mura.DisplayObject.Form.reopen({})`
The most commonly needed examples are described below.
*/
@mattlevine
mattlevine / cfapplication.cfm
Created April 27, 2018 19:06 — forked from stevewithington/cfapplication.cfm
Mura: Example external session cache
<cfscript>
this.cache.connections["sessions"] = {
class: 'org.lucee.extension.io.cache.memcache.MemCacheRaw'
, bundleName: 'memcached.extension'
, bundleVersion: '3.0.2.29'
, storage: true
, custom: {
"socket_timeout":"30",
"initial_connections":"1",
"alive_check":"true",
@mattlevine
mattlevine / mura-admin-scripts.cfm
Created April 27, 2018 19:07 — forked from stevewithington/mura-admin-scripts.cfm
Mura CMS: How to add custom scripts (JavaScript, etc.) to the administrative area
<cfscript>
// this example shows how to add custom scripts in the Admin area ...
// you could also use jQuery or whatever other method as well.
// Add this method to a Mura CMS SITE, THEME or PLUGIN eventHandler.cfc
public any function onAdminHTMLFootRender(m) {
var str = '';
savecontent variable='str' {
WriteOutput('
<script>
// Your script goes here.