Skip to content

Instantly share code, notes, and snippets.

View PhillipRasmussen's full-sized avatar

Phillip Rasmussen PhillipRasmussen

View GitHub Profile
@PhillipRasmussen
PhillipRasmussen / postprocess.cfc
Last active August 29, 2015 14:04
Post process for image galleries and sliders
<cfcomponent hint="Post processing functionality" output="false" extends="farcry.core.packages.lib.postprocess">
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />
<cffunction name="imageGallery" access="public" output="false" returntype="string" postprocesser="true" hint="Parses out image Galleries front image and replaces them the full gallery">
<cfargument name="input" type="string" required="true" />
<!--- <img class="galleryInsert" src="/images/dmImage/ThumbnailImage/41494111.jpg" border="0" rel="11286FC0-017D-11E4-9B4F080027410349" /> --->
<!--- <img class="gallerySlider" src="/images/dmImage/ThumbnailImage/41494111.jpg" border="0" rel="11286FC0-017D-11E4-9B4F080027410349" /> --->
<cfset var match1 = '<img(?=[^>]*class="galleryInsert")\b[^>]*?\b(rel)\s*=\s*(?:"((?:[^"])*)")[^>]*>' />
@PhillipRasmussen
PhillipRasmussen / insertHTML_ImageSlider.cfm
Created July 15, 2014 23:21
Gallery Image Slider insert for tinyMCE
<cfsetting enablecfoutputonly="true">
<!--- @@displayname: Image Slider --->
<!--- @@author: Phillip Rasmussen --->
<cfif len(stobj.imgcoversourceid)>
<cfset coverImageID = stobj.imgcoversourceid>
<cfelse>
<cfset coverImageID = stobj.aImage[1]>
</cfif>
@PhillipRasmussen
PhillipRasmussen / insertHTML_ImageGallery.cfm
Created July 15, 2014 23:22
Gallery Image insert for tinyMCE
<cfsetting enablecfoutputonly="true">
<!--- @@displayname: Image Gallery --->
<!--- @@author: Phillip Rasmussen --->
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin">
<cfif len(stobj.imgcoversourceid)>
<cfset coverImageID = stobj.imgcoversourceid>
<cfelse>
<cfset coverImageID = stobj.aImage[1]>
</cfif>
@PhillipRasmussen
PhillipRasmussen / displayPostProcessGallery.cfm
Created July 15, 2014 23:23
Display the Gallery postprocess
<cfsetting enablecfoutputonly="true" />
<!--- @@displayname: Image Gallery for Post Process --->
<cfif arrayLen(stobj.aImage)>
<cfoutput>
<div class="row row-wrap" id="popup-gallery">
</cfoutput>
<cfloop from="1" to="#arrayLen(stobj.aImage)#" index="i">
<cfset stImage = application.fapi.getContentObject(typename="dmImage", objectid=stObj.aImage[i])>
<cfoutput>
@PhillipRasmussen
PhillipRasmussen / displayPostProcessSlider.cfm
Created July 15, 2014 23:26
Display the Gallery as a Slider postprocess
<cfsetting enablecfoutputonly="true" />
<!--- @@displayname: Post Process Slider --->
<!-- START BOOTSTRAP CAROUSEL -->
<cfif arrayLen(stobj.aImage)>
<cfoutput>
<div id="portfolio-slider-1" class="carousel slide carousel-controls-right">
<div class="carousel-inner popup-gallery" style="max-height:270px;">
</cfoutput>