cftopper.com

Form Wizard launched

Yesterday I released version 1.1 of Form Wizard for ColdFusion.

It will save your hours and hours of tedious work designing forms for your website, and then doing the javascript validation, database store, email notifications etc.

And the look and feel can be extended to integrate with any website design.


Form Wizard for ColdFusion


It's the shanizzle.
Tags: My Work | Tools | WebDev

Great Review for TeamworkPM

I'm really delighted with a review of our software, Teamwork Project Manager from about.com!

I'm speaking at CF-United Europe!

I'm going to be speaking at CF-United Europe! It's my first real public-speaking effort so please lend your support.

The topic is:
How we made it: Teamwork Project Manager - tips for development of highly-scalable web2.0 apps in ColdFusion.

We developed Teamwork Project Manager over the last 7 months. There aren't many web2.0 CF apps taking on the Ruby crowd these days and I think my speech will be interesting.

Some items would include:

  • Industry Analysis
  • Ajax & ColdFusion
    • Debugging techniques
    • Processing the response
    • Using JSON with CF
  • Handling Multiple Domains with one application
  • Advanced file uploading - hundreds of files in one go
  • Database design
  • Scalability
  • Support
  • Sales & marketing

We have launched!

We have finally launched!!

And what a wild ride it has been getting everything ready.

Check out Teamwork Project Manager at www.teamworkpm.net

The Website - Final Days

About a 5 days ago we had this marketing website almost complete. We stood back and looked at what we had created... and we decided... it sucked. Against the pressure of the looming launch date chiseled in stone on the preview website, we started again. We threw away the old website and said to our designer, Adam, "Hey Buddy, um... we don't like the site. Can you cook us up something prettier?".

Lo and behold, he disappeared off the face of the Earth for 2 days and returned with the new website design. And we saw that it was good. We worked round the clock slicing and dicing, XHTMLizing and CSSing, content-managing, tweaking and testing.

A few hours behind the intended launch time, we made the critial change to the IIS web server and set the new site live, flying open the doors allowing all to sign up for the shiny new kid on the block - Teamwork Project Manager.

Here we are in my office seconds after putting the website live. We are tired, we are hungry, we have sore backs and aching asses... but we're happy. That's me, Topper, on the left and Dan on the right.
We are holding the camera in our out-stretched hands (attempt number 10 to take a photo with both of us in the frame. The bad quality reflects that this was taken on my trusty K750i camera phone.)



We still have a lot to work to do on this website of course but we are proud of what we have created.

Teamwork Project Manager - Final Days

We started making some important changes with just days left to launch.

For example, our testing had revealed that user were getting confused between project view and top-level/dashboard view. They would just blink wildly and we've have to explain that you have to click-into a project. Also in project view they wondered where all the other projects had gone.

We fixed this by redesigning the navigation system into two bands of tabs in stead of just one with and extra "Project View" tab at the top level to make it obvious that the user was now indeed, in project view. It's so much more intuitive this way.

What else - oh yes, Dan whinged on about the need for starring of projects for so long that I finally relented. I didn't plan on getting this done for launch but I'm very glad I did now. Now, when you are members of a whole host of projects and the dashboard is getting a little busy, the user can switch to custom view where he will only see the projects he has starred.

Also when there are loads of active projects such as here at Digital Crew, we now only list the projects that have been active in the last 14 days on the sidebar. Other projects can then be shown by clicking "All projects". It looks so simple but we had a good 10 minute discussion over the best way to present this to the user. We considered tabs for "Recent Projects" and "All Projects"  but in the end, I think the way we have it now is much better.

TeamworkPM is launched at last and Dan is a happy little camper

Après Launch

This morning I woke up and eagerly turned on the computer, anxious to see if we got any sign-ups or feedback. I was delighted to see a very positive email - " I have started playing with the app and am incredibly impressed with the ui and the streamlined approach to project management.". He then asked us to provide a roadmap and listed a few more features he would love to see.

This type of feedback just hours after launch is great motivation for me. I'm going to get busy cooking up the extra feature this guy wants and serve it hot! Stay tuned.

TeamworkPM Launched - Topper has his legs up! A job well done.

PS. I will be adding a roadmap page to the Teamwork site before the end of the day,
PSS. I just added a "Chat Now" link in the footer of this website so feel free to get in touch.

Check out Teamwork Project Manager at www.teamworkpm.net

My Lastest Masterpiece: ProFlashDownload

Cue Drumroll... my latest ColdFusion component is complete!

ProFlashDownload allows developers to make a list of files available for download to a user. These files will download with a progress bar and the developer can have a page called in the background when a file has completed downloading.

ProFlashDownload - Click for real demo

I was specifically asked to develop this component based on my existing work on ProFlashUpload.

Just like ProFlashUpload, ProFlashDownload is highly customizable, easy-to-use and easy-to-program.

Sidenote: You would think that Flash programming is browser-independent, but with this sucker, I had a bunch of issues with Internet Explorer causing all sorts of strange behaviour that I had to tediously program around.

Sidenote 2: It has been suggested that I combine ProFlashDownload and ProFlashUpload to make the mother of all web based file management utilities... and i'm considering it.

I'll be making this tag available for purchase at $50 on www.cftagstore.com in the coming days.

Best CSS Tip Ever

Stop fucking around Morris, just set the overflow to auto on container divs to get them to expand their height to fit all elements. Simple. Store that to memory, never cry over floats messing up your layouts again.

There are other methods, but this is the best one. If I catch you, using <div class="clear"> again you will be beaten... badly; yes I mean you!

Best CSS Tip Ever
Tags: My Work | Tips

Navicat - Top Dog MySQL Manager

Here at Digital Crew, we use MySQL for just about everything only using other database types when clients force us to... yeuck. MySQL Rocks. But you know that.

What you mightn't know is that there is an absolutely awesome program for managing MySQl called Navicat. I have just been saved hours of work of tedious syncronising data between two databases using one of Navicat's many excellent features.

Navicat

This program is simply excellent - it will pay for itself in no time and has my highest endorsement.
Tags: My Work | Tools | WebDev

InfinityCMS needs renaming - Help us!

We have this pretty hot content management system that just keeps getting better and better and soon we want o unleash it to the world via a new top secret site (Ahem).

The problem is, we've been working with the name InfinityCMS for the last few year and we don't really like it. Now, "PaperThin", that's a cool product name for a CMS system. I've been wrecking my head and I can't think of anything.

ZuluCMS.. yeuck. Nope, I'm useless at this naming thing. BetterThanYoursCMS Messing no. DieHardCMS, RockyCMS, OakCMS, PredatorCMS (I'm looking around the office and have this cool predator statue).

Any ideas?
Tags: My Work

ColdFusion-alike List Functions for Javascript

Those ColdFusion list functions are pretty useful so I made a Javascript version of them. Enjoy.
Download
/* ColdFusion List Functions
   These functions manipulate lists just list ColdFusion does.
   (c) Digital Crew
   Happy Christmas. Knock yourself out.
   email: topper@digital-crew.com
   web: www.digital-crew.com   /   www.cftopper.com
*/
function listFind(c,n,d)
{
	if(arguments.length<3)d=",";
	var e = c.split(d);
	for(var i=0;i= 1 && p <= e.length )
	{
		return e[p-1];
	}
	alert("Out of range");
	return "";
}
function listSetAt(c,p,v,d)
{
	if(arguments.length<4) d=",";
	var e = c.split(d);
	if( p >= 1 && p <= e.length )
	{
		e[p-1] = v;//set the value
		//rebuild the string
		for( var i=0,c=""; i < e.length; i++ )
			c = (c!=""?(c+d):"")+e[i];
	}
	else alert("listSetAt: Index " + p + " is Out of range");
	return c;
}
function listInsertAt(c,p,v,d)
{
	if(arguments.length<4) d=",";
	var e = c.split(d);
	if( p >= 1 && p <= e.length+1 )
	{
		e.splice( p-1, 0, v );//insert the value
		//rebuild the string
		for( var i=0,c=""; i < e.length; i++ )
			c = (c!=""?(c+d):"")+e[i];
	}
	else alert("listSetAt: Index " + p + " is Out of range");
	return c;
}
function listLen(c,d)
{
	if( c == "" ) return 0;
	if(arguments.length<2)d=",";
	return c.split(d).length;
}

Dual Screen

Yesterday I decided to buy myself a color printer for the office. As I recommend everyone to do, I checked cnet's reviews and  then decided to buy myself the Canon Pixma MP460 which was the Editors top multifunction photo-centric budget inkjet printer. Cue an hour of printing out old holdiay photos of Thailand and South Africa.

Dan, not to be outdone with me buying myself a pressie called me into his office to see his spanky new 19" widescreen monitor which he had configured in dual screen with his 17" widescreen laptop monitor.

Seething with jealously I made the call to our buddy Ears who works for Maddens and procured delivery of another 19" widescreen beast.




After less than a day playing with my dual screen set-up, I've already seen productivity increases. For example. using the nifty Reload Every extension for firefox on one screen while programming/tweaking on another saves the tedious "make change, switch window, refresh" development cycle.

I found some dual screen wallpapers linked from Digg. The sheep are just cool.





Best of all, I can watch a movie on one screen while I work on the other. Time management 101. Ahem.
Tags: My Work

Been Busy - Hands Dirty

I haven't posted here in a while as I've been very very busy with a project whose nature I can't disclose, but it has involved advanced database design, Web Services, DLL integration, Serial Ports, USB Drives, ColdFusion, C++, Java and C#. The latter being a programming language I had no experience with until just last week.

After one week of using C#, I love it. When all you care about is getting the f*****g thing done, it's a Godsend. The language is brilliantly thought out with great features such as the new 'out' keyword and Microsoft's IDE is outstanding.

For me, the major downside of developing apps in C# is that your applications can be very easily decompiled back to their exact original source code using freely available tools. It's not too appetising to indirectly provide your source code to competitors.

But I digress, the moral of this story is that I've been doing some interesting programming lately and loving it. For example, we stayed in the office last night, a Saturday, until 4am when we finally succeeded in beating the shit of some C# code to get out the final bug before today's project demo. Good times. Messing Nothing like learning something new while getting your coding paws filthy dirty in code.

Now that it's more or less done, it's back to the tedious standard CF-based client work.
Sín é ('That's it - in Irish). Blogging will resume.


Random Unrelated Linkage:
Tags: My Work

Tabs for UDI

Those of you familiar with my UDI product should be delighted to hear I've added tab functionality to the interface!

I've been working flat-out on a rush job for a local college and they wanted tabs so I bit the bullet and made tabs a feature of UDI. It's great when I can use paid work to extend one of my components.

Seen below is a screenshot if the tabs in action on this project. You can add as many tabs as you want, it's cross browser and it makes for nicer interfaces.

UDI now with Tabs

If anybody wants to email me directly I will send them on the latest version of UDI. Otherwise expect an update available on www.cftagstore.com within a week or two.

..Not the best 'Pages' Design in the World...

..oh no, this is just a tribute! This is the latest Digital Crew database design for storing website pages.

I have evolved this design over the years and I'm pretty happy with this result - this design supports multiple sites, page redirection, page short name (for navigation) and page long name, page HTML (for basic pages or intro text on complex pages), meta information, visibility, security, published status, alternative URLs, alternative files, making page for special (dynamic) processing and the ability to open the page in a new window.

Use it, if you like.

Design view of MySQL 'Pages' table

CREATE TABLE `pages` (
  `pageid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `siteId` int(11) UNSIGNED NOT NULL DEFAULT '1',
  `pageparentid` int(10) UNSIGNED DEFAULT '0',
  `pageCode` varchar(50) character SET latin1 NOT NULL,
  `pageNavName` varchar(100) character SET latin1 NOT NULL DEFAULT '',
  `pageName` varchar(150) character SET latin1 NOT NULL DEFAULT '',
  `pageHTML` text character SET latin1 NOT NULL,
  `pageDisplayOrder` smallint(5) UNSIGNED NOT NULL DEFAULT '2000',
  `pageIsPublished` tinyint(1) NOT NULL DEFAULT '1',
  `pageDescription` varchar(255) character SET latin1 DEFAULT NULL,
  `pageKeywords` varchar(255) character SET latin1 DEFAULT NULL,
  `pageIsFolder` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
  `pageIsDynamic` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
  `pageIsVisible` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  `pageIsLocked` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
  `pageAccess` enum('O','I','A') character SET latin1 NOT NULL DEFAULT 'A' COMMENT 'A=All, I=Logged In, O = Logged Out',
  `pageRedirectPage` varchar(50) character SET latin1 DEFAULT NULL,
  `pageAltFile` varchar(255) character SET latin1 DEFAULT NULL,
  `pageAltURL` varchar(255) character SET latin1 DEFAULT NULL,
  `pageOpenNewWin` tinyint(3) UNSIGNED DEFAULT '0',
  `pageShowOnInPageNav` tinyint(3) UNSIGNED DEFAULT '1'
  PRIMARY KEY  (`pageid`),
  KEY `pageparendId-pageId` (`pageparentid`),
  CONSTRAINT `pageparendId-pageId` FOREIGN KEY (`pageparentid`) REFERENCES `pages` (`pageid`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

QueryWizard Version 1.1

Today I made a number of important improvements to the QueryWizard that I started yesterday. Already the QueryWizard is proving to be a useful tool for me. Just unzip this and execute <cf_queryWizard>.

The Query Wizard

I've tried to make the Query Wizard as intelligent as possible.

  • Matching Field Names
    It automatically links up any URL or FORM variables to matching fields. But database fields are often prefixed with the name of the table (at least at DCHQ they always are) so it matches the right hand side of the column name against the variables names.
  • Preview of Field Values
    As you see in the drop down for matching fields I now display a preview of the data that was held in the field when <cf_queryWizard> was executed.
  • Query Name Selection
    The wizard does it best to pick a suitable name for the generated query. If you are INSERTing into the "Monkeys" table, the query will be called "InsertMonkey".
  • Matching indentation level
    You can place <cf_queryWizard> anywhere in your CFM template and the query that is generated in its place will match your indentation keeping everything nice and neat.

Road-map

  • Ability to specify SORT ORDER when doing SELECT
  • Ability to SELECT from multiple tables and specify the join type and clause - this is going to be tricky Messing
  • General improvements to interface including have the generated query not scroll

And with that I'm out of ideas so please download the query wizard and hit me with your suggestions.

Tags: My Work | Tools | WebDev

I've been thinking about making this tag to quickly knock out queries for literally years now. The advantage of doing this at run-time is that we have access to the list of variables that are available.

So lets say you made a contact form and on the contact form's action page you want to insert the details into the database...

  1. Just type <cf_queryWizard> on the action page and run it - i.e. submit the form. Then wizard opens in a new window.
  2. Choose type "insert"
  3. Choose the table that will store the records
  4. Match each database field to the correct FORM variable provided in the list.
  5. Click "Insert this query".

I spent the last 6 hours writing it but I'm hoping that we'll all benefit from this. I'm giving it out completely free to all fellow ColdFusion developers. I'd love to see this in wide usage so please let everybody know about it.

Notes

  • The tag works best if you have the variables "APPLICATION.datasource", "APPLICATION.db_username" and "APPLICATION.db_password" but if not you can pass in your own datasource, username and password as normal. e.g.
    <cf_queryWizard datasource="#myds#" username="#myusername'" password="#mypass#">
  • You can not place this is the customtags directory - It calls itself as a standalone coldfusion page and needs to be present in the directory.
  • There was no way to figure out which file is executing the tag so I cheated Messing
    I got around this by deliberately creating an error and getting the parent file name from the cfcatch.tagcontext. A clever hack but might cause this tag to not work with BlueDragon etc so I also allow you to pass in the path the current file like so: <cf_queryWizard thisfile="#GetCurrentTemplatePath()#">.
  • You can run <cf_queryWizard abort="yes"> to halt execution until the query is programmed.
  • Note: You can only have one of these on a page at a time. I'll fix that for version 2.
  • Security Note: It should be completely secure so long as only a developer gets to execute this. The permissions to edit are session/uuid based.

Hit me with your feedback. Source code is open - fell free to hack. Sorry for lack of comments - I just ploughed this out.

Update

Dan spotted a bug when using this with Internet Explorer. Fixed now.

Tags: My Work | Tools

CF_ProFlashUpload - Live at Last

I've finally released the flash upload component - the development of which I was blogging about here. Took a while for myself and Dan to come up with a good name. We were throwing all sorts of crazy ideas out there. Anyhow, please please go ahead and try it out. The demo is fully functional apart from a banner that asks you to purchase it.

I'm selling this baby for $50 per website - a fair price I think given the amount of work that went into this sucker.

What Is CF_ProFlashUpload? This widget creates a interface that allows your site user to easily upload multiple, even hundreds of files to your server. Each file has an individual progress bar and there is also an overall progress bar. The upload rate is also displayed.

 

The component allows you to use a multiple file upload component of any size as part of any ColdFusion application. It is extremely easy-to-use. You can call the component passing in just the upload directory and nothing else. Or you can use any of the advanced options to customise security options, file-type options and the look-and-feel of the component.

One of the nicest features of this component are per-file progress bars. The upload rate is also displayed along with the overall progress.

The demo is completely functional - just download it and you'll be up and running in minutes.

Accessibility Audit

I just got a professional accessibility audit report on a website I recently developed. I didn't fare too badly - an average score.

What really impressed me was the thoroughness of the report - wherever there was a red flag, there was a very good suggestion on how to fix this as well as notes on why this is an issue.

I've learnt a lot about how to make a website truly accessible and look forward to moving the websites score from average to excellent. It's important to keep learning and strive to be the best developer you can be.

Tags: My Work | WebDev

New Digital Crew Showcase Site

At Digital Crew we are busy. So busy our own website is badly neglected. Hell, it's so old, it uses font tags! And it uses our original CMS solution so its pretty hard to manage also.

We've wanted to make the mother-of-all websites for over 2 years now and last year we couldn't settle on a mother-of-all design and so the project stagnated. And eventually was forgotten under our heavy workload.

Recently we made the decision to put up a simple showcase site in place of the current embarrassment. Anything is better that what's there now. Our top priority is to showcase our recent work which I think (somewhat biasedly of courseMessing) is pretty good.

Aside: I'm watching Portugal Vs France right now.... Portugal is losing 1-0 and they just missed a sitter.

Preview of New Digital Crew websiteAdam, our graphic designer has put together the temporary showcase website design for Digital Crew and its not too bad at all for a temporary site. I'm looking forward to putting it up. Here is a tiny preview.

Aside: Update: The match is over. Well done France for getting to the Final.

Aside: Can somebody tell me why Firefox is putting a load of whitespace at the end of the first blog post on this site?

Tags: My Work | WebDev

InfinityCMS Button for Google Toolbar

I'm just finished another small website project and it should be launched within a matter of days:

WebWorks Cork

But that's not the reason I'm posting this. Yesterday, I was searching for something completely different when I came across some pages on Google's site describing how to add your own custom buttons to the new Google BETA toolbar.

My imagination was captured (=all real work ceased Messing). An hour later (OK to be honest, about 3 hours later) and I had my very own icon for our own InfinityCMS Content Management System. Check it out:

Simply click this icon and it launches InfinityCMS

Installation: I added a page to our CMS system where the user can click a link to install this button in his/her Google Toolbar.

What Happens? Once clicked, the button sends the current URL to infinitycms.digital-crew.com. A ColdFusion page there checks the URL and performs a test to see if InfinityCMS is installed on that website.

If it isn't, the user gets a quick message displayed and is returned to where he/she was with history.back().

But if InfinityCMS is detected, a new window launches InfinityCMS and in the old window the user is again returned to where he was with history.back().

The Cool Bit: InfinityCMS is passed the URL of the page you were on when you clicked the icon... There are a series of regular expressions in the database (which can easily be updated in InfinityCMS by an administrator) that handle the request in a smart way...

For example, if the user was on the home page and clicks the icon, a window will appear allowing the user to quickly edit just the home page without all the other elements of the CMS solution:

InfinityCMS Quick Eidt Mode

And if there are several corresponding 'Quick Edit' options for a page, then the user will get a list of options. For example, on the following Quick Edit of the "Contact Us" page, the user can choose to edit the page or review messages from the contact form which have been logged in the database:

InfinityCMS Quick Edit of Contact Page - Options

Now that I've been using it for a bit, I find this little icon invaluable for making quick changes here and there. Of course if the user isn't logged into the CMS system, the login page appears first. I must add on the ability for the user to switch from Quick Edit more to full edit mode which looks like this:

InfinityCMS for WebWorks in Full Mode

Would love to know what you think of this little hack?

Update

I was giving a demo of this to Cormac and his popup blocker (Google Toobar - haha - the irony) was preventing the Quick Edit window from opening.

I remembered when the other day, GMail popped up a message for me saying that a popup blocker was blocking a window from opening so I knew it was possible to detect this. I did a bit of googling and it turns out it's pretty easy to detect:

<script language='JavaScript'>
<!-- <![CDATA[
function userHasPopupBlocker() {
var oWin = window.open('','child','width=50,height=50,status=no,resizable=yes');
if( oWin==null || typeof(oWin)=="undefined" ) return true;
else oWin.close();
return false;
}
//    ]]> -->
</script>

So now my script displays a friendly message asking to user to disable the popup blocker for the redirect site and "click here to try again". All working as it should again.

Flash Security Wrecking My Head

FFS, all I want to do is ask the license server if this component is OK to run on this website. My code was working perfectly from localhost - cummunicating perfectly with the licensing server but when I put it out in the real world, it couldn't get a connection.

Turns out Flash's security model is preventing loading data from another domain.

There are three methods (I've found so far) to allow the communication, but all of these require that the license server know who the requesting server is, in advance. So not too good for my needs then.

I think the WebService API might be able to get around this restriction... It's 2.18am however and that's another days work. This article looks positive...

http://www.adobe.com/devnet/flash/articles/flmxpro_webservices_03.html

MultiUpload Demo - 171 Files

Interesting to see that, since yesterday, users of this site have uploaded 171 files messing around with the Multiple Upload Demo.

Among the files are a plethora of interesting MP3s, excel sheets, PSD files and of course some porno - thanks Guys.

Whomever uploaded "film_ze_mucha_nie_siada.mpg" - that's just weird.

Updated Demo

I've updated the demo with a few more options and started updating the descriptions. I haven't tested all these options yet, so please let me know if you find a bug.

IE users, you may want to reset you cache as I updated the flash control and IE is brutal for not updating the cached version flash movies.

Some Minor Updates

I changed the names of some attributes such as "color" which is now "statusTextColor".

I also re-jigged some of the internal Flash default parameter coding to make the flash control smaller and more robust in that it can handle color codes in any of the following formats, "0xFF4466", "#FF4466" or just "FF4466".

It's all these little things that are delaying the launch but will ultimately make this incredibly easy-to-use and dummy-proof.

Multiple Upload Demo Updated.

Last night, I added some options and fixed one of the last remaining bugs in the Multiple File Upload Widget Demo.

Tonight I'll add more options to the demo.

I was thinking of add a 'tic' sound as each file uploads. Also don't you think the default text for the select files button should be "Select Files" and not "Browse".

One of the last things we want to add to the Flash control is licence control. From the top of my head, here's an overview of how the licensing might work:

  1. The flash component will have a secret key and the licensing server will also have this same secret key.
  2. When the component is called on a commercial website, the component will ask the server if the current website has a licence registered using its secret key to build a hash of the domain and time-stamp. The server will respond yes or no.
  3. Once the flash gets the response, it will be able to authenticate that it was the real server it was talking to based on the hash.
  4. If the server responded 'no', the "unregistered version, click here to register" text will display.
  5. The website will be sent a unique license hash for the current website that it will store and pass into the flash control for instant authentication in the future without the need to communicate with the licensing server.
  6. It will also be possible for users to download licence files for their website that prevent the need to communicate with the licensing server.

Of course all the falls flat on it's face if somebody cracks open the SWF file and obtains the secret key; and understands the licensing mechanism; and goes to extreme lengths to replica the licensing server or rebuild the licence key. But it's going to sell for $50, so so I don't think anybody would be bothered going to those lengths.

Flash Upload Demo is Up

I know some of you are looking forward to checking out the demo of the flash file uploader component for ColdFusion so without further ado, here you go:

ps. I haven't got around to adding the licence management code yet so for security I've just slapped "demo" on it for now. This demo uses exactly the following code and also shows how javascript callbacks can be used. C&C very welcome.

<cf_dccom component="dcFlashUpload" folder="#folder#"

width="500"
height="400"

jsOnFileUpload="onFileUpload"
jsOnComplete="onComplete"

color="0xFFFFFF"

themeColor="haloGreen"

blockExtensions="cfm,cfml,exe,cgi,php,php3"

></cf_dccom>

Configuring Firewall for Passive FTP

Access to our web servers has been wanky since we installed a new firewall in the hosting center a while back. The firewall was configured to allow full access on port 21 so that should be fine, right?

Wrong. I thought "FTP uses port 21" and that was that, but FTP only uses port 21 for commands and uses a random port for the communication.

I did some reading about how both modes, Active and Passive FTP, work. Basically using Active will prevent any firewall issues but the clients firewall may think the server connecting to the client on a random port to send data is an intruder. So enforcing Active Mode may create problems for some clients.

But if you use Passive mode, the client will try to create a connection with the server for data transfer on any port over 1024. The problem is that could be any port and you don't want to have to tell the firewall to leave access open on all ports over 1024.

The solution is to configure the FTP servers themselves to use a narrow range of potential port numbers for the Passive mode data transfer, say 51000 to 52000, and then configure the firewall to allow access on these ports. Our servers are now working with Passive mode FTP again - Happy Days.

Tags: My Work | WebDev

Drunken Programming

I was happily programming in my room when one of the lads dragged me out drinking a few hours ago. Now I'm back happily drunk programming, back listening to good music and enjoying finishing off the multiple upload control. I'll be glad to put this multiple upload control to rest and get some feedback.

Drunken programming rocks. I probably won't understand any of the code tomorrow but what the hell, I'm getting things done.

I just added the code that prevents a user selecting a file he has already chosen a second time. Unfortunately the Flash-heads don't let us know where on the user's hard drive a selected file comes from so I have to base the analysis on the file name and file size. That means that if some user tries to upload 2 different files with the same name and same file size that they simply won't be able to. Know what I'm on about? Anyhow it was a bit of a dumb decision from the Macromedia heads... I mean the Adobe heads. They should have at least provided a hash to represent the file so we could distinguish between 2 similar files. For some user, somewhere, this will cause slight confusion but what can I do.

I have just 2 tasks remaining on the control. 1 - Get the maxTotalFileSize limit working. And 2, Fix the sorting of the columns.

Then I just have testing and tweaking. I've added a shit load of customisation options to the control so all that has to be documented as well. I'm glad that I can just hand this masterpiece (ahem sorry) off to Dan and that he has to do all the packaging. There's some amount of work gone into this thing, but most of it is behind-the-scenes and optional stuff that most people won't appreciate.

OK, I'll stop here, I'm ranting. Maybe I'm just pissed. Hic.

Here's the latest screenshot, notice the customisation of the column headers, the button icons, the highlighted text effect and the overall file size. This will be the best multiple file upload widget on the market. Smile

Oh yes, sell baby sell

Tags: My Work | WebDev

Flash Multiple File Upload Widget Preview Part II

I've been working on the Flash Multiple File Upload Widget - I think it's really getting there now that I've added in a few neat features. Here is an updated screenshot.
 
Oh Yeah, it's gonna rock
 
I'm learning a lot of advanced flash on this project; I had no idea what a CellRenderer class was just a few days ago. If I know it can be done, and I want it done bad enough, I'll bloody well keep at it until I get it done.

I managed to get the file type icons loading dynamically and I just had to put in the per-file progress bar (I was up till 3.30am last night at that).

Dan and I have agreed a final list of changes to make to this before we release it to the world. Here are the remaining work items:

  • Allow per-file callback through variable jsOnFileUpload(success,fileNo,fileName)
  • Allow user to set the nameConflict - default is "overwrite"
  • Put the stylish per-file progress bar at the bottom of the control - dump the built-in one
  • Change footer text to something like "Uploading file 1 of 20, Upload Rate: 20KB/s"
  • Allow user to turn on/off the size column through showSizeColumn="no"
  • Prevent duplicate selection for uploading of the same file
  • Add and implement maxTotalFileSize limit
  • Put striped background colours in
  • Change style on header of columns to glass effect, if thats possible
  • Put icons in for the buttons
  • Fix the sorting of the columns
  • implement stopOnError="yes"

Since I'm doing the Flash programming, Dan has agreed to make a masterpiece of the packaging and marketing of this baby. I'm hoping this baby will sell like cupcakes.

Now back to it...

Flash MultiUpload Control in the Works

On our site, CFTagStore.com, we have a ColdFusion widget called CF_MultiUpload Advanced which was programmed by Dan and I.

The advanced part of the widget uses an activeX control in a pop-up window to allow the user to easily select and upload hundreds of files.

However because Flash 8 now has powerful support for selecting and uploading multiple files, I spent Tuesday and Wednesday working on a sexual flash replacement for our old CF_MultiUpload Advanced widget. Here is a preview:

Flash Multi Upload Preview

The Flash version will mean that this will work on all platforms and browsers without the need to install an activeX control.

As you can see, I only have icons in for JPG images so far - I was to try to dynamically load the needed icons to keep the controls load-size minimal.

Also I plan to add in a second progress bar for the current file along with some stats on the current upload rate and possibly the average upload rate.

Have a few bugs to fix also before I add any more features.

Dan assures me this will sell like cupcakes.

My Work: Digital Warehouse & House Design Tool

The site I've been tipping away at for the last 2 weeks is just about ready to go live. Still a good few things to fix such as the actual ability to purchase stuff, ahem *cough*.

Anyhow, check-it-out at www.digitalwarehouse.ie - comments welcome.

MyWork: Digital Warehouse

Project Notes:

  1. The site owner bases delivery cost on the destination and the weight. I had to come up with a way to group countries into regions and assign costs to weights and regions... design the database, the CMS pages etc. You get that, no? doesn't matter, it works.
  2. I like the way I did the specifications. The content editor just enters specs in the format SPEC:DESCRIPTION into a free text range and gets its interpreted and displayed nicely.
  3. I finally added the overdue, remember me option to the CMS. The remember me uses a cookie encrypted with APPLICATION.secretKey - a new standard variable that I am going to use in all future sites. I was getting well sick of logging in InfinityCMS about 10 times a day.
  4. As with all our sites, as much work if not more has gone into the CMS for the site - the bit nobody but ourselves and the owner will ever see. I think it's pretty slick. In fact, I'm thinking of putting a few demos of InfinityCMS online for people to view our work.
  5. Adam did a great job with the design, logo, layout etc. I had to beat him repeatedly to improve some aspects he was a little lazy with such as the buttons but the end result is pretty good.
  6. Component reuse - we have reusable components for the shopping cart, the search page, the contact form, FAQs, newsletter sign-up, RSS feeds etc. Our latest endeavour is to make what we call RAD components. The first time a RAD component such as RADFAQ is run in ColdFusion, it detects that it is missing the required tables in the database and then creates the tables and the CMS pages for managing the FAQs automagically... this is the way it should be. We must have saved weeks of development time during this project and time is money.

Can't think of anything else newsworthy about the project.

House Design Tool

My Work: Freefoam House Design ToolOh, another little thing I was working on for another project that has recently gone live is the House Design Tool for Freefoam - click "Customer Design Tool" on the home page of www.freefoam.com to see it.

I spent the bones of 8 hours working on this. It needs flash 8 but earlier today, Cormac coerced me into putting in a clever actionscript he found that will automatically upgrade the flash player for the user, if required. I had to get the tools to uninstall flash 8 and install old versions of flash for testing. It works nicely.

Tags: My Work

Battle of the WYSIWYGs

Dan told me the other day that he stumbled upon an online WYSIWYG that is much better that FCKEditor which we use in UDI and in turn use in all our content management systems as the main editor.

I was a bit reluctant. Why?

  1. When I went looking for the best editor a year ago, I thought I had found it in FCKEditor. I honesty thought FCKEditor was the best out there.
  2. I had put so much effect into the integration of FCKEditor with UDI, hacking FCKEditor to death until it fit my needs, that the thought of change was dismaying.

But an hour ago I asked Dan to show me that Editor... the editor is TinyMCE.

TinyMCE Kicks FCKEditor about

Yip. I admit it, I was wrong, FCKEditor has been delivered a heart-stopping fist-of-death by TinyMCE. The loading seems faster. The integration seems better. The toolbars are easily modified (wasn't easy in FCK). But what really made me wet what the advanced image editing... images can be resized and clipped online! It's just what dummy clients need. Hell, even the documentation is better.

What really convinced me was when Cormac chipped in with a link to this excellent online WYSIWYG comparison which places TinyMCE above FCK and names it as the best open-source solution.

It remains to be seen if TinyMCE is flexible enough to allow me to do some advanced things; like allowing the user to easily link to existing web pages from a tree menu of available site pages when adding a link.

Anyhow, I've downloaded TinyMCE and all going well, I'm determined to have it an integral part of UDI by this day next week.

Tags: My Work | Online | WebDev

Stupid MySQL -> CounterStrike

Check this out for a bizarre bug in MySQL (or else I'm way too tired). I have this setup, what do you think the query will return, 2 rows right?

The Setup

Alas no - it returns NADA, nothing, blank, no data! No matter what I try the shippingcostWeight will not match any decimal value. See this screenshot of the results:

The Problem

I've tried changing the float column to decimal and double but it makes no difference. I tried putting the float value in single quotes and no luck. I'm sure its either a bug in MySQL 5, a bug in the driver or that i'm being completely stupid. Anyhow i'm nearly finished the ecommerce site I'm working on so I think it's time to call it a night and play some CounterStrike - the best game ever made!! :)

Counterstrike - the best game ever!

 

Tags: My Work | WebDev

My Work: NMCI

NMCII've spent the last 2 weeks working on the website for the new National Maritime College of Ireland (NMCI). It was a bit of a struggle to meet a tight deadline for their launch but we did it.

The website itself ain't bad but the CMS behind it is another evolution of our custom built InfinityCMS content management system and is pretty sweet (if I do say so myself).

One neat feature is this ability for the user to type [include:subnav] in the WYSIWYG and the website will automagically spit out an in-page navigation. Other options are [include:date], [include:datetime] etc.

Also an editor can choose up to 5 image and write [include:image1] in their text to get a nicely rounded captioned image on the page. The rounded edges are done using the nifty corners flash I showed here last week.

Then theres the right hand side items - editors can create and assign right hand side items for any page and the images are automatically scaled and rounded for them.

Oh and the site also uses the useful script I wrote to extract URL variables from the pathe path so the site is more search engine friendly with URLs like http://www.nmci.ie/index.cfm/page/undergraduatecourses as opposed to http://www.nmci.ie/index.cfm?page=undergraduatecourses

All in all, I think I did well to add all these features and still get the job done on-time.
Check out the site and hit me back, comments appreciated (Keith, this time round, please try to say something positive before you unleash hell's fury).

About Topper on ColdFusion

Peter Coppinger aka Topper is a neurotic web monster who spends most of his chaotic life developing ColdFusion web applications when not drinking himself into a stupor and scheming his plans for world dominance.

Peter founded Digital Crew way back in 1999. Digital Crew run CFTagStore.com and have also produced lots of powerful ColdFusion tools like ProFlashUpload and CFMyAdmin.

I made this site to share my thoughts, tips and tools with fellow ColdFusion developers.

If your a ColdFusion developer, go ahead and subscribe to this site and in exchange i'll try to provide quality content to make it worth your while.
RSS Feed for Topper on ColdFusion

    I'm speaking at CF-United Europe!

    CFDevCon I'm going to be speaking at CFDevCon08! It's my second time speaking in front of more than 10 people so please lend your support.

    The topic is:
    Introducting TeamworkCMS and Site Engine - Building better websites in half the time or something like that..

    Digging

    My Work - Just Finished

    • modules.cit.ie
      Web-=based modules/programmes designer tool and database system for Cork institute of technology.
    • Teamwork Project Manager
      The top secret project is finally released. The project management app will rock your world - give it a go.
    • PMG
      New website for Project Management Group website.
    • Digital Warehouse Wholesale
      Added wholesale products to existing client website.
    • New Digital Crew documentation website
      New version of documentation.digital-crew.com using new InfinityCMS site engine. It's done now. Just add content.
    • PFH Company Webite
      New website/CMS/Newsletter System for prestigious Irish IT company.
    • Module Manager for CIT
      CIT is switching to module based courses. We are making an application for managing/submitting these modules. Gettig there.
    • Bons Secours Cork Hospital Intranet
      New Intranet for Bons Secours hospital in Cork. Considering turning this Intranet system into stand-alone product.
    • Revamping InfinityCMS
      I'm making major improvements to our content management solution, InfinityCMS. Making it faster, more powerful and easier to check into/out-of source control. Done but it's always going to be evolving.
    • BPC Update
      Minor functionality update for internal Pfizer Best Process Chemistry project.