Hello,

I have activated the recent comments block in my page. It shows only the latest 10 comments and I want to display more.

I tryed to create a link to show all the comments, bat it doesn`t work.

http://myweb/?q=comment

How can I do It.

Or if this is not posible, I want to add at the end of the block, a MORE link, as in recent forum topics.

Comments

neablo’s picture

okay, heres how to show as many comments as you like:

- open modules/comment.module
- look for * Implementation of hook_block in line 157
this is how the block is displayed
- scroll down and change the following line:
result = db_query_range(db_rewrite_sql('SELECT c.nid, c.* FROM {comments} c WHERE c.status = 0 ORDER BY c.timestamp DESC', 'c'), 0, 10);

the last number (here: 10) says how many comments are shown

change it to 20 or anything you like

example:

result = db_query_range(db_rewrite_sql('SELECT c.nid, c.* FROM {comments} c WHERE c.status = 0 ORDER BY c.timestamp DESC', 'c'), 0, 20);

tunaza’s picture

Thank you very much for your answer.

Does anybody know how to show all the comments in the main content block.

For example using a link.

neablo’s picture

no problem... did my upper solution work for you?

The "latest content" link is almost a latest comments page listing
it can be found at "?q=tracker"

Or did I misunderstand you?

tunaza’s picture

Thank you very much. That was what I want!