Archive for the ‘Farcry’ Category

Farcry Custom Config

Tuesday, June 17th, 2008

How I’ve gone as far as I have without looking into this sooner is beyond me. Creating Custom Types is basically how I spend 80% of my time and I had hit a wall until now. Custom Types deserve custom config options so their behavior can be configured by the users. Here’s how…

I have a very simply type which is a way to track registrations. The fields are unimportant, it’s simply a way to track what’s entered on registration forms. The client came back and wanted to be able to send the completed forms to someone via email but that person might change. So, rather than me having to change the code manually any time the email had to change, I set up a custom config for this type.

  1. Create a .cfm file in /farcry/ /system/dmConfig/ with the name you want to show up (i.e. myCustomConfig.cfm will show up as myCustomConfig in the config files list)
  2. Inside the file create a structure containing the config options with defaults:
  3. <cfscript>
    	stConfig = StructNew();
    	stConfig.EmailFrom = "info@bryanlgh.org";
    	stConfig.EmailTo = "55PLUS@bryanlgh.org";
    	stConfig.EmailSubject = "55PLUS Application";
    </cfscript>
  4. Log into farcry and navigate to Admin -> Custom Config
  5. Deploy your config
  6. navigate to Admin -> Config Files
  7. Update as necessary

Doing this will essentially create a new key in the structure “application.config” with the same name as the filename you created and placed in dmConfig. Farcry automatically handles updating the custom config files.

There is additional information at the Farcry Wiki

dmFlash Technique

Wednesday, March 19th, 2008

I’ve had some requests that I blog a dmFlash technique that I use in both version 3 and verion 4 of Farcry. This sounds much more glamourous than it actually is. I really just use a container with a handpicked rule but here are the details you will need to use this for yourself:

(more…)

Custom contentObjectGet Widget

Monday, March 17th, 2008

Something about Farcry has bothered me for a while. It is difficult to link to content programatically, especially if you have a navigation node with multiple content items under it. For example, I have an application that I was writing which contained a calendar and a registration piece. Each was a separate dmInclude under the same dmNavigation node. So, how do I create a “Register Now” button from the calendar to the registration piece programmatically? Sure, I could hard-code the objectID but that just wasn’t cutting it for this. Sure, it would work, but would be easily broken. If the registration piece was ever deleted and re-created, there would be a new UUID for it and the user would not be able to recover the functionality without editing code or the database record. So, I came up with a better solution…

(more…)

Farcry Typeadmin pagination trick

Tuesday, February 5th, 2008

I was searching through typeadmin for something unrelated to this post and found something interesting that I thought I’d share.

It often annoys me that there are only 15 items displayed per page. Show me a site that’s been live for more than a month and I’ll show you an image library with WAY more than 15 items. Usually there are more than 15 pages.

Typeadmin takes a couple of attributes that I was not aware of until today (numitems and numPageDisplay). Here are their defaults:

(more…)

Delete Core Webtop Links

Tuesday, February 5th, 2008

I ran into a situation where I wanted to re-order an entire spot of the webtop. So, how do you do that. I know how to extend the webtop using customadmin.xml, can you get rid of things the same way?

The answer is yes, using the “mergetype” attribute. Here’s how…

(more…)

Farcry Containers - Not Just For News

Friday, 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!

(more…)

Learning Farcry - Ongoing Support

Friday, 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

Wednesday, 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)…

(more…)

Farcry View Permissions Outside the Tree

Monday, 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:

(more…)

Farcry Example: BryanLGH College

Friday, 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.