Farcry Containers - Not Just For News

February 1st, 2008

I’m sure many people, like me, have taken the short-sighted approach when it comes to pages and containers. Let me just say that the Handpicked Rule is definitely the almighty divine rule as far as I’m concerned.

I have had customers who want a contact form. Simple enough, right? Well, what if they want to add text at the top of the form and want control over it. A CMS should be able to handle that right? I actually went to the extreme of extending the dmHTML type and creating a custom webskin to allow the user to drop in an included object below their dmHTML content. That was a good 4 hours wasted!

Read the rest of this entry »

Learning Farcry - Ongoing Support

February 1st, 2008

I am in charge of training nearly all of our clients on Farcry once a site is ready for them to begin adding/editing content. At first this can be a very large obstacle for many people because they are simply not used to thinking about certain things. Before Farcry they simply called their web/IT staff and requested a change. The next thing they new, the change was there…like magic.

One of my biggest obstacles is getting people to THINK like a developer. No, they don’t need to understand coding practices but they DO need to think about layouts, templates, libraries, trees, etc. They need to begin to grasp the site as a whole in order to manage it and the relationships that exist within it.

Even months after a site that I’ve developed goes live, I get questions like “How do I change the order of my nav?” or “How do I change the images on a page?” I am more than happy to help anyone whenever they need it. However, I am a STRONG believer in the idea that struggles result in learning. If you are forced to struggle with something, you are more likely to retain the information so you don’t have to struggle with it again.

So, while I am not going to stop answering questions and helping people when necessary, I AM going to strongly recommend that end users of Farcry join a mailing list that was created specifically for them. It is the Farcry-User group on Google and I believe it is severely under-utilized and has a very high potential for not only promoting Farcry but developing skills of those who use it on a day-to-day basis. I have subscribed to the group to be able to answer any questions that people have. I strongly recommend that anyone using Farcry join the group. I also recommend that anyone developing in Farcry push their users in the same direction.

Here is a link: http://groups.google.com/group/farcry-user

Farcry Custom Permission Sets

October 24th, 2007

I don’t really recall at this point how I got started messing around with this but I think it’s pretty neat.

I was wondering how to create custom permissions for custom types. For example, when I do a custom type, I have traditionally applied the news permissions to it so anyone who has permissions to add/edit news items would be able to add/edit my custom type. But, what if you want specific permissions for your type? Here’s how you do it (in Farcry 3 that is)…

Read the rest of this entry »

Farcry View Permissions Outside the Tree

October 22nd, 2007

I have talked before about branch specific permissions on the site tree which go a long way to creating effective “members only” sections to your website. Recently, however, I was tasked with a situation that was slightly different.

CF Webtools works with a lot of financial sites using a product called Finwin. This is one of the first times we have put a financial site into Farcry so the unique challenge was to create a displayTeaser.cfm page for dmNews but have the content of the news stories protected. This sounds easy enough but, here is where I ran into an issue…

Farcry automatically associates an objectid with a “type” and automatically looks for a displayPage.cfm file associated with that type. The branch specific permissions are handled by the display.cfm file inside the core files. So, here is what I did to accomplish this task:

Read the rest of this entry »

BlogCFC Last ‘n’ Entries

September 19th, 2007

A question came my way today about Ray Camden’s BlogCFC and I hope I’m not stepping on Ray’s toes by answering it. Someone wanted to know how to configure the default entries that show up. Some of his were dropping off after a certain time frame and he wanted to increase the default time frame. So, here’s how it’s done…

Blog.cfc in org/Camden/blog in the blog’s install folder has a function getEntries() which takes a ‘params’ structure. The ‘params’ structure is passed to the function in index.cfm of your blog instance. Here’s that code:

<cftry>
      <cfset articles = application.blog.getEntries(params)>
      <!--- if using alias, switch mode to entry --->
      <cfif url.mode is "alias">
            <cfset url.mode = "entry">
            <cfset url.entry = articles.id>
      </cfif>
      <cfcatch>
            <cfset articles = queryNew("id")>
      </cfcatch>
</cftry>

Read the rest of this entry »

IE6 PNG Transparency Fix

September 17th, 2007

I had to use a .png file with alpha transparency on a site which works fine in both IE7 and Firefox 2. However, IE6 does not like it at all. There is a fix out there called pngfix.js which works great if you have an img tag but this was a background image set in the CSS. Here’s what I did:

#wrap {
	margin:0px auto;
	background-image:url('/IMG/wrap_bg.png');
	background-repeat:repeat-y;
}
* html #wrap {
	background-image:none;
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/IMG/wrap_bg.png', sizingMethod='scale');
}

This worked like a charm!

Farcry Example: BryanLGH College

September 7th, 2007

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.

CFMAILPARAM Sender

September 7th, 2007

I’m writing this to hopefully allow other people to avoid the issues I’ve had with one of the sites I support. This particular client’s business revolves around sending emails so it is obviously important that the end user receive those emails. Spam filters are more and more getting in the way. One thing you have to really think about when sending the email is “What will this email look like to the receiving server?” If you are on domain.com and you send an email using cfmail and the from address is a domain.com address, there is no problem. It’d be like sending that same message through Outlook using a domain.com address and domain.com relay (SMTP) server.

What if you have a form allowing a random user to send an email?This is where SPF filtering can block your message. They put in their from email address and to email address and whatever other data and that information gets stuck into the cfmail tag. Now, you might have an email address FROM someone@from.com TO someone@to.com. The email was sent THROUGH the domain.com server. Now if to.com’s server acknowledges SPF filtering, it will look at the dns record for from.com and look specifically at the TXT record. A smart DNS entry will list IP addresses that are able to send email. If the IP address of domain.com’s mail server does not appear in the DNS record of to.com, then the message will be blocked.

Here’s an example of the TXT record from domain.com:

domain.com       86400   IN         TXT       "v=spf1 ip4:xx.xx.xx.xx ip4:yy.yy.yy.yy ip4:zz.zz.zz.zz -all"

The first 3 ip addresses would be valid mail servers. The –all says to reject anything that is not one of those 3 ip addresses.

The way around this is to use a cfmailparam tag with a valid email address for domain.com (make an email address if necessary like info@domain.com). Here’s what the resulting code looks like:

<cfmail to="#to#"  from="#from#" subject="#subject#" type="html">
<cfmailparam name="sender" value="valid_email@domain.com">
.
.
.
</cfmail>

I hope this helps some people out

Farcry Images in Containers

September 7th, 2007

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!

Farcry dmCSS How-To

August 6th, 2007

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.

Read the rest of this entry »