root/get-recent-comments/tags/0.9/README

Revision 643, 1.9 KB (checked in by kjodies, 5 years ago)

Initial check-in to repository

Line 
1Installation
2~~~~~~~~~~~~
3
41. Drop the file in wordpress/wp-content/plugins
52. Activate the plugin the WordPress Plugin Management
63. Write the following piece of code into your template (index.php)
7                 
8                 
9<li id="recent_comments"><?php _e('Recent Comments:'); ?>
10        <ul>
11        <? get_recent_comments(); ?>
12        </ul>
13</li>
14
15Done. If you want more, read on...
16
17Advanced configuration
18~~~~~~~~~~~~~~~~~~~~~~
19
204. (Optional)
21   You can specify one to three arguments to the function. It is possible to
22   name only one argument or only two. Look at the following examples.
23   
24   The arguments have the following meaning:
25   1. Number of comments to display. 
26   2. Maximum Number of characters in a comment excerpt
27   3. Formatting
28
29   If you don't specify arguments the plugin defaults to 5 comments, 120
30   characters per comment and a standard formatting.
31   
32   The format is a piece of html code where you use tags that will be replaced
33   by the actual data:
34
35   %comment_excerpt - Shortened comment.
36   %comment_link    - Link to the comment. Something like:
37                      http://blog.example.com/wp/archives/2005/02/03/this-is-a-test/#comment-523
38   %comment_author  - Name left by the commenter
39   %comment_date    - Date of comment
40   %post_title      - Title of the posting
41   %post_link       - Link to the posting (and not the comment). Something like:
42                      http://blog.example.com/wp/archives/2005/02/03/this-is-a-test/
43   %post_date       - Date of the posting
44   
45
46Examples
47~~~~~~~~
48
49Show the 8 most recent comments
50<?php get_recent_comments(8); ?>
51
52Show the 8 most recent comments, with a maximum of 100 characters per comment:
53<?php get_recent_comments(8,100); ?>
54
55The same with your own formatting
56<?php get_recent_comments(8,100,'<li><a href="%comment_link">%comment_author</a>: %comment_excerpt</li>');
57
58
59
60Feedback
61~~~~~~~~
62
63krischan@jodies.de
64http://blog.jodies.de
65
Note: See TracBrowser for help on using the browser.