Replies and comment threads are shown at least two times - SOLVED THANKS

May 12, 2011 15:25

Good day to you...can you please save my sanity ( Read more... )

comments

Leave a comment

av8rmike May 12 2011, 15:50:25 UTC
Yeah, the developers introduced some weirdness in people's custom theme layers when they changed the way "full" and "collapsed" comments printed. I don't suppose you remember what you changed with your EntryPage::print_comment() function?

Reply

pensive1 May 19 2011, 17:35:47 UTC
You truly ARE the chosen one! (that is the best icon seriously)

Compiled with no errors, fixed like a boss! THANK YOU SO MUCH \o/

Reply

av8rmike May 19 2011, 19:25:38 UTC
Hahaha, that's the first time anyone called me either of those. You're very welcome!

Reply

angstbunny May 19 2011, 19:14:54 UTC
Directed here by pensive1. MUCH THANKS. Like a boss indeed.

Reply

theemdash May 20 2011, 23:17:30 UTC
I'm having this same problem and am either not understanding the fix or something else is wrong with my layout. Can you give me a hand (since you seem to know what you're doing)?

Reply

av8rmike May 23 2011, 14:14:05 UTC
What did you try so far, and what happened? Looking at your theme layer, it still looks like the old function code.

Reply

theemdash May 23 2011, 14:38:56 UTC
I changed it back since it hadn't fixed the problem and I didn't want to screw up anything.

I found the line with:
if (not $e.full) {
And I removed the sections you recommended in this comment, but the problem persisted. Any help you can give is appreciated since this problem is pretty much intolerable.

Reply

av8rmike May 23 2011, 14:40:45 UTC
OK, gotcha. You also need to remove the section towards the end of the function that I specified in the same comment, otherwise it will keep printing doubles.

Reply

theemdash May 23 2011, 14:51:55 UTC
I did that and now there's no threading.

Reply

av8rmike May 23 2011, 15:04:49 UTC
You have to do all of the things I mentioned.
Rename EntryPage::print_comment(Comment e) {
to EntryPage::print_comment_full(Comment e) {

Reply

theemdash May 23 2011, 15:10:44 UTC
I did that as well, and while there is no duplicate printing, the comments are no longer threaded.

Reply

av8rmike May 23 2011, 15:26:32 UTC
OK, there are a lot of changes that you'll need to make because that code you're using is pretty out of date. Rather than try to list them individually, I'll just give you a big segment to find & replace.
The part to remove:

function EntryPage::print_comment_full(Comment e) {
var string barc = "comment-" + ($e.depth % 2 ? "odd" : "even");
var string screenbarc = "";
var string borderwidth = "";
if ($e.screened) {
$screenbarc = "style=\"border-width: 3px; border-style: dashed\"";
}
var int num = 0;

var string id = $e.dom_id ? " id=\"comment-$e.talkid\"" : "";

"""

""";

The part to insert:

function EntryPage::print_comment_full(Comment e ( ... )

Reply

theemdash May 23 2011, 15:36:46 UTC
Thank you so much! And, yes, I've had this layout coming up on forever and am not the person who originally created it so I'm a bit lost on making changes to it.

You're the hero of the day! \o/

Reply


Leave a comment

Up