1) Place latest_comments.php in the /plugins directory and activate it from the adminstration plugins manager.
2) Open show.addcomment.php in /inc directory and find this line:
- Code: Select all
if ($config_flood_time){
Add above:
- Code: Select all
latest_comments(10, 40);
This will display 10 of the most recent comments posted and trim the title to 40 characters. If you do not want to trim title length, set 40 to 0. You shouldn't set the number to display any higher than 30 because it takes up a lot of page space.
You might also want to edit editcomments.mdu so if you remove a comment the comment display will be updated at same time. Look for the line that starts:
- Code: Select all
msg('info', $echo['headerDeleted'],...
Add above:
- Code: Select all
latest_comments(10, 40);
3) Determine where you want the comments to appear on your main news page by simply adding this line:
- Code: Select all
<?php include($cutepath . '/data/latest_comments.txt'); ?>
4) Next add a comment and a display of latest comments will appear...a template will also be created when first run. Edit latest_comments.tpl if needed directly in the data/tpl directory or through the manage template from the admistration page. You may want to add <tr> or <td> tags depending on where in a table you desire the comments to appear. Default is:
<a href="$config_http_home_url?id={id}#{comment-id}">{title}</a> by {author}<br>
To see latest_comments.php in action see: This News Site
