This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- First, you could copy the file located under /{SiteID}/includes/display_objects/dsp_search_results.cfm | |
and then paste it under either /{SiteID}/includes/display_objects/custom/dsp_search_results.cfm | |
OR under /{SiteID}/includes/themes/{ThemeName}/display_objects/dsp_search_results.cfm | |
and then change the line of code that sets the variables.rsNewSearch to this ---> | |
<cfset variables.rsNewSearch = variables.$.getContentRenderer().getCustomSearch()> | |
<!--- Then, place this in your Site's contentRenderer.cfc ---> | |
<cffunction name="getCustomSearch"> | |
<cfscript> | |
var local = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
formName = 'Information Request'; | |
rsData = QueryNew(''); | |
dcm = $.getBean('dataCollectionManager'); | |
</cfscript> | |
<cfoutput> | |
<cfif !Len($.event('responseid'))> | |
<!--- All Form Submission Results ---> | |
<cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// drop these methods into either the Site or Theme's contentRenderer.cfc and use as necessary | |
public any function summarize(string str='', numeric count='26') { | |
var local = {}; | |
local.str = arguments.str; | |
local.count = Val(arguments.count); | |
if ( Len(Trim(local.str)) ) { | |
local.str = REReplace($.stripHTML(stripTagContent(local.str)), '[\s|\r\n?|\n]+', ' ', 'ALL'); | |
javaArray = CreateObject('java', 'java.util.Arrays'); | |
wordArray = javaArray.copyOf(local.str.Split(' '), local.count); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#$.renderEditableAttribute( | |
attribute='attributeName' | |
,type='text|HTMLEditor' | |
,required=true|false | |
,validation='blank or a JavaScript regex' | |
,message='Message to display if it does not pass validation' | |
,label='Form Field Label' | |
,value=$.content('attributeName') | |
,enableMuraTag=true|false | |
)# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
public any function onBeforeUserCreate($, event) { | |
var user = arguments.event.getValue('userbean'); | |
// do some processing of the user 'bean' | |
// to create an error message, just add any key to the end of the User's getErrors() struct: | |
user.getErrors().createFailMessage1 = 'UserCreate fail message goes here. Sorry #user.getFName()#.'; | |
} | |
public any function onBeforeUserUpdate($, event) { | |
var user = arguments.event.getValue('userbean'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
siteid = IsDefined('session') && StructKeyExists(session, 'siteid') ? session.siteid : 'default'; | |
$ = application.serviceFactory.getBean('$').init(siteid); | |
</cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function daysInMonth(iMonth, iYear) { | |
return 32 - new Date(iYear, iMonth, 32).getDate(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
/** | |
* @parentID Category ParentID | |
*/ | |
public any function dspNestedCategories( | |
string siteid='#variables.$.event('siteid')#' | |
, string parentID='' | |
, string keywords='' | |
, boolean activeOnly=false | |
, boolean InterestsOnly=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// simple examples | |
fileURL = $.getURLForFile('yourFileID'); | |
imageURL = $.getURLForImage('yourFileID'); | |
</cfscript> | |
<!--- File Example ---> | |
<cfif Len($.getURLForFile($.content('myCustomAttribute')))> | |
<a href="#$.getURLForFile($.content('myCustomAttribute'))#">Download File</a> | |
<cfelse> |