Plugin Author Highlight (eXtended Version)
Nov 11th, 2007 | | My Projects, Plugins
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.
Related Entries:
Random Entries:
feel free to leave a comment
Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs are automatically generated. Off-topic or inappropriate comments will be edited or deleted. Email addresses will never be published. Keep it PG-13 people!
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">
All fields marked with " * " are required.





































22 people have left comments
Looks like like a nice plugin. I’m using one similar right now, but I think I’ll give this a try. Thanks for your hard work!
John Kolbert’s last blog post..The Future of JS-Kit: My Interview with CEO Khris Loux
kalo ak ubah sendiri code nya. Nge-cek kalo kita login dan berkomentar, maka muncul tulisan: Author Comment
rd Limosin’s last blog post..Tentang Tautan di Blog ini
[...] fixes and everything about blogging, especially with Wordpress. Go ahead, subscribe to our feed!Author Highlight Extended Version prints out a user-specified class attribute if the comment was made by a registered [...]
[...] Author Highlight Extended Version prints out a user-specified class attribute if the comment was made by a registered user. [...]
Jhon Kolbert » thanks jhon, hope you like it.
ry » dulu aku juga manual gitu kok mas
[...] Plugin Author Highlight (eXtended Version) | WordPress @ mimpikami.com [...]
[...] Author Highlight Extended Version prints out a user-specified class attribute if the comment was made by a registered user. [...]
Great plugin! Thanks a bunch.
MissDanni’s last blog post..Spam Protection
Great Plugin! Outstanding
Imna give this plugin a whir in a sec!
Airline News’s last blog post..Ryanair’s row with London’s Stansted Airport
I am going to give this a try tonight when I get home, thanks
David’s last blog post..#8 On Google But No Money
[...] Author Highlight Extended Version prints out a user-specified class attribute if the comment was made by a registered user. [...]
[...] Author Highlight Extended Version prints out a user-specified class attribute if the comment was made by a registered user. [...]
Airline News, David » thanks for your comments, please try it and let me know. I’ll add an additional fitur when I have a spare time
[...] Author Highlight Extended Version ??????????????????????????? [...]
Hmm..
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?
I found the error myself.. the download leads t othe old version 1.2, the source shows version 1.5, which i copied and uploaded.
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
nightfalcon » thanks for ur info nf, and I already fixed the download link to v1.5
[...] Author Highlight Extended Version ??????????????????????????? [...]
Hi there, it’s me… again
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
[...] WordPress Plugin Author Highlight (eXtended Version) ordnet jedem registriertem Autoren eine eigene CSS Klasse zu, die dem Autorennamen in einem [...]
[...] Author Highlight Extended Version ??????????????????????????? [...]