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> | |
/** | |
* @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 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 array function queryToArray(query data) { | |
var local = {}; | |
local.Columns = ListToArray(arguments.Data.ColumnList); | |
local.QueryArray = ArrayNew(1); | |
for (local.RowIndex=1; local.RowIndex <= arguments.Data.RecordCount; local.RowIndex++) { | |
local.Row = {}; | |
for (local.ColumnIndex=1; local.ColumnIndex <= ArrayLen(local.Columns); local.ColumnIndex++) { | |
local.ColumnName = local.Columns[local.ColumnIndex]; | |
local.Row[local.ColumnName] = arguments.Data[local.ColumnName][local.RowIndex]; |
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 getEventsByCalendarID( | |
calendarid='#variables.$.content('contentid')#' | |
, start='#CreateDate(Year(Now()), Month(Now()), 1)#' | |
, end='#CreateDate(Year(arguments.start), Month(arguments.start), DaysInMonth(arguments.start))#' | |
, returnFormat='query' | |
, siteid='#variables.$.event('siteid')#' | |
) { | |
var tp = variables.$.initTracePoint('getEventsByCalendarID()'); | |
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> | |
// Drop this in your THEME or SITE contentRenderer.cfc | |
public any function getEventsByDate( | |
calendarContentID='#variables.$.content('contentid')#' | |
, theDate = '#CreateDate(Year(Now()), Month(Now()), Day(Now()))#' | |
, returnFormat = 'query' | |
) { | |
var local = {}; | |
local.contentBean = variables.$.getBean('content').loadBy(contentid=arguments.calendarContentID); |
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 this in your THEME or SITE contentRenderer.cfc | |
public any function getThisMonthEventsByExtendedAttribute( | |
calendarContentID='#variables.$.content('contentid')#' | |
, extendedAttributeName='' | |
, extendedAttributeValue='' | |
, returnFormat='query' | |
) { | |
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> | |
// 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 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
<?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 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 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 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 standardPostLogoutHandler($, event) { | |
// you could redirect the user to any url you want here | |
location(url=arguments.$.createHREF(filename='about'), addtoken=false); | |
} | |
</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
/* 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; |