The power of Globally Recognized Avatar (aka Gravatar)

How to, PHP, Resources, Reviews, Tips and Tricks, Tutorials
Gravatar has a very sleak concept but not many people know and understand it. It is one place for your display pictures and you can use the same at any Gravatar enabled website / application. Gravatar is currently used in Wordpress, Movable Type, Drupal, Joomla and Mac OS X Addressbook. Advantages are mainly on the user end where he/she can change one photo and reflect it in multiple places. It includes support for content-rating etc. Here, I will show how it is implemented in PHP [php] $email = "my-email@hotmail.com"; $default = "http://www.somewhere.com/homestar.jpg"; $size = 100; $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5(strtolower($email)). "&default=".urlencode($default). "&size=".$size; [/php] Now use it in your HTML as [sourcecode language="xml"]<img src="<?php echo $grav_url; ?/>" width="< ?php echo $size; ?>" alt="Gravatar" />[/sourcecode] Simple!! More info at the URLs below http://en.gravatar.com/site/implement/ http://en.gravatar.com/site/implement/php…
Read More

Monitors Subversion repositories for new commits

Flickr, How to, OpenSource, PHP, Resources, Reviews, Thoughts, Tips and Tricks
As the website says Monitors Subversion repositories for new commits and shows a notification to the user when that happens. Download Commit Monitor @ Google Code. It is a great tool that helps me monitor when a new commit has been made to SVN by a developer working on the same project as I am :), cool na? P.S. Its a Windows tool
Read More

CakePHP – link / include JavaScript files in layouts

JavaScript Libraries, OpenSource, PHP, Resources, Tips and Tricks, Tutorials
Create (or modify the) file [code lang="plain"]app/app_controller.php[/code] add this code [php] class AppController extends Controller { var $helpers = array('Html', 'Form', 'Javascript'); } [/php] CakePHP 1.2 allows you to define a reference to a Javascript file which is then added to the head section of the generated code. For this purpose the variable $scripts_for_layout has to be added to the layout: [php] <head> < ?php echo $scripts_for_layout; ?> </head> [/php] In the view you can now link to the Javascript file with: [php] $javascript->link('script.js', false); // OR you can simply use $javascript->link('script.js'); [/php]
Read More

A Bug in WordPress v 2.5.1

Flickr, OpenSource, PHP, Reviews, Thoughts
A Bug in Wordpress v 2.5.1, originally uploaded by asim.zeeshan. Excerpts from PHPCommunity I discovered a BUG in Wordpress Version 2.5.1, the forgot password sends you an email with the "key" that is supposed to generate a new email but the "key" itself contains characters like "&" which appends to the URL like query string and wordpress gives an error that the "key" is invalid.
Read More