New Theme

So I’ve finally upgraded to WordPress 2.6.5. Nothing new that I’ve really noticed yet.

I’ve also taken this opportunity to change my theme. The one I’ve decided to go for now is simpleX. I’ve also considered Clean Home and Pixeled, but both had their quirks which I couldn’t think of a easy way to over come.

Given that, I still had to make some changes to simpleX where it did not play nice with the Most Viewed and Recent Comments widgets. I had to add the following to my CSS stylesheet for it to actually render okay:

#recent-comments li {
   background: url(images/meta.gif) no-repeat 5px 7px !important;
   padding: 5px 5px !important;
   padding-left: 20px !important;
}
.recentcomments a {
   background: none !important;
}
.recentcomments a:hover {
   color: #333 !important;
   text-decoration: none !important;
   background: #E8C8C8 !important;
   border-bottom: 1px solid #c47373 !important;
}
#most-viewed li {
   background: url(images/meta.gif) no-repeat 5px 7px !important;
   padding: 5px 5px !important;
   padding-left: 20px !important;
}
#most-viewed a {
   background: none !important;
   display:inline !important;
   padding: 0 !important;
}
#most-viewed a:hover {
   color: #333 !important;
   text-decoration: none !important;
   background: #E8C8C8 !important;
   border-bottom: 1px solid #c47373 !important;
}

Given this chance, I also went through my blogroll and friends list and purged any link that was no longer working or haven’t updated in some time.

I’m still not 100% sure I’m going to stick with this theme yet. I dig the simplistic view. Maybe all it needs a new header image. 🙂

Update: I’ve also ended up disabling new user registrations and purging users I did not recognize. If you used to have an account and can no longer sign in, do let me know. I had several hundreds of user registrations and most of them were fake. They probably expected to be able to spam better if they had registered an account.

Update #2: Added more padding to the Most Viewed and Recent Comments, along with the little gears icon.

Update #3: Borrowed some icons from famfamfam.com. Didn’t really think gear cogs represented posts and comments that well.

WordPress Visual Editor Changes My HTML Code

I have a love/hate relationship with WordPress’ Visual editor. The editor can be great sometimes. Other times it can be a pain. I already disable “WordPress should correct invalidly nested XHTML automatically” as their definition of nested XHTML doesn’t really cover everything XHTML supports.

So if you noticed, I’ve began to recently embed flash videos into my blog posts, something I’ve avoided doing for some time since it doesn’t really fit well with my theme, which I’m in the market of changing. Still searching for one that I’d like. I recently switched to the Green Light theme for my HD-Trailers.net Blog, but I’m not sure if I want to have that here at Krunk4Ever!

I love the fact that when you try to add an image, it’ll automatically fill in the height/width and allows me to set alignments and etc. However, for everything else, I usually use the HTML editor which allows me to put in code directly.

Anyway, today’s blog post is how frustrating the Visual Editor can be some times. The main problem started because I started embedding flash videos into my blog post. I like my webpages to be XHTML valid, and for those who have this gene, you’ll know that most flash code websites provide are XHTML invalid. I found out how to modify it. Basically the <embed>...</embed> is invalid and I have to add a few attributes to the <object> tag.

For example for this video on YouTube (Lime in the Coconut), the embed code they provide is:

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

To make it XHTML compliant, you covert it to:

<object width="425" height="344" type="application/x-shockwave-flash" data="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"><param name="movie" value="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

Resulting in:

<object width="425" height="344" type="application/x-shockwave-flash" data="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"><param name="movie" value="http://www.youtube.com/v/BUG8A8e8KC0&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param></object>

Just for kicks, here’s the video:

If you watch House, M.D., you’d recognize this song, which was hilarious!

However, if you switch to the Visual editor and back to the HTML editor, WordPress decides that your flash code should look like this:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/BUG8A8e8KC0&hl=en&fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/BUG8A8e8KC0&hl=en&fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object>

It removed my type and data attributes, stuck in the classid and codebase attributes, and then re-added the embed block back in. WordPress strives to create XHTML compliant code (hence the check to correct any invalid nested XHTML), but why re-add the embed block which is XHTML non-compliant?!?!? I found it annoying and basically the flash video would have to be the last thing I add or else the code gets “corrupted”.

I tested the newest version of WordPress (2.6.5) and this issue still exists. I found the following threads where people have been complaining about this issue:

It appears the WordPress folks have no plans on fixing this issue as they’re suggesting to use one or the other completely and don’t switch between editors. I’m generally okay with that approach, but on my HD-Trailers.net site, I have multiple people editing posts and can’t really enforce one editor for everyone. I have a SQL script I run every few days to fix some stuff that “disappears” after a post gets edited.

Others have suggested using a different visual editor, but it doesn’t seem that any is that great…

I have a hunch that the embed code is needed for flash to work on IE6, but if you’re surfing the web and still using IE6, you don’t deserve to see the flash content on my site. ;p

Update: Another common thing I do is insert <div align="center">...</div>, so stuff are aligned in the center, but switching between between the Visual and HTML editor removes the divs. It’s actually quite annoying.

Weekly Top Posts (7/26/2008 to 8/2/2008)

Here’s this week’s top post:

  1. How to download HD Trailers from Apple.com
  2. Six Flags Discount (~50% Off)
  3. 4 Free Xbox Live Arcade Games
  4. Last Week: #6 Print USPS First Class, Media Mail, Parcel Mail Postage for FREE!
  5. Free AutoCheck Report (Similar to Carfax)
  6. Last Week: #4 Windows Update Error: 80070490
  7. Last Week: #8 Lenovo Thinkpad X61 Tablet – Review
  8. Last Week: #7 Reindexing Media Center Library
  9. Last Week: #10 Missing Codecs in Firefox to Play Video in Gallery2
  10. Last Week: #9 Six Flags Discount (One-Day Adult Admission at Child’s Price)

Previously…

Nothing outstanding this week.

Weekly Top Posts (7/20/2008 to 7/26/2008)

Here’s this week’s top post:

  1. How to download HD Trailers from Apple.com
  2. Six Flags Discount (~50% Off)
  3. Last Week: #4 4 Free Xbox Live Arcade Games
  4. Last Week: #5 Windows Update Error: 80070490
  5. Last Week: #6 Free AutoCheck Report (Similar to Carfax)
  6. Last Week: #3 Print USPS First Class, Media Mail, Parcel Mail Postage for FREE!
  7. Last Week: #10 Reindexing Media Center Library
  8. Last Week: #7 Lenovo Thinkpad X61 Tablet – Review
  9. Six Flags Discount (One-Day Adult Admission at Child’s Price)
  10. Last Week: #8 Missing Codecs in Firefox to Play Video in Gallery2

Previously…

Nothing outstanding this week.

Weekly Top Posts (7/13/2008 to 7/19/2008)

Here’s this week’s top post:

  1. How to download HD Trailers from Apple.com
  2. Six Flags Discount (~50% Off)
  3. Last Week: #4 Print USPS First Class, Media Mail, Parcel Mail Postage for FREE!
  4. Last Week: #3 4 Free Xbox Live Arcade Games
  5. Windows Update Error: 80070490
  6. Free AutoCheck Report (Similar to Carfax)
  7. Last Week: #10 Lenovo Thinkpad X61 Tablet – Review
  8. Last Week: #7 Missing Codecs in Firefox to Play Video in Gallery2
  9. Six Flags Discount (One-Day Adult Admission at Child’s Price)
  10. Last Week: #8 Reindexing Media Center Library

Previously…

Nothing outstanding this week.

Weekly Top Posts (6/29/2008 to 7/12/2008)

Just realized that I forgot to post last week’s top posts. Here’s the last 2 weeks’ top posts:

  1. How to download HD Trailers from Apple.com
  2. Six Flags Discount (~50% Off)
  3. Last Week: #4 4 Free Xbox Live Arcade Games
  4. Last Week: #9 Print USPS First Class, Media Mail, Parcel Mail Postage for FREE!
  5. Windows Update Error: 80070490
  6. Free AutoCheck Report (Similar to Carfax)
  7. Missing Codecs in Firefox to Play Video in Gallery2
  8. New Reindexing Media Center Library
  9. Last Week: #8 Six Flags Discount (One-Day Adult Admission at Child’s Price)
  10. New Lenovo Thinkpad X61 Tablet – Review

Previously…

Nothing too out of the ordinary here. I would like to point out the fact that if I had a done a post last week, More Free Tracks for Guitar Hero III and Rock Band would’ve placed #8 (almost all who visited came through SlickDeals)

Weekly Top Posts (6/22/2008 to 6/28/2008)

Here’s this week’s top post:

  1. How to download HD Trailers from Apple.com
  2. Six Flags Discount (~50% Off)
  3. New New Bedroom Set
  4. 4 Free Xbox Live Arcade Games
  5. Last Week: #3 Windows Update Error: 80070490
  6. Last Week: #5 Free AutoCheck Report (Similar to Carfax)
  7. Missing Codecs in Firefox to Play Video in Gallery2
  8. Last Week: #10 Six Flags Discount (One-Day Adult Admission at Child’s Price)
  9. Last Week: #8 Print USPS First Class, Media Mail, Parcel Mail Postage for FREE!
  10. Last Week: #6 Weezer – Pork and Beans Music Video

Previously…

Still super busy, had to work both days this weekend, so posts will still be dwindling in. Anyway, we have a new comer this week: New Bedroom Set solely due to a Craigslist listing: 5 piece cal king bedroom set – $999 (Guthrie, OK ). The bedroom set he’s selling isn’t the one I have, but was one which I considered and posted pictures of.

Weekly Top Posts (6/15/2008 to 6/21/2008)

Here’s this week’s top post:

  1. How to download HD Trailers from Apple.com
  2. Six Flags Discount (~50% Off)
  3. Last Week: #5 Windows Update Error: 80070490
  4. Last Week: #3 4 Free Xbox Live Arcade Games
  5. Last Week: #4 Free AutoCheck Report (Similar to Carfax)
  6. New Weezer – Pork and Beans Music Video
  7. Last Week: #9 Missing Codecs in Firefox to Play Video in Gallery2
  8. Last Week: #6 Print USPS First Class, Media Mail, Parcel Mail Postage for FREE!
  9. Last Week: #7 Reindexing Media Center Library
  10. Six Flags Discount (One-Day Adult Admission at Child’s Price)

Previously…

Nothing too interesting to point out here. I do have a few blog posts I’d like to write, but unfortunately I’m in crunch mode this week and probably won’t have time to write it.

Weekly Top Posts (6/8/2008 to 6/14/2008)

Here’s this week’s top post:

  1. How to download HD Trailers from Apple.com
  2. Six Flags Discount (~50% Off)
  3. Last Week: #4 4 Free Xbox Live Arcade Games
  4. Last Week: #7 Free AutoCheck Report (Similar to Carfax)
  5. Windows Update Error: 80070490
  6. Print USPS First Class, Media Mail, Parcel Mail Postage for FREE!
  7. Last Week: #10 Reindexing Media Center Library
  8. Last Week: #9 LeekSpin
  9. New Missing Codecs in Firefox to Play Video in Gallery2
  10. New Six Flags Discount (One-Day Adult Admission at Child’s Price)

Previously…

Looks like Six Flags Discount (One-Day Adult Admission at Child’s Price) finally made it to the top 10.

Upgraded to WordPress 2.5.1

So after many months of WordPress complaining that I should upgrade from 2.3.1, I’ve finally decided to upgrade. What prompted this action was the fact I was trying to do a review on 時をかける少女 (The Girl Who Leapt Through Time) and the stupid blog would convert all my unicode characters to ???????? (question marks).

I have no idea what’s wrong since Krunk4Ever.com runs on the same WordPress version and does unicode fine. I decided to try upgrading to WordPress 2.5.1, but the unicode problem still exist.

Searching online, I found WordPress, Unicode, and ‘?’s and it turns out Krunk4Ever.com’s wp-config.php was so old, it didn’t have the following defined:

define('DB_CHARSET', 'utf8');
define(’DB_COLLATE’, ”);

When I commented that out from HD-Trailer.net’s wp-config.php file, I was able to do unicode, but all my existing blog entries that had non-standard characters now became funky (white question mark inside a black diamond). There didn’t seem to be a simple search and replace where I could fix the problem. The underlying problem appears that when WordPress first created the database, the text data type it set as default was latin1 instead of utf8.

Searching a bit more, I found: Converting Database Character Sets on WordPress.org’s site. So a brief read revealed this is exactly what I wanted. I wanted to convert my existing latin1 text to utf8 text. So I jumped to the solution and start altering tables, which wasn’t as simple as it looks. Those …for all other tables/columns… really gets to you.

Half way through the process, I found that I screwed up. Apparently I was suppose to convert LONGTEXT to LONGBLOB, and not just BLOB. Guess I should’ve read all the instructions first. Thankfully, I had backed up my database as it instructed. And I guess I should’ve scrolled further as under solution was Conversion Scripts and Plugins. Grrrrr.

I installed the UTF-8 Database Converter plugin, read the readme.txt FULLY, activated the plugin and started the conversion. BAM! Everything works now. Even though there were big red warning signs saying this plugin was meant for 2.1-2.2, it worked on 2.3.1 and 2.5.1 w/o any problems.

Back to WordPress 2.5.1. The admin UI has completely changed. It’s definitely prettier, but I dislike the fact that they’ve moved a bunch of stuff I’ve been accustomed to the side (such as categories) to below the post. And since I run on a 1920×1080 resolution monitor, this is leaving about half my screen white, basically wasted space.

However I really appreciate the fact that Save no longer refreshes the page. Same with a bunch of other post editing functions.

Another awesome thing is that plugins now support updating from within the admin panel! No longer do I need to deactivate the plugin, download the plugin, overwrite the existing plugin, and reactivate it. In one click, it now goes fetches the plugin and automatically upgrades it on its own!

I wonder if they’ve supported upgrading WordPress like this yet…

Anyway, if I find anything more interesting, I’ll let you know!

Also, if you see any funky characters, please let me know too. Thanks!