Skip to content

Instantly share code, notes, and snippets.

@pauldenato
pauldenato / getPageDisplayObjects.cfm
Last active August 29, 2015 14:13
Get all Display Objects
<!--- //Drop this in the theme or site contentrenderer.cfc --->
<cffunction name="getPageDisplayObjects" output="no" returntype="query">
<cfargument name="ContentHistID" required="yes">
<cfargument name="siteID" required="no">
<cfset getDisplayObjects = '' />
<cfquery name="getDisplayObjects" datasource="#application.configBean.getDatasource()#">
select ContentHistID,ObjectID,Object,ContentID,Name,OrderNo,SiteID,ColumnID,Params
from tcontentobjects
@pauldenato
pauldenato / addSearchToCredits.cfm
Last active August 29, 2015 14:16
Add Search Links to Credits in Mura
<!---Place the dsp_content_list into the thems display objects folder--->
<!---Credits must be comma delimitted or the entire credit will be created as a search--->
<!---Replace the inside the <cfcase value "Credits">--->
<cfif len(arguments.item.getValue('credits'))>
<!---Create New List--->
<cfset creditListHref = ''>
<!---Loop Credits and create a linked vaule for Comma Delimited Credits--->
<cfloop list="#HTMLEditFormat(arguments.item.getValue('credits'))#" delimiters="," index="i">
<!---Append to List to get the New hyper linked values--->
@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');
@pauldenato
pauldenato / fuzzyMatch.cfc
Last active August 29, 2015 14:21
User subType Creation Fuzzy Match - Using an Extended Attribute to match and prevent user creation
<!---styles for edit links (these are not necessary)
I've placed min in the onAdminHTMLFootRender()
function in the theme eventhandler.cfc--->
<!---<style>
.alert-error span.potentialMatches {
display:inline-block;
color:#333;
}
.alert-error span.potentialMatches a {
@pauldenato
pauldenato / fileAttachmentLoop.cfc
Last active January 5, 2016 14:37
Loop the Files in a mura form
<!---Add to Site or Theme eventhandler.cfc--->
<cffunction name="onAfterFormSubmitSave">
<cfargument name="$">
<cfset var msg = "" />
<!---Get Most Recent Form ID--->
<cfset receipt = $.event('formDataBean').getFormResult() />
<!---Load Form Data--->
<cfset record = receipt />
@pauldenato
pauldenato / dsp_getGroupsUsers.cfm
Last active January 7, 2016 17:34
Get Specific Groups Users
<cfoutput>
<cfscript>
$ = application.serviceFactory.getBean('$').init(session.siteid);
group=$.getBean( 'user' ).loadBy( groupname = '{your group name}', siteid='#session.siteID#' );
groupID = group.getValue('userid');
//Create a USER Feed Bean
userFeed=$.getBean('userFeed');
@pauldenato
pauldenato / dsp_importContentCsv.cfm
Last active November 16, 2020 21:52
Load Mura Media Player Content via CSV
<!---
Modified from Steve Withington's Import users via CSV:
https://gist.github.com/stevewithington/5051646
--->
<cfscript>
param name='form.csvUrl' default='';
param name='form.isSubmitted' default='false';
param name='form.isTest' default='true';
param name='form.siteid' default='default';
@pauldenato
pauldenato / liveSearch.html
Last active February 11, 2016 15:19
JQuery Live Search - With Bootstrap Form
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Jquery Live Search</title>
<!--JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Bootstrap CSS -->
@pauldenato
pauldenato / dspGetCustomJS.cfc
Last active March 30, 2016 16:01
Remove/Edit FE toolbar in Mura
<!---
Custom JS for Front End Tool Bar. Additional checks are done in the edit files
Add this to Theme Contentrender
--->
<!--- Custom JS for Front End Tool Bar. Additional checks are done in the edit files --->
<cffunction name="dspGetMyCustomJS" returntype="any">
<cfsavecontent variable="returnMyCustomJS">
<cfif $.content('Title') EQ "News" and $.currentUser().getValue('S2') NEQ 1>
<cfset $.addToHTMLFootQueue("#$.siteConfig('themeAssetPath')#/display_objects/htmlfoot/top_toolbar_edits.cfm") />
<cfelse>