Replies To Comments Shown (Visible) By Default

There is a problem with replies to comments being hidden by default; you over look them.  Just today I went to a blog and did not notice the 1 reply to a comment and I know about them.  I want replies to comments to be shown (visible) by default on page loads.  Oh, by the way, expand all does not expand all, it only expands the first level, not replies to replies.


I have looked at the javascripts and the php scripts and even the CSS and I can not get replies to comments to be shown (visible) by the default.  I even tried to get an answer by using the "contacts" thing at the bottom of Boonex but all that got me was a silly answer to click on "expand all" to see replies.


I like Dolphin but there are a lot of areas that one has to hack such as this reply thing.  Seriously Andrew, this is a bad design element and I am saying that both from feedback from my members using Dolphin and me; I am also a user of my social network built on Dolphin and if I am missing replies to comments I know a lot of my users are as well.

Geeks, making the world a better place
Quote · 16 Jan 2013

By the way, as indicated in the first post, to see replies to replies, you have to click each one.  So if there is a reply to a reply to a reply, expand all will not show them.  You have to click on the first to see the reply, then click again to see the reply to that one, then click again to see the reply to the last one.  If I could simply not hide them in the first place.....

Geeks, making the world a better place
Quote · 16 Jan 2013

it would be very usefull to have an option for showing all repies expanded ... my users complain about it everytime ... please guys at boonex give as a hotfix for this!

thanks!

http://www.boonex.com/market/posts/paansystems - your resource for Dolphin Pro
Quote · 16 Jan 2013

Hi,

I agree, I would love to see this option - expanded replies expanded by default.

I hope someone will tell us how this can be done.

Regards, Mayki

"When things get tough the tough get going..."
Quote · 16 Jan 2013

Yes Please do this...

Csampson
Quote · 16 Jan 2013

So many wants this :O

so much to do....
Quote · 16 Jan 2013

Go to templates/base/scripts/BxBaseCmtsView.php at line 259 add this just before $ret .= "</script>";

$ret .= '$(function(){'.$this->_sJsObjName.'.expandAll(this);});';

Now, we should remove the checkbox maybe. Go to templates/base/cmts_top_controls.html and remove this

<input type="checkbox" id="cmt-expand" name="cmt-expand" onclick="javascript:__js_object__.expandAll(this)"/><label for="cmt-expand">__expand_all__</label>

 Done. Its not a perfect solution. It just does the checkbox work when page load event.

I am sleepy don't expect more now. Good Night.....zzzzzz

so much to do....
Quote · 16 Jan 2013

Yes, but "expand all" does not expand all, just the top level replies.

Geeks, making the world a better place
Quote · 4 Feb 2013

 

 

Yes, but "expand all" does not expand all, just the top level replies.

 Have you try this:

http://www.boonex.com/forums/topic/Question-about-Comment-Configuration.htm

Regards

Mayki

Thanks for trying to help; however, that link does not supply a solution.

Geeks, making the world a better place
Quote · 4 Feb 2013

Please test extensively the following modification, if this works good we will include it in the upcoming version.

1) Change the following (near ~80 line in templates/base/scripts/BxBaseCmtsView.php file):

$sRet = '<ul class="cmts">';

to:

$sRet = '<ul class="cmts ' . ($iCmtsParentId ? 'cmts-margin' : '') . '">';

2) Then change the following (near ~117 line in the same file):

$sRet .= '</div></li>';

to:

$sRet .= '</div>';
if (true && $r['cmt_replies']) {
    $sRet .= $this->getComments ($r['cmt_id'], $sCmtOrder);
}
$sRet .= '</li>'; 

 

Particularly it maybe problems with a lot of replies for one comment, so it would be great to have some feedback on how it works in such situation, and if it is acceptable or not.

Rules → http://www.boonex.com/terms
Quote · 5 Feb 2013

its very simple
..../templates/base/ cmts_top_controls.html

at the bottom add

<body onload="javascript:__js_object__.expandAll(this)();">

(save&clear cache, also you might want to remove the "expand all checkbox"....)

ex.PNG · 201.3K · 916 views
Quote · 5 Feb 2013

Thanks Alex, I will first apply to my test site and if it goes well there, then apply it to the production site where there is continued activity.

Geeks, making the world a better place
Quote · 5 Feb 2013

 

its very simple
..../templates/base/ cmts_top_controls.html

at the bottom add

<body onload="javascript:__js_object__.expandAll(this)();">

(save&clear cache, also you might want to remove the "expand all checkbox"....)


As I said before, this does not work; it only opens the first reply and not any replies to replies.  The expand all only expands the first level.

Geeks, making the world a better place
Quote · 5 Feb 2013

@Alex; that appears to be working on the test site.  Will implement it on the production site where I can get feedback from the members on any issues.  The expand all button now seems to be working as it should as well; suggest changing the label to expand/collapse all, when you click on expand all it expands/collapses all replies.  If this is implemented in a future release, perhaps it can be set in the backend/admin so that one can decide if replies should be collapsed or expanded by default.

Thanks so much for this; will provide any updates on issues after I put it on the production site.

Geeks, making the world a better place
Quote · 5 Feb 2013

 

 

its very simple
..../templates/base/ cmts_top_controls.html

at the bottom add

<body onload="javascript:__js_object__.expandAll(this)();">

(save&clear cache, also you might want to remove the "expand all checkbox"....)


As I said before, this does not work; it only opens the first reply and not any replies to replies.  The expand all only expands the first level.

 Have you tried it? for me it's not even a good idea to have them all expanded

Quote · 5 Feb 2013

I have tried both versions, and Alex's is working OK, prolaznik's is not.

And I was looking for this function for a while....., thanks Alex.

 

Sorry for my previous post geek_girl, but, when I realised that it is not the solution I could't remove it anymore....

M.

"When things get tough the tough get going..."
Quote · 5 Feb 2013

While working on  "Replies to comments visible by default " I  found out that  Profile comment is not working.

Can anyone advise what to do?

Comment can not be posted due to "Please enter 3-2048 charactres" warning ??

profile_comments.PNG · 136.6K · 1072 views
"When things get tough the tough get going..."
Quote · 6 Feb 2013

As I remember, profile comments and profile wall/timeline can't work together (also it doesn't make sense to use both), try to remove wall/timeline block and try again.

While working on  "Replies to comments visible by default " I  found out that  Profile comment is not working.

 

Rules → http://www.boonex.com/terms
Quote · 6 Feb 2013

 

profile comments and profile wall/timeline can't work together

 AlexT

You rock!

It was rather frustrating...., I managed to expand replies to comments (thanks to your code above) but then the comments didn't work... ;)

Now it's OK

Thanks a lot!

Mayki

"When things get tough the tough get going..."
Quote · 6 Feb 2013

Alex's solution is working for me on 7.1.1, although I haven't gone deeper than 6 sub levels.

However, the "expand all" checkbox functionality is still bizarre for my taste. The checkbox doesn't really expand or collapse, it merely switches the state of the replies, meaning that if a comment is open with replies, its replies are collapsed, and vice-versa.  

This causes the following funny situation:

say you have your comments open like that:

 

comment 1 (2 replies)
--------- comment 1a
--------- comment 1b
comment 2 (1 reply, not expanded)
comment 3 (0 replies) 

 

Now, you check "expand all". What could happen is either everything is collapsed, or everything is expanded. What actually happens is this:

 

comment 1 (2 replies, collapsed)
comment 2 (1 reply)
----------- commant 2a (expanded now)
comment 3 

 

And from now on, comment 1 and comment 2 will never be both expanded or collapsed, no matter how many times you check the box.

 

I guess this might not be a very common scenario (maybe I'm wrong though), but it makes the "expand all" check option very much useless, to the point where I don't even know how to rename it ("expand/collapse all" is simply not a true description...).

 

As for now, I decided to take the checkbox out of the page, expand all by default (using Alex's fix), and see how it goes.

Quote · 11 Apr 2013

I just implemented prolaznik method and it's working fine for me... the check box doen't show as checked, but when I click it, they all collapse and unclick, they expand again.

Quote · 11 Apr 2013

  See geek_girl's comment on the prolaznik fix:

As I said before, this does not work; it only opens the first reply and not any replies to replies.  The expand all only expands the first level.

 

Quote · 11 Apr 2013

ahhh ok... 

Quote · 11 Apr 2013

 

Please test extensively the following modification, if this works good we will include it in the upcoming version.

1) Change the following (near ~80 line in templates/base/scripts/BxBaseCmtsView.php file):

$sRet = '<ul class="cmts">';

to:

$sRet = '<ul class="cmts ' . ($iCmtsParentId ? 'cmts-margin' : '') . '">';

2) Then change the following (near ~117 line in the same file):

$sRet .= '</div></li>';

to:

$sRet .= '</div>';
if (true && $r['cmt_replies']) {
    $sRet .= $this->getComments ($r['cmt_id'], $sCmtOrder);
}
$sRet .= '</li>'; 

 

Particularly it maybe problems with a lot of replies for one comment, so it would be great to have some feedback on how it works in such situation, and if it is acceptable or not.

 It works well, thank you Alex!

Could you make expand for comments on wall/timeline too?

Quote · 28 Apr 2013

OK I have added Alex's code and it works great ... I have just one issue >>

Now all comments are expanded the 'expand all' check box is un-ticked and if you click it >> it closes all the auto expanded comments!

Is there a way I can make this auto ticked so that it makes more sense to users ? OR should I rename the 'expand all' to 'close expanded comments' ?!

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 28 Apr 2013

The easiest, more robust, solution would be to change the caption of the checkbox to "collapse all".

Edit: I see you've edited your question to include this solution as well :)

Quote · 28 Apr 2013

 Maybe 'collapse all replies' would be more understandable .. Thanks though I will do this :)

The easiest, more robust, solution would be to change the caption of the checkbox to "collapse all".

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 28 Apr 2013

OK .. Update for all that have used Alex's code to expand all comments >>

I have changed 'expand all' caption to 'collapse all replies

This makes easy understanding for users and when ticked all replies to comments close and show main comments only ...

I also would like to thank Alex for this code .... Far better than having to open replies to replies etc!

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 28 Apr 2013

 

OK .. Update for all that have used Alex's code to expand all comments >>

I have changed 'expand all' caption to 'collapse all replies

This makes easy understanding for users and when ticked all replies to comments close and show main comments only ...

I also would like to thank Alex for this code .... Far better than having to open replies to replies etc!

I have not bothered to change the label but I think it should be labelled as a toggle function such as Hide/Show replies since it really is a toggle function.  I mentioned this to Alex in my reply to him.  What would really be neat is for the label to change based on what it will do.  So with replies expanded by default, the label would say "Hide Replies" and then when you click it and hide replies, the label would change to "Show Replies".  I have done something similar on a template for my blogging site but not sure how easy that would be to implement in this case.  On my template it involved adding some javascript to handle the label.  Anyone have any ideas here?

Geeks, making the world a better place
Quote · 28 Apr 2013

 

I also would like to thank Alex for this code .... Far better than having to open replies to replies etc!

 Yes, I got a round of applause from my members when this was added; it was one of the more vocal complaints I got when I opened the beta site.

Geeks, making the world a better place
Quote · 28 Apr 2013

See my post ~17 days ago, regarding the functionality of this checkbox.

Actually, after applying Alex's fix, this checkbox can't really be said to expand or collapse. What it really does now is to toggle the state of a reply, so if a reply was expanded- it is now collapsed, and if it was collapsed- it is now expanded.

So you can have 2 comments with sub-replies to them, and one is expanded and one is collapsed, checking the "expand all" checkbox causes them to switch states, so the collapsed comment is now expanded, while the expanded comment is now collapsed. They will never again be both expanded or both collapsed unless you manually make them to be so.

 

I can't think of a scenario where this behavior makes any sense or benefits anyone. I can't even imagine why one would want to collapse replies even if it DOES get them all collapsed.

I preferred to hide this checkbox using CSS. I'm quite sure no one will miss it.

Quote · 28 Apr 2013

 

Actually, after applying Alex's fix, this checkbox can't really be said to expand or collapse. What it really does now is to toggle the state of a reply, so if a reply was expanded- it is now collapsed, and if it was collapsed- it is now expanded.

You are correct, just tested this and it behaves as you described.  Might be best as you said and just remove it.

Geeks, making the world a better place
Quote · 28 Apr 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.