Archive for the 'WordPress' Category

List of FriendFeed users who talk about WordPress

The nice folks at WPCandy have come up with a great idea to dedicate a day to thank everyone behind WordPress and also to encourage WordPress fans to blog about WordPress and share their favorite tips and tricks.

Today (July 1st ) is known as the unofficial WordPress day, where fans from all over the world can thank the people behind WordPress and also can express their love for WordPress. They are also running an event and have some nice giveaways. All you have to do is to let everyone know why you love WordPress by leaving a comment at WPCandy or write a blog post about WordPress.

So instead of writing a post explaining why and how I love WordPress (which I have already done), I thought of sharing some information which will be useful for people who are interested in WordPress. So here we go.. :)

Sometime ago Weblog Tools Collection published a list of Twitter users whom you can follow to get updated information about WordPress.

Nowdays I use FriendFeed more than Twitter (I have to confess this sometime). So I tried to find their corresponding FriendFeed usernames so that I can subscribe to them. The following is the list with their real names first, followed by their Twitter user names and then followed by their FriendFeed usernames.

The following are some of my additions to the list which was not originally published by Weblog Tools Collection.

I will try to keep the list updated and let me know if you feel I need to add someone else to this list. Till then happy FriendFeeding and my heart felt thanks to Matt and the team for an excellent product without which this site may never exist :)

Happy Birthday, WordPress

Today WordPress (the blogging software which I love) has turned 5. I have been running this site on WordPress for nearly two and a half years now. Thanks to Matt and the other developers for a wonderful product.

PS: Frequent readers of my blog would have noticed that I am not very active these days; things are going fast in my personal life and the posting frequency will soon be normal. :-)

WordPress 2.5 is out

The wait is finally over. :) The most waited version of WordPress, Version 2.5 is out. WordPress 2.5 was in the making for nearly 6 months now and it has lot of new features and most importantly, changes to the admin screen. You can also view the screencast discussing the new admin pages from the WordPress development blog.

I am going to update my installation now and this blog might appear clunky while I am doing that. I have installed WordPress using svn so it is just a single shell command for me to update. Thanks to Joost, I converted my installation into a svn installation when WordPress 2.2.2 was released.

By the way this will be my last post using the old admin screens, I will post my experience with the new admin screens in a couple of days. Meanwhile if you have a self-hosted WordPress blog, then I highly recommend you to update to WordPress 2.5. Happy upgrading ;)

No Browse Happy Plugin

There was a thread in the WordPress hackers mailing (wp-hackers) list today discussing about the browse happy logo which is displayed in the footer of WordPress admin screens, when a user views the admin pages using Internet Explorer.

There were lot of arguments for and against the removal of this logo, at least for IE7. I found that there was even a ticket created in trac (WordPress public bug reporting database) for removing it, which was closed by Matt as wontfix. I personally felt it was a very minor thing to argue about and I neither agree nor disagree in removing it.

Someone in the thread suggested that we can create a Plugin which could output some CSS to hide the logo, which let me to create a very small (probably useless) Plugin called No Browse Happy Plugin. This is similar to the No Howdy Plugin by Ozh, very useless in my point of view but might matter a lot for someone.

If you look at the source code you could find that it is nothing fancy but just an echo statement which prints the following CSS code in the header.

#bh {
display: none;
}

In short, I just wasted two minutes to stop someone from wasting hours in arguing about something which is useless (at least in my point of view). :-)

Reverse the order of comments without editing theme

I was looking for a way to reverse the order in which comments are displayed in a WordPress blog for one of my projects. After a bit of Googling I found a Plugin called Reverse Order Comments. A quick look into the source code revealed that it was rewriting the comment template and you need to edit the theme to make it work. My instinct told me that it would be easy to accomplish it using the array_reverse comment in PHP.

I followed my instinct and tried to see whether it is possible to do it in a simple way. In the end I accomplished it with less than 10 lines of code and more importantly without the need to edit the theme files. Another instance of the KISS principle in action ;-)

I packed it as a Plugin so that you can just drop it into your plugins directory, activate it and then forget about it. It is called Simple Reverse Comments and you can download it from my Plugins page.

Year End Stats for 2007 (Graphs)

When I published my year end stats, little did I know that numbers alone doesn’t matter much, unless they are presented in an easily-to understand manner.

So here I am representing the same numbers but in a much more understandable manner, with some support from the excellent Google Chart API, which I learned during pipesCamp.

Number of posts

You could see that the number of posts has almost dropped by 40% in 2007. There were 64 posts in 2006 where as only 38 in 2007. One reason for this is that lot of unexpected things happened in my personal life which took me away from the computer and the other reason is that I got busy and free time became a rare commodity for me. So this is an area where I should improve.

Number of comments

Again, as with the number of posts, the number of comments was also less by around 40%. There were 394 comments in 2006 but only 220 in 2007. This also includes my own comments; maybe I should represent my comments separately.

Average number of characters in posts

This graph clearly shows that average number of characters in my posts. Even though I have written fewer posts in 2007, the average number of characters has increased, which is good (which also means that I have become very talkative ;) ). This is very good and is also motivating. In 2008 I should keep up the length of the posts and at the same time should also try to increase their number.

Total number of characters in posts

This graph clearly shows that even though I have written fewer posts, I have almost written the same amount of characters in 2007 when compared with 2006, which is again motivating.

I have really become addicted to stats now and will try to dig more deep into my blog to unearth other valuable information when I get some time. This explains why everybody was soo fascinated by Yuvi’s cool graphs.

Meanwhile you can also publish your yearend stats by using my Year End Stats WordPress Plugin. So what does your yearend stats speak about your blogging habit? Please leave a link to your yearend stats in the comments so that I can have a look at it.

PS: I would really love to see how Yuvi has scaled up this year. May be Yuvi, do it when you find time in between your exams.

Year End Stats for 2007

Publishing year end stats seems to be the new fashion and so here are the year end stats for my blog.

  • Total number of posts in 2007: 38 Posts
  • Total number of comments in 2007: 220 comments
  • Average length of posts in 2007: 3048.03 Letters
  • Total length of all posts in 2007: 115825 Letters

By the way this is very low when compared to my previous year (2006) stats

  • Total number of posts in 2006: 64 Posts
  • Total number of comments in 2006: 394 Comments
  • Average length of posts in 2006: 1813.16 Letters
  • Total length of all posts in 2006: 116042 Letters

I guess it is right time that I start writing more on my blog. So here goes my first resolution for the year 2008, write more in my blog. :)

I have also created a WordPress Plugin called WP Year End stats which you can use to get stats for your blog.

Wish you all a happy new year :)

Embedding Flickr Photos in WordPress

I found some great photos on Flickr which were taken during pipesCamp, which I attended last week. I tried to embed them in this blog, but couldn’t figure out how to do it. I have to admit that I am not a Flickr power user. I have been trying for almost an hour now and so I thought of seeking the help of my readers.

Can anyone please let me know how to get the HTML code from Flickr to embed individual photos in other websites? I don’t want to hotlink directly to the picture but want to get the HTML code like youtube. I know picasa provides this option. I could even get hold of a screenshot of the HTML embed code in Flickr, but the author is discussing about a different issue.

So any Flickr power user out there who can help me?

Meanwhile you can check out the pipesCamp photos directly from Flickr.

WordPress and MySQL character encoding

Recently I moved my WordPress blog to a new server. I took the dump of the old database and imported it into the new MySQL server. Everything was fine except that I stated getting some strange characters in my posts. For instance I was getting (Nov — 3rd — 2007) instead of (Nov - 3rd - 2007).

It took me lot of research and googling to find the solution and so I thought of sharing it here so that it would be helpful for others who might face the same problem.

First I raised a support request in WordPress, but didn’t get a reply. After some googling, I found that it was due to wrong character set in my new MySQL server. Instead of having utf8 as the character set the MySQL database server was running in the default latin1 character set.

I changed the character set in the MySQL my.conf file and also in the wp-config.php file of WordPress and re imported the tables. Even this didn’t solve my problem. Later I found that there were certain characters in my wp-posts table which were encoded in latin1 character set even though the table is set to utf8 character set.

I then exported the table using a tool called Heidisql (which is by the way an excellent alternative to the command line MySQL client). I then opened the sql file in a text editor and changed all instances of latin1 to utf8 (basically a find/replace). I saved the file and imported the tables again and the junk characters are gone. :)

So the lesson learned the harder way, KEEP EVERYTHING IN UTF-8, ABSOLUTELY EVERYWHERE, FROM DAY ONE. You’ll be glad you did some day.

WordPress 2.1 - More editing options in WYSIWYG editor

Update: This blog post is outdated. Use TinyMCE Advanced WordPress Plugin instead.

Chris Kasten has found an Easter egg in WordPress 2.1 which enables many advanced buttons and options in your WYSIWYG editor. To get these advanced buttons you need to press alt-shift-v in Firefox or alt-v in IE. Pressing the same keys again hides it. Nice find right? But it will only work if you have enabled visual editor in your user profile.

After reading about it I was trying to find out whether it is possible to enable it by default. After some googling I found this thread in WordPress Support forum. To enable these advanced buttons by default, you need to fiddle with some files in the wp-includes folder. The tiny_mce_config.php file in the wp-includes\js\tinymce directory to be exact. You need to open the file directly and remove the ‘wp_adv_start‘ and ‘wp_adv_end‘ present on line 31. (Do this only if you are brave at heart ;-) ).

When I was testing the change I noticed that WordPress 2.1 also missed the ‘Edit HTML source’ button which was available in the previous versions. This made me to search the TinyMCE documentation and there I found that TinyMCE has lot of other formatting options too. And after some fiddling I have picked up all those buttons which I may use.WordPress WYSIWYG Editor buttons

This is how my editor looks now. If you want all these options start editing your tiny_mce_config.php file or just grab my file and put it in the wp-includes\js\tinymce directory. (Be warned I am not responsible if something breaks ;-) and don’t forget to backup your original file). Also remember that next time you update your WordPress installation this file could be over written.

The new buttons which I like are

  • Paste as simple Text
  • Plase from Word
  • Format cleaner
  • Insert Customer Character
  • Subscript, superscript

There are still some more buttons and options available and if you want to use them, then have a look at TinyMCE manual and change your config file accordingly. Meanwhile I will try to find out whether it is possible to have a WordPress plugin do it so that you don’t need to edit your file manually and till then happy hacking ;-)

Next Page »