Thanks to vkareh's patch, users of Node Limit Number can now limit the number of nodes created using a specific vocabulary term. See #710266: Node limit per taxonomy vocabular/term for more details.

It would be great if Node Limit Number had the ability to check CCK field values. This would make it possible for example to limit nodes per taxonomy term for sites that use the Content Taxonomy - CCK module for categorizing content.

vkareh suggested that it would be better to add this type of functionality using a sub-module and keeping Node Limit Number as light as possible.

Comments

vkareh’s picture

I'm subscribing to keep it in my queue. Thanks!

jdwfly’s picture

What other CCK fields do you think would be used for this type of thing? I would like to think of all the ways on might use the CCK fields so that we are not building a solution for only a single cck field.

One of the first steps to making this would be to setup a customizable query. vkareh has started in the right direction in the other issue, but it would be even better if there were hooks that could be fired to modify the query as needed.

vkareh’s picture

I like the idea of using hooks to modify the query (Drupal 7?).

For Drupal 6, though, without using a query builder object, how can we accomplish this? Ideas?

jdwfly’s picture

It may just have to wait for the drupal 7 version. I tried doing it one way with separate hooks for each part of the query but I found it became too difficult with more complex queries.

Of course we could require the http://drupal.org/project/dbtng module and use that just like we would in D7. I haven't tried that route yet, but it may be profitable to explore. I wouldn't mind making it required either since it is already in D7 core.

vkareh’s picture

Instead of making it a dependency, it could use if (module_exists('dbtng')), but this particular feature makes a lot more sense in D7.

I would definitely jump in with a basic implementation using CCK to limit number of nodes, similar to the way it does it with taxonomy terms... not sure how the UI would work, though... I'll ponder about it during DrupalCon and see if it inspires me :P

Desi Raaj’s picture

I'm very much interested in this feature, any possible way to accomplish this for a non coder in D6?