Jake Churchill

… on Flex, ColdFusion, FarCry, and much more …

  • Home
  • About
  • Projects

7

Sep

Farcry Example: BryanLGH College

Posted by Jake Churchill  Published in Farcry

Here’s the latest Farcry site that I did which just went live yesterday. We are still cleaning a couple things up and the client is building a couple of flash widgets to put on here. This takes advantage of Farcry Snippets and has a great calendar built in. This is a re-styled version of a calendar that I’ve been using. Here’s the link:

http://www.bryanlghcollege.org

EDIT: I should also mention that this site is Farcry 3.0.2 running on a Linux/Oracle backend.

no comment

7

Sep

Farcry Images in Containers

Posted by Jake Churchill  Published in Farcry

For whatever reason, the default install of Farcry (I’m using FC 3.0.2) does not allow you to add images to containers. This is extremely easy to fix.

The Handpicked Rule looks at all types installed in COAPI Management and checks for the flag bScheduled=”1″. dmImage does not have that by default. So, to fix this, extend dmImage. dmImage.cfc goes in /farcry/project/packages/types/. The contents of dmImage.cfc are:

<cfcomponent extends="farcry.farcry_core.packages.types.dmImage"
          displayName="Images"
          bSchedule="1"
          bUseInTree="0">

</cfcomponent>

It’s as easy as that!

no comment

6

Aug

Farcry dmCSS How-To

Posted by Jake Churchill  Published in CSS, Farcry

I’ve been developing using Farcry for nearly a year now and the dmCSS type has always puzzled me. I knew it had to be a way to have node-specific CSS but how do you use it? I finally took the time to learn how and here’s what I found.


continue reading "Farcry dmCSS How-To"

no comment

18

Jul

Farcry Snippets

Posted by Jake Churchill  Published in Farcry

What are snippets you ask? Just a little something I came up with to make my life and the lives of my clients easier.

DISCLAIMER: I set this up using FC 3.0.2. I do not know how it may function on FC 4.

I have set up a lot of sites that have little random pieces of content here and there. Usually I end up making a custom rule or sometimes a custom type to handle each piece of content. Bigger sites, however will end up with several custom pieces, each of which requires the client to do things just right.

Let’s face it, remembering a password is hard enough for some people, let alone managing multiple containers each with a different content type. My solution? Snippets.

A snippet is a data type (jcSnippet) that is similar to a dmNews object only stripped down. The most important piece is the body and the use of the WYSIWYG editor and the image/file/link inserters. The link inserter is also custom. You can see other posts about it on my blog.

Essentially what will happen is the user will create a snippet (some HTML) that will get dumped into a container. This will allow the users to completely customize container content when necessary using the WYSIWYG editor of your choice.


continue reading "Farcry Snippets"

no comment

18

Jul

Farcry Custom Widgets

Posted by Jake Churchill  Published in Farcry

This is a quick how-to for custom widgets. Widgets can be a really powerful tools if used correctly. I recently found a really good use for them so here is an explanation of how to create them and use them. Enjoy!

Create a folder path inside your project folder that looks like this: /farcry/project_name/tags/widgets. This will hold any custom widgets. I’ve blogged about this before but we are going to create a link inserter widget. Create a file inside the folder you just made called whatever you want (I’m using bodyInsertLink.cfm). Here’s the code:

<cfoutput>
	<cfquery name="getHTMLPages" datasource="#application.dsn#">
		SELECT	label,objectid
		FROM	dmHTML
		WHERE	status = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="approved">
		UNION
		SELECT	label,objectid
		FROM	dmInclude
		WHERE	status = </cfqueryparam><cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="approved">
		ORDER BY label ASC
	</cfqueryparam></cfquery>

	<script type="text/javascript" language="JavaScript">
		function getLinkValueInsert()
		{
			objSelect = document.getElementById("links");
			tempStr = objSelect.options[objSelect.selectedIndex].value;
			arVal = tempStr.split("|");
			oID = arVal[0];
			label = arVal[1];
			//alert(tempStr+"\n"+oID+"\n"+label);
			if(!oID || !label)
				alert("Please select a valid link to insert.");
			else
				insertHTML('<a href="#application.url.conjurer#?objectid='+oID+'">'+label+'</a>');
			return false;
		}
	</script>

	<div class="relateditems-wrap" style="margin-left:30px;">
		<h2>Links</h2>
		<select name="links" id="links" size="3">
			<cfloop from="1" to="#getHTMLPages.recordcount#" step="1" index="i">
				<option value="#getHTMLPages.objectid[i]#|#getHTMLPages.label[i]#">#getHTMLPages.label[i]#</option>
			</cfloop>
		</select>
		<div class="f-submit-wrap">
			<input type="button" name="buttonInsertLinkInBody" value="Insert in body" class="f-submit" onclick="return getLinkValueInsert();" />
		</div>
	</div>
</cfoutput>


continue reading "Farcry Custom Widgets"

no comment

18

Jul

UPDATE: Better Link Inserter for FC 3

Posted by Jake Churchill  Published in Farcry

This is an update to a post I wrote a couple months ago regarding link insertion into the body of content objects: http://jake.cfwebtools.com/2008/02/29/farcry-insert-link-to-other-dmhtml-objects/. I’d like to formally apologize for my ignorance when writing that post. Please ignore it :) .

The problem was that the site tree and the body editor are in two different iFrames causing focus to be lost when clicking on the site tree to try to insert a link. I had a brilliant idea (so I thought) to edit the core files of farcry to fix this. It worked fine, but hey, you had to edit the core files of Farcry. THIS IS NOT A GOOD IDEA! Here’s a better idea…


continue reading "UPDATE: Better Link Inserter for FC 3"

no comment

1

May

Farcry Insert Link to other dmHTML objects

Posted by Jake Churchill  Published in Farcry

I want to preface this by saying you probably should not do this. Having contradicted myself, I’d also like to say that this is really cool!

You may have noticed that when editing an HTML page it is possible to right click on any other page in the site tree and use the “insert” function which will insert a link directly into the editor to that page. Pretty handy right? Well there is an issue with this in that the site tree is in a different iFrame than the editor so the position in the WYSIWYG editor is lost and the link gets inserted at the very top of the page no matter what. (I’ve seen this more so in IE7 than anything else). This is annoying and is not very friendly for a lot of clients because they then have to copy and paste that link somewhere else. If there is a lot of formatting in the page, sometimes this can get altered when copying and pasting so I wanted a better solution.

Warning! This required a change to a couple of core files so if you are up to that click through to read more. If not, there is a pretty “X” in the top right of your window. Click it now :)


continue reading "Farcry Insert Link to other dmHTML objects"

no comment

24

Apr

Farcry Example: NEI

Posted by Jake Churchill  Published in Farcry, Farcry Examples

Here’s another pretty cool example site. This one has a very unique menu which is a combination of javascript and CSS. The navigation class for this was quite complex.

The dmNavigation object was extended to allow node specific styling (which is how we achieved the ability to move the sub-menu around wherever we want. There is also some pretty neat Javascript throughout the site allowing for expandable sections of content.

NEI Global Relocation

no comment

24

Apr

Farcry Execute Function for Custom Rule

Posted by Jake Churchill  Published in Farcry

This is an example of an execute function for a custom rule that is used for a custom type. This sorts the itesm by category. Now, here’s what’s really cool…

<cfset staffCategories = "#application.factory.oTree.getDescendants(application.factory.oCategory.getCategoryIDByName('Staff'))#">

This line gets all sub categories under Staff. This is used for the sorting. If the user wants to control the order of the categories in the sort, he/she need only move the sub category up or down in the list through the Keyword Manager tool in the webtop.

Here’s the full code:

<cffunction access="public" name="execute" output="true">
<cfargument name="objectID" required="Yes" type="uuid" default="">
<cfargument name="dsn" required="false" type="string" default="#application.dsn#">

<cfset var i = 1>
<cfset var stObj = this.getData(arguments.objectid)>
<cfset var qGetStaff = ''>

<cfparam name="request.mode.lValidStatus" default="approved">

<cfset staffCategories = "#application.factory.oTree.getDescendants(application.factory.oCategory.getCategoryIDByName('Staff'))#">
<cfset staffCategoriesList = ValueList(staffCategories.objectid)>

<!--- doesn't need to match all categories --->
<cfquery datasource="#arguments.dsn#" name="qGetStaff">
	SELECT	type.*, cat.categoryID, img.imagefile, img.thumbnail, img.alt
	FROM	refObjects refObj
	JOIN	refCategories refCat ON refObj.objectID = refCat.objectID
	JOIN	dmStaff type ON refObj.objectID = type.objectID
	JOIN	dmImage img ON img.objectID = type.teaserImage
	JOIN	categories cat ON cat.categoryID = refCat.categoryID
	WHERE 	refObj.typename = 'dmStaff'
		AND type.status IN ('#ListChangeDelims(request.mode.lValidStatus,"','",",")#')
</cfquery>
<cfoutput>
	<h1>#stObj.intro#</h1>

	<!--- get staff members by category --->
	<cfloop from="1" to="#ListLen(staffCategoriesList)#" step="1" index="i">
		<cfquery name="QoQ" dbtype="query">
			SELECT	*
			FROM	qGetStaff
			WHERE	categoryID = '#ListGetAt(staffCAtegoriesList, i)#'
			ORDER BY displayOrder
		</cfquery>
		<!--- get category name --->
		<cfset categoryName = application.factory.oCategory.getCategoryNameById(ListGetAt(staffCategoriesList, i))>

		<!--- display link to anchor --->
		<a name="#categoryName#"></a>
		<h1>#categoryName#</h1>
		<cfloop from="1" to="#QoQ.recordcount#" step="1" index="j">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td valign="top"><img src="/images/#QoQ.imageFile[j]#" alt="#QoQ.alt[j]#"></td>
					<td valign="top" style="padding-left:20px;">
						<span style="font-size:120%;font-weight:bold;">#QoQ.name[j]#</span><br>
						Title:  <i>#QoQ.title[j]#</i><br>
						Email:  <a href="mailto:#QoQ.email[j]#">#QoQ.email[j]#</a><br>
						Extension:  #QoQ.extension[j]#<br><br>
						<a href="#application.url.conjurer#?objectid=#QoQ.objectid[j]#">View Bio</a>
					</td>
				</tr>
			</table>
			<p style="border-bottom:1px dashed gray;width:100%;margin-top:0px;"> </p>
		</cfloop>
	</cfloop>
</cfoutput>

</cffunction>
no comment

23

Apr

Farcry Example: Hope Center

Posted by Jake Churchill  Published in Farcry, Farcry Examples

I thought I’d start posting some example farcry sites as a way to demo some thing that can be done. Here’s the first example…

Hope Center

This site is really pretty simple but looks pretty good (IMHO). It makes strong use of containers and flash objects as well as a custom display method for the flash objects which I borrowed from Flex which uses an external .js file to write the flash object to avoid the ActiveX border in IE.

Also, have a look at the Events Calendar. This is a calendar that my boss had on another site that I borrowed and re-tooled to work seamlessly with the dmEvents object in Farcry.

Finally, the Contacts page is an example of a custom type. Each contact contains an image, name, title, email, extension, and bio. There are 3 types of displays for the contacts. On the right sidebar is a simple listing, sorted and organized by categories. This is some pretty ingenious code and I’d be happy to share it if asked nicely. In the content area is the main display of the contacts object, ordered and sorted the same way. These displays are both made possible by custom rules. Clicking on the “View Bio” link will take you to the displayPage for the Contacts type.

no comment

Search

Blog Feed

  • Add blog to any reader
  • Comments Rss
February 2012
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
272829  

 

February 2012
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
272829  

Subscribe to Blog

Your email:

Subscribe   Unsubscribe

Archives

Categories

  • Browsers (3)
  • CFEclipse (2)
  • ColdFusion (7)
  • CSS (9)
  • Farcry (33)
    • Farcry Examples (2)
    • Farcry Users (1)
  • Flash (1)
  • Flex (14)
  • Javascript (5)
  • Life & Fun (3)
  • Microsoft Office (1)
  • Misc (4)
  • Random Posts (1)
  • SQL (2)
  • Uncategorized (2)

Blogroll

  • Axel Jensen
  • Ben Forta
  • Coldfusion Muse
  • Fullasagoog
  • Nicole Rutter
  • Ray Camden
  • Sandy Clark
  • Stillnet Studios

Recent Posts

  • FCKEditor Firefox 3.6 Bug (Year 2010 Bug)
  • ColdFusion using Java for regex replace
  • ColdFusion VirtualMerchant CFC
  • Farcry Navigation Move Permissions
  • Delete Mail via POP Script

Recent Comments

  • James Moberg on FCKEditor Firefox 3.6 Bug (Year 2010 Bug)
  • Jake Churchill on ColdFusion using Java for regex replace
  • Ben Nadel on ColdFusion using Java for regex replace
  • Peter Boughton on ColdFusion using Java for regex replace
  • Peter Boughton on ColdFusion using Java for regex replace

Recent Post

  • FCKEditor Firefox 3.6 Bug (Year 2010 Bug)
  • ColdFusion using Java for regex replace
  • ColdFusion VirtualMerchant CFC
  • Farcry Navigation Move Permissions
  • Delete Mail via POP Script
  • Flex 2 Datagrid not highlighting row (UPDATE)
  • Flex 2 Datagrid not highlighting row
  • Flex Dynamic casting of data
  • Reboot XP PC over Remote Desktop
  • Dynamically instantiate a class

Recent Comments

  • James Moberg in FCKEditor Firefox 3.6 Bug (Year 2010 Bug)
  • Jake Churchill in ColdFusion using Java for regex replace
  • Ben Nadel in ColdFusion using Java for regex replace
  • Peter Boughton in ColdFusion using Java for regex replace
  • Peter Boughton in ColdFusion using Java for regex replace
  • Matthew in ColdFusion using Java for regex replace
  • Matthew in ColdFusion using Java for regex replace
  • Jake Churchill in Flex Channel.Connect.Failed error NetConnection.Ca…
  • Flex Guy in Flex Channel.Connect.Failed error NetConnection.Ca…
  • Dexter in Flex Custom Preloader without SWF
© 2008 Jake Churchill is proudly powered by WordPress
Theme designed by Roam2Rome