Archive for April, 2008

Default gravatars wordpress plugin

Wordpress 2.5 has a native support for comment avatars via the gravatar service. When a theme which supports avatar is used, for each comment a small image retrieved from the gravatar service is added to the comment whenever the commentor (based on his e-mail) has a configured image with the service. For commentors which do not have such an image a standard image was displayed.

This week the gravatar guys had announced that they have integrated the functionality of three wordpress plugins, which created a random avatar for commentors without an gravatar, into their service.

The aim of this plugin is to expose this new functionality. You can configure it to use one of three methods to generate random avatar - wavatars (kind of faces), monsters, and geometric shapes.

When using the monster algorithm the comment section might look like this

You can select which random avatar type to use in under the Settings >> Default gravatar type window

Requirements:

Wordpress 2.5

Installation:

Download this file, unzip it, and upload the defaultgravatars directory into the plugins directory of your blog. Now go to the plugin management panel, and activate it. Next go to the Settings >> Default gravatar type window and select the type of random avatar you wish to use.

License: BSD.

Fancy editor for the text widget

The wordpress text widget is wrongly named as it is actually an HTML widget, capable of hosting not only plain text, but also HTML markup.

People who know basic html can easily use it in the text widget, but the advice given to the casual user was “write what you want in the post editor, go to the HTML tab, and copy the HTML to the widget”. For those people this plugin brings the editor right into the text widget.

As the image above indicates, the fancy editor allows you to change the foreground and background color of a text, its size, make text bold, italic, underlined or with a strike through, and lets you insert links and images.

Since the plugin do not make any change in the text you enter, you can turn off the plugin at any point in time without losing your data. After turning the plugin off you will simply see the raw HTML when editing the widget.

Requirements:

Wordpress 2.5

Installation:

Download this file, unzip it, and upload the fancytextwidget directory into the plugins directory of your blog. Now go to the plugin management panel, and activate it.

License: BSD.

How to reset a wordpress 2.5 password when you can’t get emails

If you are using a good non trivial password for your wordpress blog, then it is very likely that at some point in time you will forget it. This is not a real issue as long as you can go to your login page and request that a new password will be generated and sent to your e-mail account, but sometimes you either don’t have access to your mail, or the server is not configured to send mails. If you are in this unfortunate situation you need a method to bypass the normal wordpress password administration procedures.

For pre-2.5 wordpress versions, all you needed is an access to your server’s phpmyadmin, and you could follow the simple instructions at devlounge to reset your password. Since the 2.5 the method in which passwords are being hashed when stored at the database had changed, and the hashing is no longer a simple MD5. More then that, the hashing function is now pluggable (can be overridden by a plugin) which means that there is no more a uniform way to calculate the hash results as was described at the devlounge article.

The following script pass-calc solves this problem by calculating a password hash using the relevant functions from your wordpress installation. All you have to do is download the script, install it at your wordpress root directory, and run it by navigating to {your wordpress url}/calc-pass.php.

The script will ask you to enter the new password, and will generate an hash code for it. This hash code should be stored at your database by following the same instructions described in the devlounge article.

The script intentionally does only the calculation and do not update the database as this can be a security breach.