More Blog Work

When I was editing the post for our CO Trip, I saw the size of my backup file grow by over 50 MB! This was f’d up, since I posted about 30 pictures but they were all streamlined for the web. Some digging revealed that a plugin I was using to resize images for presentation to 480×640 was actually making a new copy of the image every time the post was saved. Moreover, the new imaging features in WordPress 2.5 made this plugin redundant. I found that they plugin directory was housing almost 200MB in jpgs – half the size of my entire website! Deactivating the plugin and not using it moving forward was easy, but before I could delete its directory I had to cycle back through my entire blog and remove all the code that called it. This meant removing\readding hundreds of images over about 400 posts. I’m currently upto December ’07, and cause I got bored, started working backwards to July ’08. The pluses out of all this are that I’m also moving all video off my site and upto Vimeo, fixing some creeping DB errors, shrinking the size of the whole site way way way down, making pageloads faster, and getting to re-read all my old shit.

Hollow comfort for the hours this is taking me. The task reminds me of a few years ago when I made the massive effort to accurately tag and rip our entire MP3 collection from the mishmash of files we had accumulated over the years.

In the course of updating all this, I found that the imagescalar plugin was also affecting some of my smilies, which meant I had to redo several dozen for one post or lose them when i slayed the plugin’s directory. The smiley panel I added to the WYSIWYG editor had this annoying habit of closing after each click, in addition to being too small and forcing me to scroll all over to see all my smilies.   Sooooo…I revisted that code as well. WordPress 2.5 bundled TinyMCE, where previously I was using a crappy hacky plugin to get the smilies into my editor. When I updated to 2.5, I skipped the plugin and installed the code directly from the TinyMCE website.   Of course I did not write down what I did, and TinyMCE has since evolved. It seems I used only 1 file to do the core of the work — emotions.htm, and added some javascript methods from some utility files directly into it to initialize and launch the plugin. Every version of TinyMCE does this a little differently, but the code works in a variety of configurations. I got the button to appear in my editor by tweaking tiny_mce_config.php. Yesterday I figured out how to dictate the size of the popup-window by adding my own resize method to tiny_mce_popup.js.   It probably should have been local to emtions.htm, but whatever it worked. Finally I commented out the automatic window closing which lets me add multiple images with many fewer clicks.

All this made possible by my servers at work locking up and our systems group taking a long time to get em working.

I’ve thought a lot about the benefits of a product like WordPress which is open-source, and all the fiddling I need to do to get things working, and constantly reworking it as the codebase evolves.   However, I don’t think it’d be much better to go with a “commercial” product that has periodic releases – its the Web, you will still be customizing whatever you have.   The issue really is the webmaster, not the codebase.

1 Comment

Leave a Reply