WordPress plugin botching

Ever since I started using computers, I’ve been trying to improve the programs I’ve been using.
The main reason for me to start programming Java, C# and PHP is the very same, and after me blogging with WordPress it has not changed a bit.

I got tired of the regular tinyMCE-editor which is built in to the blogging software, and tried to do something about it when I stumbled upon Dean’s FCKeditor plugin. Great work there, and I’m still a happy user.
After that, uploading images became a nuisance, as creating thumbnails is not a standard option in WordPress. In come Flexible Upload, a true work of art. It, however has two flaws, of which at least one is critical for me.
It always shows pictures with a nice blue border around it, and it doesn’t work with a FCK editor.

I’ve botched up fixes for both problems, of which at least the first is truly *not* good programming practice. Oh well, here goes.

Locate flexible-upload-js.php, which usually resides in /plugins/flexible-upload/ , download it to your computer and open it in your favorite text editor. 

Find line number 342 and modify it to [source:php]h += ‘border="0" />’;[/source]
Scroll down to line 385, and add below it a new line 386 with [source:php]var oEditor = win.FCKeditorAPI;[/source]
Scroll down some more to line 389, and add to new lines 390 & 391: [source:php]} else if ( typeof oEditor != ‘undefined’ ) {
oEditor.GetInstance(‘content’).InsertHtml(h);[/source]

Now save the file, and re-upload it to get it all working.
Refresh your blogeditor, and enjoy limitless uploading and posting bliss!
Happy posting!

Please note: this has been verified and tested on WordPress 2.3, with FCKeditor 2.4.3 and Flexible Upload 1.9
It should work on your setup, but I cannot guarantee anything 🙂