WP Plugin: Official Comments

I just whipped up a quick WordPress 1.2/1.5/2.0 plugin that allows you to distinguish comments made by WordPress users. It also will automatically approve comments made by WP users.

Current Version: 1.1

How It Works:
If you are logged into your WordPress admin panel, and you make a comment, the plugin will see that you are an official WP user of your blog and mark the comment with your WP User ID.
When the page is rendered, that User ID is called up by the plugin functions, which you can use to change text, change CSS class, add images, whatever your imagination desires.

Installation
Either:

How to implement:
Simply add this somewhere within the Comments loop in wp-comments.php and/or wp-comments-popup.php:

<?php if(is_wpuser_comment() != 0) {echo "Official ";} ?>

Or get tricky and add a CSS Class to the LI:

<li class="comment <?php echo (is_wpuser_comment() ? ' commentOfficialUser' : ''); ?>" id="comment-<?php comment_ID() ?>">

and this very basic css example:

.commentOfficialUser { border: 1px solid black; background-color: #999999 }

Documentation
View Official Comments Readme.txt

Examples
There is a very basic example on this post, but more exciting examples available at Webfroot.

Known Issues
It only works with official comments made after the point of installation, as WordPress doesn’t automatically add the WP user ids to the comments field it already has.

Bugs and Suggestions
Any bugs or suggestions, please email me — email link in the sidebar (RSS readers: drop by the site 😉 ).

159 thoughts on “WP Plugin: Official Comments

  1. Great and excellent article t’s realy helpful. Thanks again.

  2. ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################

    test

  3. Force Word Wrapping (http://www.frostjedi.com/terra/scripts/wp/wrap.zip)

    Prevents long sentancesconstructedlikethis from horizontally stretching the page.

    http://www.danosse.com 😀

  4. […] Official Comments:   Hinterlegt die Kommentare des Autors mit einer anderen Farbe. […]

  5. […] Official Comments: Hinterlegt die Kommentare des Autors mit einer anderen Farbe. […]

  6. […] Official Comments: Hinterlegt die Kommentare des Autors mit einer anderen Farbe. […]

  7. I am not a spammer just have a curious mind and like the engage others on similar topics.

  8. 我公司是一家专门提供程控电话交换机批发、零售、安装、调试、维护、维修的专业设备供应商和服务商。
    并与国内外多家知名厂商建及电信运营商立了良好的合作关系, 公司一直致力于向客户提供最经济实用的语音、数据通讯解决方案。

  9. lf2

    cool site

Comments are closed.