Log in

No account? Create an account

Previous Entry | Next Entry

Number of comments per page? - SOLVED

  • Dec. 25th, 2007 at 4:00 PM
Hi, I was wondering if it were possible to alter the number of comments to the entries per page.

For example: when 10 comments to the entry are made, the next comment to the entry goes to comment page 2 and the answers to the comments in comment page 1 collapse so you have to click "Thread" (or "Expand" for that matter) to see them. I thought I'd find something like that in the Customise Journal area but didn't succeed.

I'm a paid account using a slightly altered Expressive Chopstics layout.

Thanks in advance.



( 16 comments — Leave a comment )
Dec. 25th, 2007 09:09 pm (UTC)
Seriously, only 10 top-level comments; no sub-comments? I've looked at entries with <50 comments but >10 top-level comments with no collapsing. I thought the page only collapsed after 50 total comments by default, and I don't know if there's any way to change that. I'll have to look up where I read that, though.
Dec. 25th, 2007 09:22 pm (UTC)
Hee, it was just an example. If there was a way to change the default number to less than 50, that would be great. If there isn't... oh well, you can't always get what you want. :/
Dec. 26th, 2007 12:08 am (UTC)
It possible to have comments collapse earlier than 50 comments, but I don't think it's possible to change the number of top-level comments per page... which is normally 25 (if the total is over 50).

It's complicated.
Dec. 26th, 2007 02:51 am (UTC)
I was looking for a post somewhere in one of the Support comms where this was all explained, but I couldn't remember where or when. Do you happen to know what I talking about? ;)
Dec. 26th, 2007 05:06 pm (UTC)
Maybe you saw a discussion in lj_userdoc about FAQ 62? Otherwise I don't know what you are talking about. Afuna has a code there for collapsing comments early.
Dec. 26th, 2007 05:23 pm (UTC)
Thank you for the link, the code is also provided there but it's for Flexible Squares, is there a code like this for Expressive as well? :)
Dec. 26th, 2007 08:07 pm (UTC)
If I'm understanding what afuna is saying and what's in FAQ 62, it is not possible to change the limits of:
  • 50 total comments or
  • 25 top-level comments
per page. The code given for Flexible Squares only collapses individual threads above a certain depth. If that's what you want, I can provide some Expressive code for it.
Dec. 26th, 2007 08:26 pm (UTC)
Yep, that sounds good too, I'd be grateful if you could provide the code. Thank you!
Dec. 26th, 2007 09:08 pm (UTC)
In EntryPage::print_comment(Comment e) find the line
    if (not $e.full ) {
and change it to
    if (not $e.full or $e.depth > 10) {
Change the "10" to the thread depth beyond which comments will be collapsed. In other words, after 10 comments in an individual thread, those subsequent comments will display as collapsed.
Dec. 27th, 2007 08:34 pm (UTC)
I'm sorry, where do I find the "EntryPage::print_comment(Comment e)"?

I'm not using a custom layer and there's no such line in the automatically generated one...
Dec. 29th, 2007 12:13 am (UTC)
You'll have to copy that function from the base layout source and modify it as I said. Here's a link to a tutorial for creating theme layers, with some hints if you run into trouble.
Dec. 29th, 2007 11:07 am (UTC)
Thanks! I didn't create a new layer, I just edited the function into my auto-generated one and it works! Thank you for your time. :)) *happy*

Edited at 2007-12-29 11:08 am (UTC)
Dec. 29th, 2007 11:24 am (UTC)
Oh, and one more thing - when I click on "Thread", it only shows 2 comments - the one I clicked "Thread" on and the reply to it, how do I make it show the whole thread of comments?
Dec. 29th, 2007 03:34 pm (UTC)
You don't, because you're forcing threads to always collapse comments below a depth of 2. You can do something like
http://olga-keepout.livejournal.com/######.html?view=flat to show all comments un-threaded, or
which shows threads expanded, but in the site scheme.
Dec. 29th, 2007 04:35 pm (UTC)
Oh, ok, thanks. :)
Dec. 26th, 2007 07:57 pm (UTC)
No, that wasn't what I was thinking of, but as usual, the FAQ had all the answers anyway. =P However, afuna's code appears to only affect the number of comments on individual threads, not entire pages, unless I've implemented it wrong.
( 16 comments — Leave a comment )

Latest Month

March 2016

S2 Help Communities


Powered by LiveJournal.com
Designed by chasethestars