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).
- Dynamically generated avatars for each commenter
- Matrix/DNA/Binary-like text array icons
- Customizable character selection
- Gravatar support
- No theme edits necessary
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