Hi there, thanks for this very nice module.

i'm working on a multilingual site and using your module.
if only one language is set, the limits work fine.

but each translation counts as a new node and for example if a user has the permission to create one node of one type, he/she cannot translate it even if he/she has the permission to do so because the translation is a NEW node of the same content type.

can you please advice me how to handle this situation?

thanks

Comments

mairav’s picture

I worked in a site with translations, and inside the rule I added a condition with Custom PHP, with the following code:


if (isset($node->translation_source)) {
  return FALSE;
}
return TRUE;

This way the limit is only applyed if the node is the original one, and not a translation.

I hope this helps you!

miaoulafrite’s picture

thanks, this looks nice, but in which rule is it supposed to be ?

mairav’s picture

If you created a rule saying a user can create 5 nodes of events, for example, in the "IF" part, you should have one condition that checks the node type or the role. The other condition, should be a Custom PHP with the code I gave you before.

An then, in the "DO" part, you should add the message you want your users to see.

miaoulafrite’s picture

thanks mairav, but actually i did not use any rule to control the amount of nodes created by a user, since this is what the module is supposed to do, and does.

or?

jdwfly’s picture

Status: Active » Closed (won't fix)