cftopper.com

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.

Aardvark'd Review

This morning, Dan and I were planning, scheming and arguing about the forthcoming application we are planning to develop when Cormac marched into my office with a priority mail package from Fog Creek.

It had arrived! The long awaited package contained Aardvark'd - a documentary of the development of Co-Pilot by a group of interns at Fog Creek software last Summer.

We did a bit of rescheduling so that we could have our Geek Night in and thoroughly enjoy this movie at Dan's house later. We were looking forward to watching the code-monkeys plan, structure, project manage, make decisions, argue, debate and code their way to success.

Interlude

Well, I'm just back from Dan's house after watching the DVD and I have to say that I'm a little disappointed.

Certainly there were a few interesting bits and it was good to see inside the organisation, their environment and so on. But I had wanted to see software development at it's finest. I didn't. Instead I got 90 minutes of utter tedium.

Seriously! - I don't care about the ledge, your tomato plant, your birthday hat, your misfired party, your apartments, your bike or even the fucking cockroach (I could go on).

I had wanted to see the team work together, choosing the correct platform, the decision to go with VNC, the frustrations, the long hours, the code, the mistakes, the tools, the database design, the server setup... everything.

But alas, it seems that this wasn't aimed at developers. If not, then who was this aimed at? Certainly nobody other than developers would give a shit about something subtitled "12 weeks with Geeks". It could be that they were sick of discussing the development process they went through forums and such online and wanted to show the lighter side of software development. Or it could be that the production company behind the video just don't get it.

For me, it's a misfire, a wasted opportunity.

Tags: Musings | WebDev

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

Hard Link Manager

I was just working on the licensing code for the Flash multiple upload control when I ran into a small issue - I didn't want to hard code the link to the purchase URL because that URL will probably change in the near future.

Then something faint registered at the back of my mind. Didn't I run into the sort of issue before and write some sort of app for creating hard links and redirecting the user to the current appropriate link.

I wasn't sure. But a quick FTP poke around revealed this nice little redirecting application I must have wrote over 2 years ago. Yip, the files were last updated on 1 Feb 2004.

Hard Link Manager

It's still working and working well. When it come times to change to a different URL, I'll just log into this little app and change the redirection link. It's good to find nuggets like this you'd forgotten about.

Aside: The licensing code for the Multiple File Flash Upload is done, I'm just putting in a "Unregistered Version, click here to purchase" message now.

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.

Aardvark'd Ordered for Geek Night In

After catching up on Joel's blog; I just ordered Aardvark'd, Fogcreek's documentary about their last summers interns and the software they developed.  My plan is to get a group of players (read:Geeks) together and have a Geek-Night-In watching this.

Interns get free housing, free lunch, Aeron chairs, dual-Xeon workstations with 30" LCD monitors, and weekly cultural events like Broadway shows, a Yankees game, and tours around New York City.

Shit. Dual-Xeon workstations with 30" LCD monitors and Aeron chairs - fuck, almost makes me want to apply. I decided I want an Aeron chair for my office but can't find anybody who supplies them in Ireland.

Aside 1: You spent months making a state of the art Intranet and content management system for your client, only to find that 2 months later they've used their new-found WYSIWYG and ease-of-publishing power to envelop the whole thing in Clip-Art. And shitty Clip Art at that:

Tags: Musings | Online

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>

No Screenshots = Shit Software

It always annoys me to see these big enterprise-esque software product websites talking the talk about their products with incredible bullshit such as:

"... that uniquely addresses next-generation enterprise content management needs, including process-based publishing and RSS/XML syndication and transformation technologies..."

... yet nowhere is there a screenshot of this amazing application to be seen.

Why? I think it's because one look at a screenshot and you will realise instantly that this product is a load of crap. What damage could posting a screenshot do if the product is anywhere near as good as they claim?

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

Blog Split

OK decision made, from now on this Blog will be just a technology-related blog. No more posts about my holidays etc. All that stuff will be moved to another blog.

I'll probably use the CMS same engine for both blogs - so i'll just add a blogId attribute to the blog posts and add a blogs table.

PS. Check back for Live Demo of Flash Multiple File Upload Tomorrow Evening GMT.

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

Toppers Thailand Waterfall Trek

Here are some vids I made on my recent Trip to Thailand.

The story: I noticed on the Koh Samui map that there was a waterfall with "80 m" written beside it so I thought it would be good to check that out. I set off on the ye olde moped and drove like a bat our of hell. When I got there an hour later, it turned out that the waterfall wasn't convieniently situated beside the mud road but rather was a "short hike" away. Short hike my ass...



Part 2

Part 3

Part 4

Recorded on my trusty Canon Powershot A85.
Sorry if that just bored your to tears. Messing

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

A Little Something To Brighten Up Your Afternoon...

This is outstanding...

It really brightened my day especially since I've been working with Flash 8 non-stop for the last couple of days.

Hat Tip: Ed
Tags: Online

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.

Men are from Mars, Women are from Venus

I was shaving a while ago and got to thinking about that famous book title; it makes sense; Men are from a somewhat practical and usable planet with abundant resources and Women are from a resourceless, bloated, high-pressure, extremely hot planet.

I will definitely get in trouble for this analysis. Only messing. Messing

Tags: Musings

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.