I realize I’m getting in the dead horse beating side of automatic avatar creation plugins but brainsolid asked for a plugin to generate binary avatars that looked like the text from the matrix and I figured it wouldn’t take too long to change WP_Identicon over to it. Of course, then other things came up and I managed to take quite a while to get around to it but it’s done now so here is WP_Texticon. It generates avatars with an array of colored characters. It’s sort of hard to describe so it’s probably easier to just show a few examples.
So I guess it’s mostly for anyone that likes that text in the Matrix, writing about code (with 0 and 1’s or 0-9 and A-E if you want to get fancy) or biologists (give every commenter their own DNA sequence with ATCG) or maybe general literature (with some random letters and a white background).
Features
- Dynamically generated avatars for each commenter
- Matrix/DNA/Binary-like text array icons
- Customizable character selection
- Gravatar support
- No theme edits necessary
Current Version:
Installation instructions:
Unzip wp_texticon.zip
. Upload wp_texticon.php and the texticon
folder. Make sure the texticon
folder is writable. If your unzipping program creates a wp_texticon
folder please only upload the contents (wp_texticon.php
and the texticon
folder). That should be it. Texticons should now appear next to your commenter’s names.
You can adjust the background colors, the type and number of characters making up the Texticons and CSS in the Texticon Control Panel. If you’d like to change the fonts used for the characters, add or remove any Truetype Fonts (files that end in .ttf
) you’d like to the texticon/fonts
folder. You can also clear the Texticon image cache in the control panel.
For Advanced Users:
For even more control, you can disable the automatic placement in the Texticon Control Panel and add an Texticon to any comment with texticon_build($comment->comment_author_email, $comment->comment_author);
. For example, find the comments.php
of your current theme (it should be in the folder wp-content/themes/[currentThemeName]/
). Open it up and look for something similar to foreach ($comments as $comment)
. Inside this loop there should be code that displays the comment author’s name or metadata like <p class="comment-author">
or <p class="comment-metadata">
. Just before all this enter:<?php if (function_exists(texticon_build)) echo texticon_build($comment->comment_author_email, $comment->comment_author); ?>
If you would prefer to base the Texticons on the commentor’s IP address instead of the commentor’s email just replace $comment->comment_author_email
in the above with $comment->comment_author_IP
.
ScottS-M | 27-Mar-08 at 1:12 am | Permalink
Just testing.
Scott | 27-Mar-08 at 1:15 am | Permalink
Still me. Different email.
brainsolid | 27-Mar-08 at 3:52 am | Permalink
Oh.My.God.
Scott, It’s awesome. Thank you veru much for this great plugin!
brainsolid | 27-Mar-08 at 3:58 am | Permalink
I have just one problem – gravatars are not shows for some reason.
ScottS-M | 27-Mar-08 at 8:47 am | Permalink
Oops. I always miss something. Forgot a
$this->
. Should be fixed now.brainsolid | 27-Mar-08 at 5:18 pm | Permalink
thanx)
One more advice, if you wish modernize this plugin.
It will be excellent, if you will make support of LJ userpics, like in plugin “Gravatar (and userpics)” (http://wordpress.org/extend/plugins/gravatar-and-userpics/).
I mean this structure:
LJ userpic (if not)=> Gravatar (if not)=> WP_Identicon generated avatar
ScottS-M | 28-Mar-08 at 11:26 am | Permalink
That’s a good idea. I’ve never messed with LiveJournal so I’ll have to check out that plugin. Now that I’m up to three avatar generation plugins, it’s getting a little silly to cut and paste code between all of them. Once 2.5 comes out, I’ll probably throw them all together into one big plugin, update for WP2.5 and throw in LJ stuff at the same time.
brainsolid | 30-Mar-08 at 8:26 am | Permalink
it will be cool)