Entries Tagged as 'ColdFusion'

ColdFusion 8 CAPTCHA plugin for Mango

ColdFusion , Mango Blog 1 Comment »

Another plugin for Mango Blog...

If you've got ColdFusion 8, you might like to use its built-in CAPTCHA generation instead of using LylaCaptcha (Mango's default). You can see it in action on this blog.

Simply download the files and unzip them into /components/plugins/user/ - and then activate the plugin from the Add-ons page in the blog admin. Make sure you disable LylaCaptcha as well!

You can change the default settings by selecting CF8 Captcha from the settings page.

YouTube plugin for Mango Blog

ColdFusion , Mango Blog 4 Comments »

As mentioned earlier, this site is powered by Mango Blog. Having played with it a little to get it installed, I thought I'd look at its extensibility...

The plugin framework seems quite simple once the basic concepts have been understood; so I started to write my first plugin.

The documentation mentions a YouTube plugin but as far as I could see it doesn't actually exist, so this seemed an ideal place to start! Simply download the files and unzip them into /components/plugins/user/ - and then activate the plugin from the Add-ons page in the blog admin.

All you need to do to include a video is find out what the video's ID is (it's the string of characters after v= in the YouTube URL), and write the following into your post or page:

[youtube:videoid]

And your video should be included like so:

I may develop this further - maybe add options to specify the global video size for your blog. If you have anything you'd like to see, please let me know! 

cfimage generating unreadable CAPTCHAs

ColdFusion 6 Comments »

I was recently building a new page for a client who required a CAPTCHA to prevent spamming. Great, I thought: I can use ColdFusion 8's <cfimage> tag; which I did, and it was really simple to do.

Shortly after the page went live, I started getting complaints that a lot of the time, the CAPTCHAs were dark, murky, and often unreadable. I couldn't work out why: I'd done some test pages with <cfimage>, and they always looked perfect...

More test pages, and they still looked fine; but on the clients page they were still really dark. Extensive Googling provided no solutions - or even any hint that anyone else might be having the same issue!

And then it hit me: the problem was that the page had a black background; the generated CAPTCHA images had an alpha-transparency background - and so the black was showing through, and making everything dark.

As an example, here are a couple of <cfimage>-generated captchas, as they would appear on a white page:

cfimage CAPTCHA as seen on a white background

And here are the same images on a black background:

 cfimage CAPTCHA as seen on a black background

The solution, since you can't apply a background-color directly to the <cfimage>, is to wrap your CAPTCHA image in a <div> the same size as the image, and set a background-color of white on that.

And Adobe: please, in the next bug-fix for CF8, add a solid white base layer to the generated CAPTCHA images...

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds