Comment support

memfis - December 26, 2008 - 13:03
Project:Filter by node type
Version:6.x-1.2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

Hello!

I made modifications to support comments in 6.x-1.2 before finding out that there is similar work being done for 6.x-dev. But after reading the discussion in #154760: not available for comments? I can say that at least I'm doing a few things right:
* there are separate settings for the node type itself and its comments,
* the settings are kept in the Submission and Comments sections, respectively (I am doing the hook_form_alter hook slightly differently - but nothing fancy, really - so the comment.module does not overwrite my form),
* the code is slightly refactored so there is no code duplication.

By the way, I added an "administer filters" permission (seems there is such thing in 6.x-dev, however).

Check it out. Maybe it will be useful to someone not willing to upgrade to 6.x-dev or it could help to solve some of the 6.x-dev patch's deficiencies.

I'm not sure about one thing, however. When altering the comment submission form I load the node to check its type - maybe there's a better way of doing this? Is this information already available? I'm just begging coding in Drupal, so I might be missing something.

Anyway, have fun.

Marcin

AttachmentSize
filterbynodetype+comments.patch6.65 KB

#1

heyrocker - May 29, 2009 - 19:50
Status:needs review» closed

The patch in #154760 has been committed so closing this.

#2

Crell - May 29, 2009 - 20:18
Status:closed» duplicate
 
 

Drupal is a registered trademark of Dries Buytaert.