I Want WordPress Red T-Shirt!

WordPress Red T-Shirt

How cool is this! WordPress Shop is now selling WordPress red t-shirt worldwide. It’s gonna cost about RM100.00 including shipping for Malaysians. For the rest of the world, the t-shirt costs £9.50 and delivery is £4.50 but if you share with friends the delivery cost would be (£4.00 x Quantity) + X where X is between £0.50 – £0.10 according to my calculations 😉

The t-shirt is of high-quality made by American Apparel. I have to order it soon before the stock is finished!

Have you ordered yours?

WordCamp 2007

So the next weekend I will be flying to San Francisco to attend WordCamp 2007 on 21-22 July. This event is a 2-day conference for WordPress users and developers. The first day will focus on how to be a better blogger, the second on the development and future of WordPress.

Yeah right! Did you believe me? I am sorry I was really imagining how cool will it be if I can attend the event. Maybe next year. 😀

The actual event I will be attending during 21-22 July is my company’s team building activity in Pulau Pangkor, Malaysia. It will be fun (trying to console my own self).

WordPress 2.2.1 Upgrade

I have just finished upgrading this blog and 6 others maintained (not owned) by me. The transition from 2.2 to 2.2.1 is generally very smooth, as there’s no database changes involved. I simply uploaded only the changed files as listed here.

I am rushed to upgrade to 2.2.1 since there is a lot of security bugs in 2.2, and seeing some blogs have been brutally cracked, I promised myself to steal some time to upgrade during this weekend. A very recent attack was on HongKiat.com, a full time blogger in Malaysia.

So please don’t wait, upgrade immediately!

Other than that, notice anything else missing from this blog?

WordPress 2.2

WordPress 2.2 has just been released about 14 hours ago. There are a lot of new goodies with this release, among the big ones are Integrated Widgets, Full Atom support, New Blogger importer, Infinite comment stream, protection against plugins or edits that will break your blog, and also a hook for a future WYSIWYG support in Safari.

There are a bunch of new features for developers too. Looks like I will have to check my simple random posts widget plugin whether it still works in 2.2.

WordPress 2.2 also marks the total obsoleteness of my blogger rss import plugin 😉

Now I have to find time to upgrade all blogs I maintain. I own only one blog, though.

WordPress Plugin: Random Posts Widget

My better half was complaining that she can’t find a suitable plugin for displaying random posts on her sidebar. I tried to look myself, and there were some references to the plugin but nowhere to be found. One good plugin I found is Random categories with random posts by Mike Stickel but it uses categories which is not what we are looking for. Also, it requires tinkering with PHP codes which is not suitable for less technical bloggers.

So I went to analyze his code for a little while. What the heck, I’ll just create a simple widget version with no categories involved. So I took about 30 minutes to write this simple code with not so many options. It is a widget and configurable in the Sidebar Widgets page:

Random Posts Widget configuration

  • Widget title: the title of the widget
  • List types: ul for bulleted list, p for paragraph, br for paragraph with line breaks
  • Before title and After title: you have to find out what your theme uses before and after the widget headers. A simple way to do this is to identify a currently existing widget in your site and viewing the source. Find the title and see what is printed before and after. For example it might show as <h2>Widget Title</h2> which is used by most themes.
  • Post count: Number of random posts you would like to be displayed

Basically that’s it. It’s really a simple widget.

I don’t like to reinvent the wheel but since I can’t find any I just have to create one myself. Most probably I will have not so much time to maintain this plugin, but it is suitable if you are looking for a (very) simple plugin to display random posts.

You can download it from WordPress Plugins Directory: Random Posts Widget, or view online here: randomposts.php

Current Version: 1.5.0

Installation

Copy the file to the wp-content/plugins/widgets directory and activate it in the Plugins page. Then drag and configure it in the Sidebar Widgets page.

Warning: Will only work on widgets enabled blogs.

Change Log

  • 07-May-2007: Fixed a bug of displaying widget before and after tag
  • 14-Jun-2007: Fixed a bug where pages are also selected. Now it only displays posts.
  • 26-Jun-2007: Removed before and after configuration options, now taken from theme settings. Was broken for some themes with embedded class in the header tags. Reported by Guohua. Thanks.
  • 03-Aug-2007: Overhauled entire engine to optimize queries. This has been tested on a test blog with 50,000 posts on an old machine (Pentium III 600MHz) in maximum 3 seconds. Also removed duplicated results and added category to choose.
  • 04-Aug-2007: Fixed a bug where wrong permalink was displayed.
  • 10-Aug-2007: Fixed a bug where if 1 post count is selected an error occurred.
  • 27-Sep-2007: Added ability to detect database version (WordPress 2.3 has database changed) while maintaining backward-compatibility with 2.2.x

Automated WordPress Backup

Since I am maintaining several WordPress installation now, I feel that it is quite a tiring chore to backup the databases every now and then. I used to do it once a week, and it is even a recurring event in my pocket PC. It was WordPress Database backup 0.8 and every time I clicked on the link on the plugin page, the site is no longer there. I thought Skippy was doing maintenance and because of other commitments I let the thought go.

A few days ago, I was thinking of writing an automated plugin, and I searched for it first not to reinvent the wheel. I found it at a different site: http://www.ilfilosofo.com/blog/wp-db-backup, and learned that the plugin has changed hands from Skippy (Scott Merrill) to Austin Matzko.

I was excited to learn that the new plugin support the cron hook provided by WordPress 2.1. Yay! And the plugin worked flawlessly:

WP DB Backup

One thing you might want to take note is that the cron event is not a real, system cron event but it is triggered when your site is accessed. I noticed that when I installed and configured the email function on a newly set up installation (hence no traffic) it didn’t work until I access the site.

The plugin can also be configured to save the backup files to the server, but of course this is not recommended because of security reasons.

Have a try, I believe you’ll love it. However do remember to also backup your image files separately!

FeedBurner Feed Replacement

If any one of you just updated to the newer version of WordPress, make sure that you also update to the latest version of the plugin.

A fellow blogger encountered this error on WordPress 2.1.x yesterday, as he still had the version 2.1 of the plugin.

This is caused by the removal of generate_page_rewrite_rules function in WordPress 2.1

I checked the 2.1 version of the plugin and indeed it is calling to the function at line 43. Version 2.2 of the plugin had this removed.

WordPress 2.1.1 and 2.0.9

Hey, did anyone realize that there’s an upgrade available? Or February is the busiest time for everyone?

WordPress 2.1 is upgraded to 2.1.1 while WordPress 2.0.7 is upgraded to 2.0.9.

Files changed in 2.1.1 from 2.1:

  • wp-includes/post-template.php
  • wp-includes/cache.php
  • wp-includes/formatting.php
  • wp-includes/category.php
  • wp-includes/post.php
  • wp-includes/version.php
  • wp-includes/js/scriptaculous/wp-scriptaculous.js
  • wp-includes/js/tinymce/tiny_mce_config.php
  • wp-includes/js/tinymce/wp-mce-help.php
  • wp-includes/js/tinymce/tiny_mce_gzip.php
  • wp-includes/capabilities.php
  • wp-includes/cron.php
  • wp-includes/functions.php
  • wp-includes/bookmark-template.php
  • xmlrpc.php
  • wp-admin/admin-ajax.php
  • wp-admin/admin-functions.php
  • wp-admin/custom-header.php
  • wp-admin/options-general.php
  • wp-admin/edit.php
  • wp-admin/index-extra.php
  • wp-admin/options-reading.php

Files changed from 2.0.7 to 2.0.9 (version 2.0.8 was tagged for Debian, but never announced):

  • wp-includes/cache.php
  • wp-includes/wp-db.php
  • wp-includes/version.php
  • wp-includes/js/tinymce/wp-mce-help.php
  • wp-includes/js/tinymce/tiny_mce_gzip.php
  • wp-includes/classes.php
  • wp-includes/functions.php
  • wp-includes/rss-functions.php
  • readme.html
  • wp-admin/edit-form-advanced.php
  • wp-admin/link-import.php
  • wp-admin/link-categories.php
  • wp-admin/user-edit.php
  • wp-admin/options-permalink.php

This time I not going to upgrade yet, as if something is broken I can’t fix it right away 😀

About The New Blogger Import Plugin

I wrote a plugin to import everything that can be found from the feeds Blogger provides. Many people has emailed me since asking me why I would do such a thing, as Blogger is a great platform for bloggers. This is my answer to all of those questions.

Why do you write this script/plugin?

A simple answer to this is that my better half wanted to migrate to WordPress and she has accidentally accepted the offer to upgrade to the New Blogger (Blogger Beta back then). Next, I was looking for ways to maintain my coding skills in PHP as for the past 3 years I have been working in System Administration and security.

Do you hate Blogger/Google that much?

No I don’t hate them. In fact, I love Google so much that I am willing to work for them if given the chance 😉 I love all Google products, but when it comes to blogging I feel restricted using Blogger. I migrated my blog from that system when it had only two posts. I hope Google does not think I hate them (perhaps that’s why my pagerank stays static).

Why don’t you integrate the Haloscan import into your plugin?

Why should I re-invent the wheel? Justin has written a very good tool to do this.

Do you think it’s suitable to call it a plugin?

No. Other plugins will be used and upgraded as time goes but for this one, you can remove it after you’ve finished importing. Call it a disposable plugin if you desire.

Will this plugin work forever?

No. If Google decides to change a tag inside the feeds, the whole plugin will fall apart. When that time comes, I might or might not have the time to provide an immediate fix. So if you want to do it, I suggest not to wait.

I’ll add my answers from time to time to this post, if I receive any more. Till then, have a nice weekend.

Plugin: Import New Blogger To WordPress

Update #3 (26 April 2007): This plugin has been broken by changes made to feeds on Blogger, and is pretty much unusable anymore. The download links are still there so if you want to try it anyway you can do so. Try to see the method described in TechCounter (the last one) for a good method. Theoretically this would work but I have not tried it. Good luck!.

Update #2: Only 500 posts can be imported via RSS (Blogger limited the RSS feed to only contain 500 max posts). Check out comment 181 and 191 below for suggestions.

Update: This plugin is now known as Blogger RSS Import instead of New Blogger Import.

Back in December, I created a stand alone script to import Blogger Beta to WordPress. I didn’t really expect that many will benefit from it until I received so many comments and bug reports. So here is the improved version, as a plugin. Many improvements were done especially at the database side where WordPress functions are utilized, and there’s no security issue anymore.
Continue reading Plugin: Import New Blogger To WordPress

WordPress 2.1

Wow! That was fast. WordPress 2.1 has been released. Users of my Blogger Beta importer, please be aware that the script might not work with WordPress 2.1

I shall have to look into it later.

Update: A kind soul tested the script to a fresh install of WordPress 2.1 and it still works.

Update: This blog has also been updated to WordPress 2.1 without many complications. Only 2 of my plugins failed.

A Sneak Peek at WordPress 2.1

I do keep track of the subversion repository and the latest I just updated from the server is 2.1 beta4. I can see lots of improvements for the management interface although I don’t have the time to take a look at the internals yet. The interface runs smoother and faster – or is it just psychology? 😉

Anyway one of the most obvious upgrade is the image uploading form – feel likes AJAX. I say feel because like I said I didn’t look at the codes. Navigation of images are insanely fast, better than the current inline uploading used by 2.0.x series. Here’s a snapshot:

WP2.1 Upload

I love it!

I think version 2.1 beta4, like its counterpart 2.0.7 also fixes the FeedBurner problem as I no longer receive feed medic alerts. Thumbs up to WordPress.

WordPress 2.0.7 Security Update

There’s a new update for WordPress: version 2.0.7

Most of you who are currently using WordPress would be able to see it on your dashboard. This is a very minor upgrade, involving these files:

  • wp-admin/inline-uploading.php
  • wp-admin/post.php
  • wp-includes/classes.php
  • wp-includes/functions.php
  • wp-settings.php
  • wp-includes/version.php

Download it now.

Useful WordPress Plugin: WordPress Suicide

WordPress Suicide is a useful plugin, particularly if you are running tests on your freshly installed WordPress.

Also, if you are trying to import your posts and comments from the New Blogger this could prove useful – if you are unlucky to have problems during your import. Some people succeed the first time, but some do have problems.

As for the importer, I am trying to find time to update it to include features that were requested by users. Currently I can only fix important bugs, if found. It’s currently in version 0.5.

If I had found this plugin earlier I would have recommended it too.

Google Analytics Plugin Not Showing

Well, this is not a complaint to the great plugin, but for some themes.

Themes like Intense, and AquaGreen does not have any wp_footer call so the tracking code will not show. How to fix it?

Open up themes/[themename]/footer.php and add <?php wp_footer(); ?> before </body> resulting in:


<?php wp_footer(); ?>
</body>
</html>

Hope this helps. I discover this after 5 minutes of head scratching. 😉