Community & Support

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

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

Thanks!

Mike

Comments

Is this really what you want ?

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

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

..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.