Chris Schmidt (crschmidt) wrote in component_help,
Chris Schmidt
crschmidt
component_help

Rewriting print_comments

I know masterslacker has posted a tutorial on how to change the comment headers which involved rewriting print_comment, however, I'm looking to do something a little different. I'm looking at making a layout for a friend that would let her thread anything beyond third level comments (so you don't get the squished little boxes or pushing off to the side that you sometimes do). I know I have to override function EntryPage::print_comments (Comment[] cs) {, but I can't figure out exactly what component uses. It doesn't default to the core, which is :

function EntryPage::print_comments (Comment[] cs) {
    if (size $cs == 0) { return; }
    foreach var Comment c ($cs) {
        var int indent = ($c.depth - 1) * 25;
        "<div style='margin-left: ${indent}px; margin-top: 5px'>\n";
        if ($c.depth < 3) {
            $this->print_comment($c);
        } else {
            $this->print_comment_partial($c);
        }
        "</div>";
        $this->print_comments($c.replies);
    }
}


because that breaks the layout (see at http://www.livejournal.com/users/crschmidt/238227.html?nc=3&s2id=358367 ). Unfortunately, my knoweldge of this layout is kind of limited, so I was hoping someone might have an idea what HTML is used to generate those componenty boxes.

Thanks in advance for any help.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 12 comments