Plugin Author Highlight (eXtended Version)
When I first release this plugin, I used bahasa Indonesia to explain it to the reader, now I’ll write it again in English but don’t worry, it’s gonna be very brief
This is a plugin that prints out a user-specified class attribute if the comment was made by a REGISTERED USER, that’s why this plugin not only for blog with one author, but also for blog with multi blogger.
Featured automatic detection for all user, with an option page for easy configuration, and now with additional option to let the plugin automatically put the code to your template. Don’t forget these, optimized query to handle tens or hundred of comments.
All you need to do is to edit your CSS file and configure how the CSS class stylish your page. Maybe you want to change the background image or color, change the text or url behave, is up to you, no limit of what you can do.
Base on Jonathan Leighton Author Highlight plugin.
Installation
- Download the plugin archive and expand it.
- Put ‘author_highlight_ext.php’ file into your wp-content/plugins/ directory.
- Go to the Plugins page in your WordPress Administration area and click ‘Activate’ for Author Highlight eXt.
- Still in WordPress Administration area, go to the Options » Author Highlight eXt page, and input your CSS style name.
- Edit your CSS style file, and set the style.
How to Stylish Your Comment Manually?
This is only if you want to stylish your comment manually, because usually you can just let the plugin do it for you.
- First, you need to find the perfect place for your CSS style to be applied in your theme comments.php file. This place must be inside the comment loop.
- Second, put a code to call ‘author_highlight_ext’ function in that place.
1 2 3 4 5 6
<?php if(function_exists('author_highlight_ext')) { author_highlight_ext(); } else { echo 'comm_panel'; } ?>
“else { echo ‘comm_panel’; }” code is an optional code that echoing the default CSS style for a comment, it is the same with the default CSS style we put in the Admin page, we only need this to make sure that our template will not broken even if the plugin was not installed.
- Third, edit your CSS file, and put your CSS style in there.
See these following example for more options.
Highlight Comment Header
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?php foreach ($comments as $comment) : ?> <div class='<?php if(function_exists('author_highlight_ext')){ author_highlight_ext(); } else { echo 'comm_panel'; } ?>'> <b><?php comment_author_link() ?></b> on <?php comment_date('j F, Y') ?> at <?php comment_time() ?> # </div> <div class='comm_text'> <?php if ($comment->comment_approved == '0') : ?> Your comment is awaiting moderation. <?php endif; ?> <?php comment_text() ?> </div> <br /> <?php endforeach; /* end for each comment */ ?> |
Highlight Comment Text
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?php foreach ($comments as $comment) : ?> <div class='comm_panel'> <b><?php comment_author_link() ?></b> on <?php comment_date('j F, Y') ?> at <?php comment_time() ?> # </div> <div class='<?php if(function_exists('author_highlight_ext')){ author_highlight_ext(); } else { echo 'comm_text'; } ?>'> <?php if ($comment->comment_approved == '0') : ?> Your comment is awaiting moderation. <?php endif; ?> <?php comment_text() ?> </div> <br /> <?php endforeach; /* end for each comment */ ?> |
Update per November 10, 2007, v1.5
# Optimizing the query to database with collecting all blog registered user email address in one run, that’s make a checking for is it a comment from registered user or not, are done without need to requery to database. This is great if you have tens or maybe hundreds of comments.
# Add new option, whether you want to edit your template manually or let the plugin do it for you?
#Add plugin manual to the bottom of the admin page.
If you enjoyed this post, please subscribe to my blog RSS feed, and thanks for stopping by :)

21 Responses to “Plugin Author Highlight (eXtended Version)”
The plug-in doesn’t seem to work with WP2.5, any chance to have it fixed in near future?
Would be great. Thanks in advance!
Nightfalcons last blog post..Zucchini-Puffer
By Nightfalcon on Apr 20, 2008
By wawan on Feb 11, 2008
This gives me full functionality to automatically insert the hightlighting, and it works fine.
You should edit/correct the download-link to the right file, this helps a lot
Nightfalcon’s last blog post..Teachirt.de - kostenloser Versand
By Nightfalcon on Feb 10, 2008
Does not make the changes to the comments although i made the classes in the CSS right (like the alternated comment)
Got any hint for me, somebody?
By Nightfalcon on Feb 9, 2008
By wawan on Nov 22, 2007
David’s last blog post..#8 On Google But No Money
By David on Nov 22, 2007
Airline News’s last blog post..Ryanair’s row with London’s Stansted Airport
By Airline News on Nov 21, 2007
By Airline News on Nov 21, 2007
MissDanni’s last blog post..Spam Protection
By MissDanni on Nov 19, 2007
ry » dulu aku juga manual gitu kok mas
By wawan on Nov 11, 2007
rd Limosin’s last blog post..Tentang Tautan di Blog ini
By rd Limosin on Nov 11, 2007
John Kolbert’s last blog post..The Future of JS-Kit: My Interview with CEO Khris Loux
By John Kolbert on Nov 11, 2007