Skip to content

Instantly share code, notes, and snippets.

View stevewithington's full-sized avatar
⛑️
solving problems

Steve Withington stevewithington

⛑️
solving problems
View GitHub Profile
@stevewithington
stevewithington / mura-custom-form.cfm
Created April 20, 2018 17:51
Mura: How to add a validation method to a custom form that doesn't override Mura's async form submission
<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;
}
@stevewithington
stevewithington / README.md
Created March 22, 2018 21:08 — forked from mattlevine/README.md
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;

@stevewithington
stevewithington / mura-front-end-toolbar-link.cfm
Last active March 28, 2019 10:41
Mura: How to add a link to the front end toolbar
@stevewithington
stevewithington / mura-recaptcha-example.cfm
Last active October 30, 2018 09:46
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>
@stevewithington
stevewithington / tracking-form.cfm
Created February 26, 2018 23:02
Mura: example illustrating how to use a custom form and post the data to a .CFC and then update the display with the results.
<!---
save this file somewhere under your theme (e.g, custom/tracking-form.cfm),
then use [m]$.dspThemeInclude('custom/tracking-form.cfm')[/m] to display it
--->
<form id="trackingform" method="post">
<div class="form-group">
<label for="trackingnumber">Tracking Number</label>
<input type="text" name="trackingnumber" class="form-control" placeholder="Enter tracking number ..." />
</div>
@stevewithington
stevewithington / S3Wrapper.cfc
Created February 9, 2018 19:48 — forked from christierney402/S3Wrapper.cfc
Amazon Web Services (AWS) S3 Wrapper for ColdFusion
/**
* Amazon S3 REST Wrapper
* Version Date: 2015-09-03
*
* Copyright 2015 CF Webtools | cfwebtools.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@stevewithington
stevewithington / mura-form-scripts.js
Last active April 27, 2018 19:05
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.
*/

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)

@stevewithington
stevewithington / cfapplication.cfm
Created January 17, 2018 21:38
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",
@stevewithington
stevewithington / mura-amazon-s3-setup-example.md
Last active May 8, 2018 23:25
Mura: How to Configure Mura CMS to Use Amazon S3 for File Storage

How to Configure Mura CMS to Use Amazon S3 for File Storage

custom mapping in the config/cfapplication.cfm file

this.mappings["/s3assets"] = "s3://{access_key}:{secret_key}@/{your_bucket}/";

IF using Docker, example settings for a docker-compose.yml file with Mura