- Author:Scott Reilly
- Version:2.0
- Last update:07 April 2008
- Compatibility:WP 2.3+ and 2.5+
- Comments:go here
- Download:[ zip ]
- Description:
Display Recent Comments, Pingbacks, and/or Trackbacks, Top Commenters, or Recent Commenters, and use the comment, commenter, and/or post information of your choosing to customize the how they are listed. You can narrow comment searches by specifying post IDs, comment types, and/or comment status, among other things.
-
Extended Description
Easily find comments (including pingbacks and/or trackbacks) or commenters and list and display anything about them or their related post in the manner you want. -
Screenshots
- A screenshot of the admin options page for the plugin showing the options input fields.
- A screenshot of the admin options page for the plugin showing the percent-substitution tag documentation.
- A screenshot of the admin options page for the plugin showing the template function and argument documentation.
- A screenshot of the admin options page for the plugin in WP 2.5 showing some of the options input fields.
- A screenshot of the admin options page for the plugin showing the options input fields.
-
Installation
- Download the file customizable-comment-listings.zip and unzip it into your wp-content/plugins/ directory.
- Activate the plugin through the ‘Plugins’ admin menu in WordPress.
- Go to the Options -> CCL (or in WP 2.5: Settings -> CCL) admin options page. Optionally customize the settings. You can read documentation on the template tags, arguments, and percent-substitution tags there as well.
- In your sidebar.php (or other template file), insert calls to comment/commenter listing function(s) provided by the plugin.
-
Template Tags
The plugin provides three template tag for use in your theme templates.
Functions
- Get recent comments :
<?php function c2c_get_recent_comments( $limit = 5, $format = "<li>%comment_author%: %comment_excerpt_URL%?</li>", $types = 'comment pingback trackback', $status = '1', $ids = '', $order = 'DESC', $offset = 0, $date_format = 'm/d/Y' ) ?>
- Get top commenters :
<?php function c2c_get_top_commenters( $limit = 5, $format = "<li>%comment_author_URL% (%total_comments%)</li>", $types = 'comment pingback trackback', $status = '1', $ids = '', $order = 'DESC', $offset = 0, $date_format = 'm/d/Y' ) ?>
- Get recent commenters :
<?php function c2c_get_recent_commenters( $limit = 5, $format = "<li>%comment_author%: %comment_excerpt_URL%</li>", $types = 'comment pingback trackback', $status = '1', $ids = '', $order = 'DESC', $offset = 0, $date_format = 'm/d/Y' ) ?>
Arguments
- $limit
The number of comments/commenters to list.
Default: 5 - $format
String containing percent-substitution tags and text to be displayed for each comment/commenter retrieved. - $type
*Optional.* Space-separated list of comment types to include — leave empty to search for all types of comments, otherwise specify one or more of: ‘comment’, ‘pingback’, or ‘trackback’.
Default value: ‘comment pingback trackback’ - $order
(optional) Indicates whether the comments/commenters should be listed in ascending or descending order.
Possible values: ‘ASC’ or ‘DESC’
Default value: ‘DESC’ - $offset
(optional) Number of comments/commenters to skip from the beginning of the list of posts found.
Default value: 0 - $date_format
(optional) Date format, PHP-style, to use to format any dates. If set to ”, then the blog default date format of
‘$default_date’ will be used. Keep in mind that the template functions provide their own date format.
Possible values: see us2.php.net/date for more info on date format strings.
Default value: ‘m/d/Y’
- Get recent comments :
-
Tips & Examples
-
<ul> Recent Comments <?php c2c_get_recent_comments(3); ?> </ul>
-
<ul>Recently Commented <?php c2c_get_top_commenters(3); ?> </ul>
-
<ul>Recently Updated <?php c2c_get_recent_commenters(3); ?> </ul>
-
-
Release Log
- 07 Apr 2008 : v2.0 — Tons of updates! Compatible with WP 2.3+ and 2.5. Follow link for full update information.
- NOTE: Versions prior to v2.0 were documented here
- 30 Mar 2005 : v0.9 — Released to the public
-
Copyright & Disclaimer
Copyright © 2005-2008 by Scott Reilly (aka coffee2code)Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Acknowledgements
Thanks to all those who have contributed feedback and support!
3 replies on “Customizable Comment Listings”
[…] 3. Customizable Comment Listings 这个æ’件是用æ¥æ˜¾ç¤ºæœ€æ–°åšå®¢å›žå¤çš„,一个åšå®¢ï¼Œæœ€ç»å…¸çš„就是和读者交互,什么都能没有,这个å¯ä¸èƒ½å•Šã€‚ 之å‰æ‰¾è¿‡ä¸€ä¸ªcommonet hacks,å¯æƒœå®ƒä¸Ž WP-Stats 冲çªï¼Œä¸èƒ½å…±åŒä½¿ç”¨ï¼Œè€Œä¸”这个æ’件的自定义性实在是太高了,éšæ„定制,太猛了。下é¢å…¬å¼€ä¸‹å½å½è‡ªå·±çš„é…置方案:$format = “<li><a href=’%comment_link%’ title=’%post_title%’>%comment_author%</a>:%comment_excerpt%</li>” […]
[…] Customizable Comment Listings: mit diesem Plugin kann man sich in der Sidebar verschiedene Variationen der Kommentare anzeigen lassen. Also ob mit Namen und Auszug eines Kommentares oder auch die Topkommentierer. […]
[…] is most known for his “kitchen sink” WordPress Plugin, Customizable Comment Listings (CPL), so big he’s released it as a whole Plugin and as modular Plugins so you only use what […]