Capitalize Names Updated

Just a quick note about my Capitalizing Peoples Names post yesterday. I forgot to change the extension of the enclosure to something other than .cfm.

I updated the enclosure and also further optimized my function. You should now be able to download the function.

Happy Coding...

Capitalizing Peoples Names

While doing a code review at work I stumbled accross a horrible piece of code that was written in a hurry, The developer did the best he could at the time with the time that he had available to him to complete the task. He never really had time to think it though so just continued to throw worse code after bad until the problem was eventually solved.

The Problem

There has to be a better way to do what he was doing and so when I got home from work today I decided to actually look at the problem in the context of the system we have.

[More]

Spry Dynamic Tabs 2

A reader recently asked about my Spry Panel with Dynamic Content post:

How do I extend it to automatically generate each TAB from an external file as well.

The tabs are generated from [an] external XML data (the XML contains the link to be run when the Tab is clicked), and then each tab generates it's content when it is clicked.

In my post the tabs were hard coded, to dynamically generate the tabs using an xml file and then dynamically load the content specified in the xml file it's just a little bit more work (but less typing!).

[More]

What Function Called My Function

I read a post on the Adobe forums by Spike H asking:

I have written a utility component (test1 below) and want to keep track of what external functions call the functions within my component. Other programmers create a component (e.g. test2 below) that extends my utility component and then their functions call my functions. I want to record metric data to determine how much use my functions are getting and from where. I've used the getMetaData() function inside my functions, but that only gives me the name of the component that extends my component (in this case test2), not the specific function that called my function (in this case functionAtest2).

[More]

Inline Rich Text Editor

I've been looking for a example of using a HTMl rich text editor in a customer site to provide the ability for wysiwyg style editing of content items.

Basically the page would be displayed as a user would see it, they would then click (or double click) on the content item in question which would then be replaced with either a text box or rich text editor where appropriate. Much like flickr does with the image title and description but also with the rich text capabilities. A lot of commercial content management systems provide this type of functionality already but I haven't been able to find an example that I could easily rip off duplicate.

[More]

CFGRID Cell Renderer Revisited

As I mentioned in my post on Monday via a post on Ray Camden's site creating customized cell renderers are possible, though not officially supported in CFGRID.

What that actually means is that CF doesn't provide a simple way of specifying a cell render for a grid column as shown in the hypothetical code snipet below:

[More]

Coldfusion 8 SFTP with CFFTP

Another great addition in Coldfusion 8 is support for SFTP. Prior to CF8 you were pretty much restricted to regular FTP.

We have had occasions where we needed to perform SFTP access to an offsite server and the security requirement for the server was SFTP only (completely acceptable). We wanted to set up a scheduled event to go and collect some xml files from the customers server for further processing all via SFTP.

[More]

CFIMAGE Part 4: Remote Images

The Coldfusion 8 CFIMAGE tag allows you to work with remote images simply by providing a URL to the desired Image, this makes grabbing images from places such a flickr (which I use as an online backup of most of my images) easily.

<cfimage source="http://farm1.static.flickr.com/97/232021390_ad47422845_o.jpg" name="MyImage"/>
<cfimage source="#MyImage#" action="writeToBrowser"/>

This works just fine, even for really large images of 1368x2048. You can also manipulate your remote image in various ways there is one thing, however, you should be aware of when working with remote images.

Small Gotcha

I managed create a runtime error when trying to read the EXIF or IPTC meta data from the remote image.

Exception occured in JPG processing. segment size would extend beyond file stream length

This only occurred on big images, I tried with a fewer smaller images and CF had not problems.

Happy Coding...

CFIMAGE Part 2

In my previous post CFIMAGE Part 1 we created a simple image and added some text to the image and wrote it out directly to the browser.

In this post we will look at the EXIF data of an image. Typically the EXIF or Exchangeable Image File Format gets written to an image mostly during the creation process of modern digital cameras and only with JPEG images. Some additional information may get written to the image during post processing in Photoshop or other imaging software.

[More]

CFIMAGE Part 1

I was looking through the Coldfusion docs today, specifically at the cfimage tags and all the goodness that they bring to CF. I'm continually amazed at the level of integration that CF8 has with other Adobe products, specifically in the area of PDF's and Images.

[More]

More Entries