Why not use Joen’s, you might ask? It kills your page load times – a failing he acknoledged. This plugin avoids that.
There is a trade off, this plugin will increase the time it takes for a user to post a comment, but we’re talking, 2-3 seconds. Perhaps a version or two down the line I can eliminate that slow down as well.
Anyway, here’s what it does:
Place a customer “favatar” next to each users comment. Favatars are based on a users favicon. (Read more about this in Joen’s post.)
When a user posts a comment, the script kicks in. If they have entered a URL, the script will attempt to download the HTML page from that url. With that HTML page, it will extract the “src” attribute from the “link” element. (If no link element exists, then the favicon URL is guessed)
At this point, the plugin will actually ping the favicon url to see if we got it right, then upon success store that URL in the ‘comments’ table.
Useage is very simple: just add
<?php comment_favicon(); ?>inside your comment loop just link any other comment template function. All set!
Let me know if you use it.
Also, I hope to create a “catch up” function that will allow you to scan all previous comments and run the script on them to generate favatars for them. Expect that later.
- The topic ‘Favatar-Revised Plugin Released’ is closed to new replies.