This file contains 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
// this code goes in the file located under /{SiteID}/includes/themes/{ThemeName}/js/editor/config.js.cfm | |
config.toolbar_Default[9] = {name: 'group9', items:['Image','Flash','Media','gmap','-','Table','HorizontalRule','SpecialChar','PageBreak','-','Selectlink','SelectComponent','Templates'<cfif application.configBean.getEnableMuraTag()>,'muratag'</cfif>]}; |
This file contains 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 this in your Theme or Site contentRenderer.cfc | |
public any function dspComponent(string componentid, siteid=variables.$.siteConfig('siteid')) { | |
var bean = IsValid('uuid', arguments.componentid | |
? variables.$.getBean('content').loadBy(contentid=arguments.componentid, siteid=arguments.siteid) | |
: variables.$.getBean('content').loadBy(title=arguments.componentid, type='Component', siteid=arguments.siteid); | |
return !bean.getIsNew() | |
? variables.$.dspObject(object='component', objectid=bean.getContentID(), siteid=arguments.siteid) | |
: ''; |
This file contains 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
<theme> | |
<!-- Name of the theme --> | |
<name></name> | |
<!-- Version of the theme --> | |
<version></version> | |
<!-- Name of the creator/organization that developed the theme --> | |
<provider></provider> |
This file contains 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
/* base styling for Mura's jQuery Cycle 2 Slideshow Pagination */ | |
ol.mura-pager { | |
margin: 0; | |
padding: 0; | |
position: relative; | |
z-index: 2; | |
} | |
ol.mura-pager li { | |
display: inline; |
This file contains 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 this function in your Site, Theme, or Plugin's eventHandler.cfc | |
public any function onBeforeContentSave($) { | |
// reference to the newBean | |
var newBean = arguments.$.event('newBean'); | |
// reference to the original contentBean (in case you need it for anything) | |
var oldBean = arguments.$.event('contentBean'); | |
// Check to see if the contentBean has a parent, and if so | |
// see if it's the 'News', check the releaseDate and populate if necessary |
This file contains 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
<?PHP | |
/* | |
* PHP upload for Gyazo - v1.2.1 - 3/13/2011 | |
* http://benalman.com/news/2009/10/gyazo-on-your-own-server/ | |
* | |
* Copyright (c) 2011 "Cowboy" Ben Alman | |
* Licensed under the MIT license | |
* http://benalman.com/about/license/ | |
*/ |
This file contains 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 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; |
This file contains 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> | |
/** | |
* @param qry The query containing the desired data (required) | |
* @param row The desired row number (optional) | |
* @return Returns a query containing the desired row data | |
*/ | |
public query function getQueryRow(required query qry, numeric row) { | |
var requestedRow = StructKeyExists(arguments, 'row') ? arguments.row : arguments.qry.currentrow; | |
var rs = QueryNew(arguments.qry.columnList); | |
QueryAddRow(rs); |
This file contains 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 getWeekOfMonth(date d='#Now()#', numeric minDaysInFirstWeek=1) { | |
var cal = CreateObject('java', 'java.util.GregorianCalendar').init( | |
JavaCast('int', Year(arguments.d)) | |
, JavaCast('int', Month(arguments.d)-1) | |
, JavaCast('int', Day(arguments.d)) | |
, JavaCast('int', Hour(arguments.d)) | |
, JavaCast('int', Minute(arguments.d)) | |
, JavaCast('int', Second(arguments.d)) | |
); |
This file contains 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 isoDateTimeFormat(date timestamp='#Now()#') { | |
var dt = DateConvert('local2utc', arguments.timestamp); | |
return DateFormat(dt, 'yyyy-mm-dd') & 'T' & TimeFormat(dt, 'HH:mm:ss.000') & 'Z'; | |
} | |
</cfscript> |
OlderNewer