Marcos Placona Blog

Programming, technology and the taming of the web.

Month: August 2009 (page 1 of 2)

I truly hate you IE!

Reading time: 1 – 2 minutes

Firefox vs. IE
(Photo: Kay Kim)

I just came across a very interesting bug on my website. I’ve made a post on twitter today asking the local CSS gurus if they knew of any way to fix this:
IE screws up again
As you can see, the contents were being shifted about 150px to the left from where they were supposed to be (you can click on the image above to see it bigger). Only IE does it, every other browser (Safari, Chrome, Opera, Firefox (few different versions including Linux)) simply displays the page correctly. Continue reading

A more elaborated jQuery Drag & Drop (with cloning)

Reading time: 6 – 9 minutes

I’ve decided to get back at jQuery draggable and droppable to a personal project I’ve been working on. In the past, I’ve demonstrated how to do basic drag and drop, but this time I needed something a little bit more elaborated.
I won’t spoil my personal project by showing what it before it gets done, but I’ll show here an example of what I wanted to accomplish which will use pretty much the same functionality, but in other application.
The idea is:
I have a stage where I have a bunch of components that should be dragged from one side to another. Those components have to be cloned, and not totally dragged as I might want to use them more than one time.
A sketch of it would be on the lines of:
jQuery drag & Drop Example
As you can see, my icons need to stay on the left, but a clone of it can always be dragged to the right. This is not a finished version, but show pretty much all of the steps I had to follow in order to accomplish it. It’s not a simple solution, and did involve loads of researching and asking around. The jQuery’s documentation is not really vast, and does not cover (and should not really) every single example.
I start with importing all my necessary libraries from Google Servers.


Then I start with my JavaScript code for draggable and droppable:

$(document).ready(function () {
    counter = 0;
    //Make element draggable
        helper: 'clone',
        containment: 'frame',
        //When first dragged
        stop: function (ev, ui) {
            var pos = $(ui.helper).offset();
            objName = "#clonediv" + counter
                "left": pos.left,
            //When an existiung object is dragged
                containment: 'parent',
                stop: function (ev, ui) {
                    var pos = $(ui.helper).offset();
    //Make element droppable
        drop: function (ev, ui) {
            if (ui.helper.attr('id').search(/drag[0-9]/) != -1) {
                var element = $(ui.draggable).clone();
                $(".tempclass").attr("id", "clonediv" + counter);
                $("#clonediv" + counter).removeClass("tempclass");
                //Get the dynamically item id
                draggedNumber = ui.helper.attr('id').search(/drag([0-9])/)
                itemDragged = "dragged" + RegExp.$1
                $("#clonediv" + counter).addClass(itemDragged);

The code above is responsible for the dragging and dropping iterations.
I just want to highlight that even though the draggable component has an attribute called helper, and you can set it to clone, it does not necessarily clone the objects, but give a “false impression” of objects being dragged.
The object only is cloned when it’s dropped at the stage.
Just after I’ve created my JavaScript, I create some HTML to hold it all. It’s really simple and crude, but will do the job and show what’s to be shown.

What do you know?

John Paul George Ringo

It really is very simple and only creates some divs (which will be manipulated), and a table with a bunch of lines.
The css is then applied, so all the images load, and show the pretty stuff.
I’ve added comments to my code, so I think it’s pretty simple to follow it. I’ll be using this same code for a next example which will add a little more functionality to it. In the meantime, you can check the working example or download the code.
And that’s my take on it. Obviously someone might have a better way of doing it, so if you do, by all means  bring it on, and I shall update this post.
Hope you enjoy it!

MangoBlog 1.4 Released and Important notes

Reading time: 3 – 5 minutes

I’m probably late on this one, but mangoBlog v1.4 has just been released. From the changelogs:

What’s new in version 1.4

  • Revisions of posts and pages are now stored and user can “restore” an older version
  • Added a permission for users to not to be able to access the administation (thanks to Seb Duggan)
  • Added a replacement for Verity search to search in database
    directly (this search now includes comments). It is the default search
  • Plugin settings are now stored in database, which should make it easier to migrate a blog
  • TinyMCE editor upgraded
  • Configuration file now has placeholders for base path so that directories do not need to be hardcoded in configuration file
  • Ability to disable or enable threading
  • Plugins made for ColdFusion 8 only can extend org.mangoblog.plugins.BasePlugin without including BasePlugin in their own folder
  • Friendly URLs for author archives

Changes in theme tags:

  • Added a descending order option for the comments tag
  • Enhanced Posts tag to be able to show posts for a given author
  • AuthorProperty tag can now output the name of the role of the author
  • Added AuthenticatedAuthor tag that allows the theme to know if the current visitor is logged in


  • Post pagination and search
  • Session will be maintained while user is writing a post or page
  • Added permission to manage pods and to run blog updates
  • Drafts now always “float” to the top of the list
  • Ability to remove plugins
  • Added “beforeAdminPageContentEnd” event to the bottom of the page
    edit screen and “beforeAdminPostContentEnd” to the bottom of the post
    edit screen
  • Ability to manually set the post URL (thanks to Seb Duggan)
  • Added more functionality to BasePlugin to make it easier to write plugins.
  • Plugins can now run their own upgrade method when a new version is installed via the administration
  • Paging for authors screen
  • Cosmetic changes: Add ons renamed to Plugins, go directly to edit
    mode after adding a new post or page (thanks to Seb Duggan), changed
    Pod Manager icon

Updates to new installs:

  • Added new plugin that allows keeping the old BlogCFC URLs functional
  • Added sample data
  • Include CFFormProtect (enabled by default instead of Captchas)
  • New default theme called Cutline
  • New installs on Railo will now have an error on main page (thanks to Andrea Campolonghi)

Plugins updated:

  • formRememberer (included in update)
  • CFFormProtect (not included in automatic update)

Bug fixes:

  • Solved some compatibility issues with Railo
  • Fixed XSS vulnerability (themes need to be updated to take advantage of this)
  • Preview link was wrong in future posts
  • Comments are now rejected if comments are closed for a post or page
  • Error when entering an empty search string
  • Error when not using friendly URLs
  • and more…


Now, for those who are using Railo and are updating via admin interface. There is a bug with the mango updater and Railo, Laura (Mango blog’s developer) explains:
“This is a known issue with Railo (we should report it, since it is an incompatibility with CF). I thought 1.3.1 included the fix, but apparently not.
Open file components/Updater.cfc and change line 436 from


More info can be found here:
Mango 1.4 upgrade bug / Railo 3.1 / Centos 5

Railo 3.1.1 released

Reading time: 2 – 2 minutes

Railo 3.1.1 Relased
Railo has just been released and is available at
From the changelogs:

  • [ RAILO-163 ] cfexecute and arguments containing spaces (Linux)
  • [ RAILO-257 ] Railo will not start – start/stop shells contain ^M characters
  • [ RAILO-275 ] Binary arguments to Railo treated as array
  • [ RAILO-302 ] CFHTTP PUT sends corrupted binary data in body
  • [ RAILO-342 ] Query/Array Rows not Bracketed; on large volumes causes slow performance and poor UI [FDAPI]
  • [ RAILO-347 ] Unable to create remote clients in
  • [ RAILO-349 ] Mapping stripped from CFCATCH.MissingFile value
  • [ RAILO-356 ] Spelling Error in upgrade script
  • [ RAILO-359 ] Problem with CF_SQL_CHAR type
  • [ RAILO-360 ] XML lost when serializing an XML document to JSON
  • [ RAILO-361 ] java.util.Calendar
  • [ RAILO-362 ] ordered keys in struct dump
  • [ RAILO-364 ] Error when using cf_sql_numeric with floating number
  • [ RAILO-365 ] Query bracketing does not have correct row numbers in drill down [FDAPI]
  • [ RAILO-366 ] Misspelled struct key on exceptions
  • [ RAILO-368 ] serialize xml
  • [ RAILO-370 ] Query Exception Compatibility: SQL
  • [ RAILO-372 ] Query Exception Compatibility: Datasource

To update your current installation, simply access Railo Server Administrator, select the left item on the menu called “update“, and make sure the URL is set to be ““. Simply click update, and the available updates will be shown.
Click the button called execute updates, and wait for about 10 seconds while it does all the work for you.

Useless Information: Why is it called Railo?

Reading time: < 1 minute

Rhylo or Railo

According to Michael Offner-Streit (Railo CTO) at the Railo user Group:

“Railo is the name of the first alien dog ever seen in Star Trek. His name is Rhylo and because my english is not very good I have written it wrong, Sorry ;-)”

Which leads to an interesting question:

How do you pronounce Railo?

Older posts