It's possible to change the order of comments (from ascending to descending) and the number of comments that show up when they are collapsed (via javascript). When set to (say) 2 collapsed comments in an ascending fashion you see the following:
Show all 3 comments
Suzy: Your writing style is wretched. 1:15pm
Thomas: I'm dyslexic - can you blame me? 2:30pm
Then when uncollapsed:
Suzy: Your writing style is wretched. 1:15pm
Thomas: I'm dyslexic - can you blame me? 2:30pm
Suzy: that's no excuse for bad writing. 3:48pm
It would make sense to me to display the last two of the ascending comments then it would be to display the first two. This way people can easily check to see how the conversation is evolving without uncollapsing the comments. If we could have an option to enable this or if this could be made to happen by default that would be amazing.
Thanks,
Thomas
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | Screen shot 2010-04-26 at 1.49.05 PM.png | 33.42 KB | pribeh |
Comments
Comment #1
Scott Reynolds commentedClick the Field in the View and you have your options. There you can change the number of collapsed comments and their order (ASC or DESC).
Comment #2
pribeh commentedHi Scott, thanks for responding. As I mentioned I'm aware of the options to change the order of the Activity comments. What I'm requesting is (the option) to display the latest comments (last of ascending order) within the collapsed state. On Facebook the comments pertaining to an activity are displayed this way as it helps users easily keep track of discussions without having to uncollapse the comments.
Right now, if I were to display Activity comments in ascending order the first two (by default) comments would show up in the collapsed state. So instead, as according to my request, activity comments would display as follows.
When collapsed:
Show all 4 comments
Suzy: that's no excuse for bad writing. 3:48pm
Thomas: Perhaps you're write - pun intended :) 4:00pm
Then when uncollapsed:
Suzy: Your writing style is wretched. 1:15pm
Thomas: I'm dyslexic - can you blame me? 2:30pm
Suzy: that's no excuse for bad writing. 3:48pm
Thomas: Perhaps you're write - pun intended :) 4:00pm
Thanks for your time, Scott.
Comment #3
pribeh commentedHi Scott,
I was wondering if you'd be willing to give this some thought again. I know you're busy. I've fumbled around with the module's code but am no php expert so can't get this to work myself. I think it makes total sense to have the option to setup activity comments to display like Facebook's comments do when collapsed.
Thanks
Comment #4
Scott Reynolds commentedInteresting well it would take reversing the way comments are hidden. so instead of hiding all the comments after the limit you reverse it and hide all comments before the limit. So you override the theme function
Comment #5
pribeh commentedWow, almost works perfectly just after plopping in the above code into my template file (and flushing caches of course). For some reason though once the comment count reaches four or more than all of the comments (minus the first) display off the bat along with "Show all X comments". I'm fiddling but can't figure it out :)
Comment #6
Scott Reynolds commentedhaha thats what I get for taking a shortcut.
Comment #7
pribeh commentedAmazing. Thank you. I owe you a beer or several.
Comment #8
Scott Reynolds commentedComment #9
pribeh commentedWicked, thanks for this Scott, just one last issue with it though. Say I have my view setup to display two comments by default (collapsed state). The "show-all" box still shows when only two comments have been added. I've attached a screen to illustrate what I mean.
Comment #10
Scott Reynolds commentedhmm interesting, does it show up even when there is only one comment? The form controls the visibility of that link
Essentially it says "If the total number of items is greater then limit, allow access to this link".
Are you by chance, form altering the comment form? I actually couldn't reproduce.
Comment #11
pribeh commentedNo, it doesn't show if only there's only one comment. I have the view setting to display two by default and only once there are two comments added does the "show-all" link display. It displays properly afterward, so if there are three comments, it will only display two by default along with "show all 3 comments". I'm not doing any form altering. I've simply placed the above code from #6 into my template.php. Thanks Scott.
Comment #12
Scott Reynolds commentedDid you get this fixed? Did you try just adding a -1 on that line as well? like so?
Comment #13
pribeh commentedHi Scott,
Thanks for providing some more input. Using the above #12 actually begins to display 3 comments in the same way it does for 2 comments for me. So if an activity has three comments it will display 3 comments along with "display all 3 comments".
Comment #14
Scott Reynolds commentedo well then do a '+1' instead of the '-1'.
Comment #15
pribeh commentedSweet, works perfectly. Thanks so much Scott!
Comment #16
Scott Reynolds commented