hello, thanks for a nice and useful module, how can we set up limit per domain ?
i mean, what i need limit number of nodes for users per domain (created via domain access).
e.g. each user can create only N nodes of some type per each domain on drupal system
Comments
Comment #1
ionmedia commentedthere are 2 ways:
1st: just write boolean condition via custom php code for counting number of created nodes (by this type, user, and affiliated on this domain). in this case we don't need this module at all
2nd: just add new condition with case "on this domain" for this module.
i don't know how to build a query for select, but this idea is very simple, just select nid in $q and count how much rows selected in $sql query, there we search all strings from current domain with nid, matching our user's uid.
please, help me to build this query
Comment #2
skizzo commentedI am not using it... but have you tried Domain Settings?
"allows forms for other modules to save different settings for each of your affiliate sites [...]
[...] This module only works with forms that do not modify the handling of system_settings_form"
Comment #3
ionmedia commentedwhat you mean under "Domain Settings" ?
Comment #4
skizzo commentedI mean the domain_settings module included in the Domain Access suite.
Comment #5
jdwfly commentedDoes the domain access module integrate with rules? If so I would think it would be pretty straight forward to create the rule then.
Comment #6
ionmedia commentedyes, we have domain settings, but module counts quota by this code (#1) and where is no correction of node affiliate or source domain of node. whats what i mean, can we add this feature for this module ?
Comment #7
jdwfly commentedFirst, feature requests are not critical, moving to normal.
Second, I don't use the domain access module and I don't really ever plan to use it. As far as getting some integration into Node Limit Number there are a couple of ways to go about doing this. I am really thinking about how to make it so that the SQL statement is customizable for many situations which would allow for integration for many modules. I don't want to just keep throwing more and more integration code for various modules when there is probably a better, broader solution that could integrate many modules.
Comment #8
mooru commentedThis is a work around if you are trying to use the Domain Access to limit the number of nodes per domain
The following modules will be needed. Views, Views Rules, Conditional Rules
First create a node count of the content type using views.
Create a views rules of the newly created view page. You can set filter of only one content type
Add a new rule,