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 yourwp-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 😉 ).
Great and excellent article t’s realy helpful. Thanks again.
################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
test
Force Word Wrapping (http://www.frostjedi.com/terra/scripts/wp/wrap.zip)
Prevents long sentancesconstructedlikethis from horizontally stretching the page.
http://www.danosse.com 😀
[…] Official Comments: Â Hinterlegt die Kommentare des Autors mit einer anderen Farbe. […]
[…] Official Comments: Hinterlegt die Kommentare des Autors mit einer anderen Farbe. […]
[…] Official Comments: Hinterlegt die Kommentare des Autors mit einer anderen Farbe. […]
I am not a spammer just have a curious mind and like the engage others on similar topics.
我公å¸æ˜¯ä¸€å®¶ä¸“é—¨æ供程控电è¯äº¤æ¢æœºæ‰¹å‘ã€é›¶å”®ã€å®‰è£…ã€è°ƒè¯•ã€ç»´æŠ¤ã€ç»´ä¿®çš„专业设备供应商和æœåŠ¡å•†ã€‚
并与国内外多家知å厂商建åŠç”µä¿¡è¿è¥å•†ç«‹äº†è‰¯å¥½çš„åˆä½œå…³ç³»ï¼Œ å…¬å¸ä¸€ç›´è‡´åŠ›äºŽå‘客户æ供最ç»æµŽå®žç”¨çš„è¯éŸ³ã€æ•°æ®é€šè®¯è§£å†³æ–¹æ¡ˆã€‚
cool site