Promote a node to the front page after a certain number of comments?

mikeypotter - February 12, 2006 - 16:06

How do I promote a node to the front page of my website after it receives a certain number of comments?

Thanks!

Mike

Is this really what you want ?

bohtho - February 12, 2006 - 20:56

Is this really what you want ? I mean there is the Node Moderation module which lets readers vote on a node, and after a set number of points the node is promoted to the front page. So there's voting instead of comments that decide if the node is promoted. More logical ?

Else you have to hack this module or the comments module to achieve what you described above I think.

Good points

eaton - February 12, 2006 - 21:34

There are quite a few solutions available for automatic promotion based on voting, etc. It wouldn't be necessary to hack comments.module to do what the original poster asked, though. A contrib module could easily tap into hook_comment()'s insret $op, count the number of comments on the node in question, and promote the node if it's over a certain threshold.

--
Jeff Eaton | I heart Drupal.

Of course

bohtho - February 16, 2006 - 22:14

..that's what I should have said. It's better to isolate extra functionality and modularize/make a module which hooks into the existing comments module, instead of hacking/forking it (unless it's functionality that could be added to the existing one without bloating or changing its original function).

Still, I think you can achieve what you want through existing modules.

 
 

Drupal is a registered trademark of Dries Buytaert.