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. I like the easy-to-use interface a lot. I wished that was standard in modern-day software.

  2. Great plugin, thanks.

    Anyone got any ideas on how you might change a previous comment to an ‘official comment’ without deleting it and posting it again (needs to stay in sequence).

  3. I’m having a little trouble getting this installed…I don’t seem to have wp-comments.php or wp-comments-popup.php. I have wp-comments-post.php though. Is that where the code is supposed to go? If it is, where exactly do I put the code? It’s quite confusing for me, I don’t know php and all and I’d hate to go in blind and screw something up. I’m using 1.5.1.3. Thanks.

  4. You will have those files, but they are not in your WordPress directory. They are stored in your theme directory (e.g. if you are using the default Kubrick theme, /wp_content/themes/default/), and you can get in to edit them via Presentation–> Theme Editor (or you could download the files via FTP, and make the changes with a text editor, which is often easier due to search + replace etc. which the Theme Editor doesn’t have)

  5. Well I added it right under the in the comments.php file for my theme and added the class to the css…still isn’t working for me. :\ Am I supposed to put it somewhere else or is there something else I need to do? I know it’s activated.

  6. […] he left). Removed several plugins that no longer used and install some new ones, like: Official Comments – give different style to admin’s comment (me) Pag […]

  7. […] . Paged Comment Editing – Makes reading all the comments in the admin area a bit easier. Official Comments – It turns out that a lot of people are called ‘Jam […]

  8. […] d be useful for people who are using the Footnotes Plugin. I also installed a fourth, the Official Comments plugin. It isn’t doing much yet, but it will. All of thes […]

  9. Hi Brett

    I just tried to doownload your plugin, but it wouldn’t work: it seems that your .zip file is in fact a GIF image, or something? I’d be really grateful if you could check that out since this plugin looks like something I need!

    Richard

  10. Jason

    sorry to pop in just to leave a thanks but man do I feel dirty as the time passes and I don’t.

    >THANKS

  11. […] ay Attention to Directories

    I was having problems formatting the Official Comments code and asked The P […]

  12. […] e people knew kinda who I was! So when I get home and discover that Molly and Tantek have left such generous comments that I have a grin from ear-to-ear, how am I su […]

  13. […] ilies 8. Smiley Javascript Buttons 9. Dunstan’s Time Since 10. WP Admin Bar 2 11. Offical Comments   Leave a R […]

  14. […] ilies 8. Smiley Javascript Buttons 9. Dunstan’s Time Since 10. WP Admin Bar 2 11. Offical Comments   Leave a R […]

  15. […] sie überladen wird. Hat zwar auch einige Nachteile, aber damit kann man klarkommen. offical comment: Mit diesem Plugin wird der Besitzer des Blogs besonders he […]

  16. […] #8217;t browsable except through category archives. Also, I installed a new plugin today: Official Comments. A very simple plugin adding a couple of f […]

  17. Nice plugin, but doesn’t validate XHTML 🙁

  18. Great little plugin, exactly what I was looking for!

  19. […] by Chris at 10:52 pm on Monday, November 7, 2005

    I installed Brett Taylor’s Official Comments plugin today: two thumbs up. This ve […]

  20. […] by Chris at 10:52 pm on Monday, November 7, 2005

    I installed Brett Taylor’s Official Comments plugin today: two thumbs up. This ve […]

  21. […] mit Hilfe des Kommentarplugins zB eine andere Hintergrundfarbe verwendet werden. Plugin: Official Comments von inner.geek Verwendung: In das Kommentartemplate an d […]

  22. […] n nutzt, beschreibe dem User das Vorgehen etwas genauer als ich es bisher getan habe. 12. Official Comments: Markiert einen Kommentar mit einer alternativen Farbe, w […]

  23. […] Chris at 9:38 pm on Thursday, November 17, 2005

    I installed Brett Taylor’s Official Comments plugin today: two thumbs up. This ve […]

  24. […] layed tracks from last.fm Google sitemaps — Generate XML files for google sitemaps Official comments — Lets you do stuff if a comment has been posted by […]

  25. Hello,

    you really have to help me. I get an error if someone write a comment ony my entries. I post the PHP thing in wp-comments-post.php because I haven’t a wp-comments.php or wp-comments-popup.php. Please help me! Where I have to put the code now? I don’t get that :/

    Best Regards,
    Leichenschrei

  26. […] io para enviar un enlace de un post específico mediante correo electrónico a un conocido. Official Comments – Permite destacar los comentarios que re […]

  27. […] Trackbacks appear not to work too well, and I’ve found an awesome plug which is supposed to make registered users’ comments show up in special ways. Official comments. Well it mostly works but for some people the blue backgrounds aren’t showing up, tt’s driving me a little insane trying to sort it all out. Ah well life goes on. Should be good once it’s working properly. And another thing, why does this page look so different when you load it in Internet Explorer rather than Firefox? I never will understand why they show different pages differently. I’m doing my best to make this site compatible with eeverything, but .. gah. I really should be writing that english essay… […]

  28. Hi! Does this plugin works in WordPress 2.0?

  29. i like this site and author! respect!

  30. How would i Display on image (avatar) for Offical comment, and Another for UnofficialComments.

    I dont think im inserting the code correctly due to my Offical comments are not Appearing any different than those of unoffical ones

  31. […] Highlight your comments – so they stand out from all other commentors’ comments. We use this on IdolBlog, which was built using Drupal. It helps when you’re clarifying issues, responding to questions, or stepping in to calm down a discussion. It helps others to scan through the pile of comments too. Here’s a WordPress plugin which will do this for you. […]

  32. […] Um nun noch die Autorenkommentare hervorzuheben bedarf es erstmal der Installation des Plugins: Official Comments von Brett Taylor. Wir modifizieren nun unseren eben geschriebenen Code in der comments.php: […]

  33. Bill Berry

    Just installed with WP 2.0 and all seems well. The docs, however, only mention WP 1.5. Has anyone else tested this? Thanks.

  34. TJ

    Hmm could anyone provide a quick guide on how to do it in WP2.0?
    Looks like a great plugin!

  35. […] Official Comments ar trebui să eticheteze cumva comentariile pe care le fac eu. Cred că de acum încolo, pentru că eu nu am observat încă nimic. […]

  36. Roberlan

    Your plugin is very good and i downloaded and install it, but i´m having some problems with the “alt” in comments, they are strange, a
    i dont know, but i think i put the code in the wrong place.
    can you help me?

  37. Laarni

    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.

    what does this really mean?

    im a bit confused. yay!

  38. Furius Angel

    Really good plugin!

  39. Gravatar / Official Comments Hack

    Ich hab diverse Stunden damit verbracht eine Lösung zu finden, wie man die beiden Kommentar-Plugins Gravatars und Official Comments korrekt in der comments.php ausgeben kann, bis ich dann mit mal minimalen PHP-Kenntnisse spielen lassen habe.

    Standa…

  40. Ellie

    Hey it looks like a really good plugin, but sorry the download link is broken. :S Just so you know.

  41. Can’t download this plugin.
    Firefox can't find the server at downloads.webfroot.co.nz.
    any mirror ?
    where I can found this plugin ?

  42. ben

    Hi

    The plugin sounds good but the download link is broken. Is there any chance you can take a look so I can try the plugin out

    Thanks in advance

  43. Mike

    Wanted to download the plugin, but it can’t be found. Just thought you should know the link is bad.

  44. I couldn’t download the plugin too. All mirror download to it are also down 🙁

  45. […] Jeszcze tylko kilka szybkich newsów bez skÅ‚adu i Å‚adu: Wtyczka Official Comments zainstalowana w moim WordPress. WpadÅ‚o kilka nowych pÅ‚yt i jeszcze wiÄ™cej poleciaÅ‚o na allegro, ale już pomaÅ‚u docieram siÄ™ ze stylem uk/us garage, disko/funky house, tak chyba można by to okreÅ›lić. O czym ja tu jeszcze miaÅ‚em… a tak! w tygodniu możliwe, że zaczyna nowÄ… pracÄ™… I smutny news na koniec, toto cafe jest likwidowana – choć to już nie ten klimat co kiedyÅ›, tylko maÅ‚a cześć osób ze straej ekipy siÄ™ ostaÅ‚a… to jednak szkoda, no coż nic nigdy nie trwa wiecznie… […]

  46. I’m unable to download Official Comments plugin as well. All mirror download to it are also down 🙁

  47. Brickred is leading Offshore Software Development Outsourcing

  48. Crimsonlink is leading Bug Tracking Software Issue Tracking Software Defect Tracking Software

Comments are closed.