Is there interest in a digg like functionality?

munikho - March 23, 2009 - 16:56
Project:AJAX Comments
Version:6.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I like the way the comment system works in digg, and i was wondering if there is interest in getting that to work in this module.
This includes having the indented comments hidden by default. So there is more overview.
I created it for one of my sites, so could help in making it happen.

#1

neochief - March 23, 2009 - 17:04

Yes, it is in battle plan, called "Thread Folding". If you're provide initial patch, I could put it in module faster.

#2

munikho - March 23, 2009 - 17:54

I included a patch here. It also fixes a placement issue i was having.

in the comment.tpl.php you need to add something like

<?php if(comment_num_replies($comment->cid)){
        if(
comment_num_replies($comment->cid) == 1){
           
$reply_one_many = ' reply';
        } else {
           
$reply_one_many = ' replies';
        }
        print
'<small class="read_replies">'.comment_num_replies($comment->cid) . $reply_one_many . '</small>';
    } ;
?>

to make a link with the number of replies in them that can be clicked to fold out the thread

I made a comment at every change i made, so you can just search for 'munikho'

Hope this works for you.

AttachmentSize
thread_folding.patch 3.46 KB
 
 

Drupal is a registered trademark of Dries Buytaert.