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

    I like the easy-to-use interface a lot. I wished that was standard in modern-day software.

  2. John Pope

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

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

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

    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. My Other Side of the Stories » Several Changes Here

    […] 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. James Turnbull’s shreddies.org » Blog Archive » Wordpress Plugins

    […] . 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. sw’as » Spate of plugin installations

    […] 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. Richard Flynn

    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. educe me » Pay Attention to Directories

    […] 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. mimiwu.com » Latest Upgrades for Mimiwu

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

  14. mimiwu.com » Latest Upgrades for Mimiwu

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

  15. Xrossblog » Blog Archive » Plugins in Xrossblog #1

    […] 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. Yay, a Search Box: Mike Mertsock

    […] #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. Oscar

    Nice plugin, but doesn’t validate XHTML 🙁

  18. dave

    Great little plugin, exactly what I was looking for!

  19. The English Factory » Hacking the Official Comments Plugin

    […] 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. The English Factory » Official Comments Plugin

    […] 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. Basic Thinking Blog » WP Plugin: Official Comments

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

  22. Basic Thinking Blog » Wordpress Plugins (Update 1)

    […] 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. The English Factory » Official Comments Plugin

    […] 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. MD87.co.uk » Blog Archive » Wordpress plugins

    […] 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. Leichenschrei

    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. El Documentalista Enredado » Algunos buenos plugins de Wordpress

    […] 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. jk-digital.com » Blog Archive » New year and more

    […] 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. Testing Old WP Plugins I Like at CoffeeBear Dev Blog

    […] Official Comments […]

  29. Tecfolio

    Hi! Does this plugin works in WordPress 2.0?

  30. Fakyr

    i like this site and author! respect!

  31. Marshall

    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

  32. Improving the readability of large numbers of comments — cre8d design blog

    […] 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. […]

  33. Blog und Forumfusion - die Kommentarfunktion aufmotzen » Webdesignblog

    […] 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: […]

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

  35. TJ

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

  36. diavolul e tot acolo » Modificări în funcÅ£ionalitate

    […] 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. […]

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

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

  39. Furius Angel

    Really good plugin!

  40. Gizcore Laboratories

    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…

  41. Ellie

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

  42. Gold_Hunter

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

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

  44. Mike

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

  45. Adam Betts

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

  46. savek blog » Archiwum bloga » Kolejny miÅ‚y dzien :)

    […] 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… […]

  47. Adam Betts

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

  48. Software Outsourcing

    Brickred is leading Offshore Software Development Outsourcing

  49. Issue Tracking Software

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

Comments are closed.