Chris Schmidt (crschmidt) wrote in component_help,
Chris Schmidt

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) {
        } else {

because that breaks the layout (see at ). 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.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened