Travelling to US

Well guys, got an quick update for you all.

I am leaving to Sunnyvale CA tomorrow morning for a business trip and will be back just before Christmas. Since it is a business trip, I would be busy during the weekdays and should be free only during the weekends. I haven’t made any plans for the weekends yet, but let’s see how things turn out to be.

This is my first international travel and I am pretty excited about it. Got any tips for the first time traveller? 🙂

Posted in Travel/Trek | Tagged , | 8 Comments

WordPress Plugin Development: Beginner’s guide – Review

Sometime back, people from Packt Publishing contacted me asking whether I will be interested in reviewing their latest WordPress related book titled WordPress Plugin Development: Beginner’s guide by Vladimir Prelovac. Since the book suited my interests and also the topics which I write in this blog, I accepted, but got busy with RoloPress. Finally, I found some free time to read the book and here is my review. 🙂

Disclaimer: I just received a free copy of the ebook (in pdf format) for review. There was no condition that the review should be only positive and also I didn’t receive any payment for the review. So I am just writing what I felt about the book after reading it.packtpub-wordpress-plugins

About the author

As most of you would know the book’s author Vladimir Prelovac is a popular WordPress Plugin author who does WordPress development as a full time job. He is the “Been there, done that” kind of guy for anything related to WordPress (themes, Plugins, security etc.) and we can be sure that he knows what he is talking about (which is evident from the book).

About the book

The book consists of 8 chapters in which the author dissects and discusses about 6 of his Plugins explaining the code and concept behind them. The first chapter is a general introduction and in the eighth chapter he discusses about post-development activities for the Plugin like generating pot files, generating readme files, deploying etc.

Each Plugin (chapter) deals with different aspect of WordPress Plugin development like social bookmarking, using JavaScript and AJAX in Plugin, Widgets, shortcode API, custom templates, extending TinyMCE, custom post types etc.

Positives about the book

As Ozh says, this book is great for beginners who want to get their hands dirty and quickly learn the concepts behind WordPress Plugins. It can quickly put you on track and from where you can easily be on your own. (Even I wish I had something like this 4-5 years ago when I initially started with WordPress Plugin development)

In each chapter, the author gives a brief explanation about the Plugin and then gradually converts it into code. After each code listing he explains what the code does and how it does it, which would be very useful to grasp the fundamental concepts behind WordPress Plugin development.

Things which are not too good (for me)

The major thing which caught my attention was that, the book is slightly outdated in certain places. It doesn’t mean that the code in the book will not work, but what I mean is that there are certain new and better ways to do things. For instance, using old methods to parse RSS Feeds, having hardcoded paths to wp-content and wp-config.php file etc. Even some of the screenshots are pre 2.7

I wouldn’t blame the author or the publisher for it, because this is bound to happen to any technical book. But I would be really happy if there could be a v2.0 of the book with these changes. 🙂

The other thing which I didn’t like about the book is that most of the code samples doesn’t follow WordPress coding standard (especially camelcase function names). This is just a matter of personal preference but I would have loved if the author followed the recommended coding standards, since this book is meant for beginners.

Final Verdict

So my final verdict is that if you are a beginner or Intermediate WordPress Plugin developer then this book is a must have. It will easily get you on track.

Links

Posted in Books, WordPress | Tagged , , | 2 Comments

RoloPress – WordPress based contact manager

I have been dropping hints about a secret project which I have been working on for quite some time and now it’s time to reveal it.

RoloPress

The secret project was RoloPress, a WordPress based, open source contact manager, which I was developing with my friend Steve Bruner. The main distinction of RoloPress is that it is an application build on top of WordPress and is not a separate application with is tied up with WordPress.

Continue reading »

Posted in Events/Conferences, WordPress | Tagged , , , | 17 Comments

Google Wave invites available

Well, I guess now is the time for me to decide my top 20 dear friends 😉

Got around 20 Google Wave invites to share and if you want one, then send me your email address either by sending an email, or by posting a comment below or by sending a DM in Twitter (BTW I am sudarmuthu in Twitter), or by snail mail or by sending the note in a dove or by whichever way that is faster. 🙂

Will send them on first come first served basics and off course you can bribe me 😉

While you are waiting for your invite (or if you already got access), you can also checkout my other posts regarding Google wave.

Update:

For all those who left a comment below, I have invited you. But it seems that the invites are not sent in real time. This is the response from Google. So I guess, you might have to wait for sometime, before waving 😉

Google Wave is more fun when you have others to wave with, so please nominate people you would like to add. Keep in mind that this is a preview so it could be a bit rocky at times.

Invitations will not be sent immediately. We have a lot of stamps to lick.

Happy waving!Invitations will not be sent immediately. We have a lot of stamps to lick.Happy waving!"

Update 2:

Sorry guys, I have run out of invites. Will let you know if I get some.

A request for those who got invites from me. I would really appreciate if you could spare some of your invites for those who have commented.

Posted in Google/Yahoo | Tagged , | 86 Comments

Plugin to display WordCamp NYC Badge

I guess, I am getting addicted to writing WordPress Plugins. 🙂

I was looking at the WordCamp New York Badge page and thought it would be nice to have a Plugin to display the badge, so after 30 minutes or so, WordCamp NYC Badge WordPress Plugin was born.

You can see it in action in my sidebar. 🙂

PS: If you are wondering why I am interested in WordCamp NYC, then do wait for another 3 weeks 😉

Posted in Plugin Releases | Tagged , , , | 4 Comments

Log every email send through WordPress

As promised, I have created a new Plugin called Email Log which will log every email that is being sent through WordPress. This Plugin will be very useful, while debugging issues related to email and will also let you to find out whether any spammer is abusing your WordPress installation. This Plugin is also MU compatible and can be used in WordPress MU installations also.

Features

Viewing logged emails

The logged emails will be stored in a separate table and can be viewed from the admin interface. While viewing the logs, the emails can be filtered or sorted based on the date, to address, subject etc.

Deleting logged emails

In the admin interface, all the logged emails can be delete in bulk or can also be selectively deleted based on date, to address, subject.

Cleaning up db on uninstall

As recommended by Ozh, the Plugin has uninstall hook which will clean up the database when the Plugin is uninstalled.

Screenshots

The following screenshot shows how the logged emails will be displayed

view-wordpress-email-logs

This screenshot shows how the email logs could be filtered or sorted.

wordpress-email-log-filter-options

This one shows how the email logs could be deleted.

wordpress-email-log-delete-options

Download

You can download the Plugin from the Plugin’s home page.

Feedback

As usual try out the Plugin and do let me know if you have any feedback, queries or comments.

Posted in Plugin Releases | Tagged , , , | 1 Comment

Lessons from WordPress Plugin competition

As you may know already (and if you don’t, dude, follow me) I participated in the recent WordPress Plugin competition. The results are out and even though my Plugins were not selected, I received a much more valuable gift. Guess what, a detailed review of all my five Plugins by my favorite WordPress expert and a great inspiration Ozh.

The following are the lessons that I learned from the reviews

  • The details that you enter in the Plugin’s page like Plugin Description, screenshot, installation instructions, FAQ, example usage etc, but really help you to get more users for your Plugins
  • When you are using PHP 5+ only features, make sure that you have a fall back mechanism and correct warning to users.
  • When making calls to API’s it is better to use the built-in WP_Http class instead of CURL or sockets
  • Don’t hardcode the Plugin directory or file name, some users may change it, which might break your Plugin.
  • Similarly don’t hard code wp-content directory path. Some users might move their wp-content directory to a different path which might again break your Plugin.
  • If you need scripts or CSS, to be included, then include them only to the pages that need them and not to all pages.
  • If you are creating a table or storing too many options in db, then it is always better to provide an uninstall hook to clean this stuff when the Plugin is delete by the user.

I am guilty of most of them and I am in the process of modifying my Plugins to fix these issues and over a next couple of days you could see updates to most of my Plugins.

It’s always nice to get feedback for your work from someone whom you respect and in that way I am really very happy that I participated. Thanks Ozh for your time and feedback and WTC for sponsoring the competition and wishes for the winners.

Posted in WordPress | Tagged , , | 8 Comments

WordPress MU and BuddyPress Plugin competition – 2009

Similar to the WordPress Plugin competition conducted by Weblogs Tools Collection, WPMU is coding a WordPress Plugin competition for WordPress MU and BuddyPress.

All you need to do is to create a (awesome) WordPress MU or BuddyPress Plugin and then release it. 🙂

Dates

The competition is open till Friday October 16th.

Prizes

There are some cool prices and the first prize winner will be get a cash award of $1000.

Rules

The rules are similar the WordPress Plugin competition and the main thing to remember is that your Plugin should be in GPL or GPL-compatible licence.

So it’s time to start another WordPress project. 😉

BTW guys, I am looking for ideas. So if you wanted a Plugin for WordPress MU or BuddyPress, then let me know and I might be able to create it for you. 🙂

Posted in WordPress | Tagged , , , , | 3 Comments

Retrieving posts and pages based on title in WordPress

Update: The get_page_by_title() function now includes a third parameter that allows you to specify the post_type. You can use this parameter to get pages, posts or custom taxonomies. The below function is no longer needed.

Recently, I needed to retrieve posts and pages in WordPress based on their title. I digged into WordPress code to find out the function that can do it, but to my surprise, I found out that there isn’t a function that could work both for pages and posts.

Some people might argue that the easy way is to query the database directly, but I generally try to use a build-in function if available rather than querying the database directly.

After some poking around in the wp-hackers maling list and #wordpress irc channel, I used the following code in my Plugin. I thought of sharing this here, so that it could be helpful to others.

Retrieving pages based on title

For pages, there is a built-in function get_page_by_title() which we can use. The code would be

Retrieving posts based on title

For posts, we don’t have a built-in function. We have to manually query the database. I have written a function which can do this.

Retrieving multiple posts based on title

If you have more than one post with the same title, then the above function will return only the first post. If you want to retrieve all the posts which have the title, then you can use the below function. Thanks Jerry.

Including this as part of the core

As I said before, I always prefer to use a built-in function rather than querying the database directly. I am planning to add a new ticket to WordPress trac to add this function to the core. Will keep you all updated about the ticket status.

Update: I have created a ticket in WordPress trac, to add this function to the core. Let’s hope it gets to the core.

Posted in WordPress | Tagged | 31 Comments

Ability to sort posts, in Posts By Tag Plugin

I recently updated my Posts By Tag Plugin, to v 0.4

New Features

The main new feature of this update is that, now you have the option to choose the order in which the posts should be displayed in the widget. The credit for this feature goes entirely to Michael, because he is the one who code it. He sent me the modified file and I have just checked it into the Plugin’s SVN and modified the Readme file. (Can anyone expect more 😉 ) Thanks Michael.

Screenshot

The following is the screenshot of the widgets page where now you have to option to choose whether the posts should be displayed in ascending or descending order by date.

posts-by-tag-settings

Download

You can download the latest version of the Plugin from the Plugin’s homepage.

Feedback

Please keep the feedback coming and if you want me to add any new features or find a bug, please leave a comment.

Vote for the Plugin

If you have used this Plugin and like it, please vote it and help me win the WordPress Plugin competition.

Posted in Plugin Releases | Tagged , , | 2 Comments