This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Display ALL comments from ALL pages?
#1

I would like to display all comments from all pages (That are approved) on one page.
I have successfully been able to display the total "count" of comments, but not all the comments themselves.

Any help would be appreciated.
Reply
#2

A little further clarification:
I can use part of the "extractor" plugin to accomplish this (last 5 or random), but it is not formatted nicely with the star ratings, etc, like the template form.php is. Maybe I could fuse the two somehow :-)

Again, thanks for the fine script and any help would be appreciated.
Reply
#3

Surely I am not the only one to ask for something like this :-) ... or am I?
Reply
#4

(21-Mar-2016, 10:17 AM)Seven Thunders Wrote:  Surely I am not the only one to ask for something like this :-) ... or am I?

Update: I am able to display ALL comments from ALL pages  "IF" I change in includes/templates/comments.php the following:

FROM:
PHP Code:
<?php 
$cmtx_comments_query
= cmtx_db_query("SELECT `id` FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `reply_to` = '0' AND `is_approved` = '1' AND `page_id` = '$cmtx_page_id' ORDER BY $cmtx_sort;");

 $cmtx_perm_counter = 0;
 $cmtx_exit_loop = false;
 while ($cmtx_comments = cmtx_db_fetch_assoc($cmtx_comments_query)) {
 cmtx_calc_permalink($cmtx_comments['id']);

  if ($cmtx_exit_loop) {

  break;

  }
 }
}
?>
 


to:


PHP Code:
<?php 
$cmtx_page_id2
= $cmtx_page_id-1;

$cmtx_comments_query = mysql_query("SELECT * FROM comments WHERE is_approved = '1' ORDER BY dated DESC");

$cmtx_perm_counter = 0;
$cmtx_exit_loop = false;
while (
$cmtx_comments = cmtx_db_fetch_assoc($cmtx_comments_query)) {
cmtx_calc_permalink($cmtx_comments['id']);

  if ($cmtx_exit_loop) {

  break;

  }
 }
}
?>


HOWEVER.... It still is dependent upon the cmtx_identifier in the referring page:

PHP Code:
<?php
$cmtx_identifier
= 'MY ID';
$cmtx_reference = 'Page Description';
$cmtx_path = '';
require
$cmtx_path . 'includes/commentics.php'; //don't edit this line
?>

It will display ALL of the comments for ALL pages, BUT... it will only display up to the quantity that has been approved for the  cmtx_identifier listed on the page.
So... I am getting close, but no cigar just yet.
Any ideas???
Reply
#5

Are you sure that it's displaying up to the quantity that has been approved for the page? Rather it's more likely that it's displaying only the parent comments and no replies. If so then you'd need to open the /includes/functions/comments.php file and remove every instance of this:

PHP Code:
<?php 
AND `page_id` = '$cmtx_page_id'

Have you completed the interview?
Reply
#6
Thumbs Up 

You are the Man Steven!! That did the trick! I verified by simply making a short comment for page one thus: Comment 1 and on page 2 comment 2 and so on. The total count was 15 and the comments being displayed was 15 :-)

I now have 9 different versions functioning exactly like I want :-)

Thank you kindly.
Reply
#7

is there a way to have a separate page of all comments for all pages as well as them appearing on their separate pages?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Tim
06-Jan-2021, 08:56 PM
Last Post by Tim
18-Oct-2019, 11:45 AM
Last Post by Gevill
23-Jul-2019, 01:17 AM
Last Post by Steven
16-Feb-2018, 09:15 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)