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 :D

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

  1. Download the plugin archive and expand it.
  2. Put ‘author_highlight_ext.php’ file into your wp-content/plugins/ directory.
  3. Go to the Plugins page in your WordPress Administration area and click ‘Activate’ for Author Highlight eXt.
  4. Still in WordPress Administration area, go to the Options » Author Highlight eXt page, and input your CSS style name.
  5. 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 :)

AddThis Social Bookmark Button Lintas Berita Button

  1. 21 Responses to “Plugin Author Highlight (eXtended Version)”

  2. Hi there, it’s me… again :lol:

    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

  3. nightfalcon » thanks for ur info nf, and I already fixed the download link to v1.5

    By wawan on Feb 11, 2008

  4. 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

    By Nightfalcon on Feb 10, 2008

  5. Hmm.. :???:

    Does not make the changes to the comments although i made the classes in the CSS right (like the alternated comment) :cry:

    .commentlist li

    { background: url(”img/comback3.gif”) #fff; margin: 5px 0; padding: 10px; border: solid 1px #4193ab; }

    .commentlist .alt

    { background: #fff; margin: 5px 0; padding: 10px; border: solid 1px #4193ab; }

    .commentlist .author

    { background: url(”img/comback4.gif”) #fff; margin: 5px 0; padding: 10px; border: solid 1px #c1993a; }

    Got any hint for me, somebody?

    By Nightfalcon on Feb 9, 2008

  6. 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 :D

    By wawan on Nov 22, 2007

  7. 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

    By David on Nov 22, 2007

  8. Imna give this plugin a whir in a sec!

    Airline News’s last blog post..Ryanair’s row with London’s Stansted Airport

    By Airline News on Nov 21, 2007

  9. Great Plugin! Outstanding

    By Airline News on Nov 21, 2007

  10. Great plugin! Thanks a bunch.

    MissDanni’s last blog post..Spam Protection

    By MissDanni on Nov 19, 2007

  11. Jhon Kolbert » thanks jhon, hope you like it.
    ry » dulu aku juga manual gitu kok mas :D

    By wawan on Nov 11, 2007

  12. 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

    By rd Limosin on Nov 11, 2007

  13. 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

    By John Kolbert on Nov 11, 2007

  1. 9 Trackback(s)

  2. Apr 26, 2008: WP Plugin Archive » Author Highlight (eXtended Version)
  3. Apr 18, 2008: WordPress Plugins - WordPress ???? 11?11? - WordPress???
  4. Nov 25, 2007: WordPress Plugins - WordPress ???? 11?11? - WordPressCHINA - WordPress???
  5. Nov 22, 2007: HOLIDAY DESTINATION GUIDES » Blog Archive » WordPress Plugin Releases for 11/11
  6. Nov 22, 2007: WordPress Plugin Releases for 11/11 | HOLIDAY DESTINATION GUIDES
  7. Nov 12, 2007: ???11??wordpress?????plugin? | ????
  8. Nov 11, 2007: ???????? » Author Highlight Extended Version
  9. Nov 11, 2007: BlogBroker » WordPress Plugin Releases for 11/11
  10. Nov 11, 2007: Weblog Tools Collection » Blog Archive » WordPress Plugin Releases for 11/11

Post a Comment