Skip to content

Instantly share code, notes, and snippets.

View modius's full-sized avatar
🇦🇺
Busy disrupting.

Geoff Bowers modius

🇦🇺
Busy disrupting.
View GitHub Profile
@modius
modius / feedRSS.cfm.xml
Created October 18, 2009 05:07
Sample RSS Feed type webskin
<cfsetting enablecfoutputonly="true" />
<!--- @@Copyright: Copyright (c) 2008 Daemon Pty Limited. All rights reserved. --->
<!--- @@displayname: RSS Feed--->
<!--- @@description: Type webskin for RSS feed for the latest blog posts in the Goog. --->
<!--- @@author: Geoffrey Bowers on 2008-12-15 --->
<!--- @@cacheStatus: 1 --->
<!--- @@cacheTimeout: 15 --->
<cfquery datasource="#application.dsn#" name="qPosts">
SELECT TOP 30 objectid, datetimepublished, description, title
@modius
modius / gist:212620
Created October 18, 2009 10:04
Flush ColdFusion trusted cache from Farcry Webtop
<!--- (project or plugin)\packages\forms\UpdateApp.cfc --->
<cfcomponent displayname="Update App"
hint="Provides a granular way to update parts of the application state"
extends="farcry.core.packages.forms.UpdateApp"
output="false">
<cfproperty ftSeq="101"
ftFieldset="ColdFusion"
name="cfCache"
type="boolean"
<!--- @@Copyright: Daemon Pty Limited 2002-2008, http://www.daemon.com.au --->
<!--- @@License:
This file is part of FarCry.
FarCry is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FarCry is distributed in the hope that it will be useful,
<skin:pagination qrecordset="#qRecentPosts#" recordsPerPage="#stObj.numberOfPosts#">
<skin:view typename="farBlogPost" objectid="#stobject.objectid#" webskin="displayTeaserStandard" />
</skin:pagination>
@modius
modius / linkwddx.cfc
Last active September 4, 2015 01:05
Link Array Formtool for FarCry CMS.
<cfcomponent displayname="Link Array" hint="A WDDX encoded array of links and their labels" extends="farcry.core.packages.formtools.field" output="false">
<!--- Custom property handlers --->
<cffunction name="edit" access="public" output="false" returntype="string" hint="his will return a string of formatted HTML text to enable the user to edit the data">
<cfargument name="typename" required="true" type="string" hint="The name of the type that this field is part of.">
<cfargument name="stObject" required="true" type="struct" hint="The object of the record that this field is part of.">
<cfargument name="stMetadata" required="true" type="struct" hint="This is the metadata that is either setup as part of the type.cfc or overridden when calling ft:object by using the stMetadata argument.">
<cfargument name="fieldname" required="true" type="string" hint="This is the name that will be used for the form field. It includes the prefix that will be used by ft:processform.">
<cfset var html = "" />
<ft:processForm action="Blarg">
<cfoutput><h1>Blarg #now()#</h1></cfoutput>
</ft:processForm>
<cfimport taglib="/farcry/core/tags/formtools" prefix="ft" />
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />
<ft:form name="myForm">
<skin:buildLink href="javascript: btnSubmit('myForm','Blarg');">
<cfoutput>
<span style="color:red;">Bob's your uncle? How odd he's mine too!</span>
</cfoutput>
</skin:buildLink>
</ft:form>
<ft:form name="myForm">
<ft:button value="Blarg" />
</ft:form>
<cfsetting enablecfoutputonly="true" />
<!--- import tag libraries --->
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />
<!--- register an alternative jquery-ui theme --->
<skin:registercss id="jquery-ui" basehref="/css/redmond" lfiles="jquery-ui.css" />
<cfsetting enablecfoutputonly="false" />