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:

  • RECOMMENDED: Install WordPress Plugin Manager then use the One Click Install for Official Comments. This will also make it easier to install other plugins and upgrade them in the future.
  • OR: Download Official Comments, extract and upload official-comments.php to your wp-content/plugins directory. Log-in to your WP admin panel, go to the Plugins tab and activate the Official Comments plugin.

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. Swetlana Maßat

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

  2. asdsad

    ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################

    test

  3. asdsad

    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. Nivu » Blog Archive » Top 10 Wordpress Plugins

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

  5. Nivu.de » Blog Archive » Top 10 Wordpress Plugins

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

  6. Top 10 Wordpress Plugins

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

  7. site ekle

    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.