Hi everyone,

The organic groups integration is proving difficult, and I'm requesting some feedback on what you would like to see.

Currently, node_limit checks before the node form is presented and then either allows or disallows access to the node creation form depending on the results of the limitation check.

With Organic Groups, this won't be possible. From what I've learned about OG, node types can be designated to be content types within a group, but don't have to be. Here's the problematic scenario:

We have two node types, "Group" and "Group Post". Group Post is the type that can be posted within a Group (but doesn't have to be).
We also have a limitation: Only X "Group Post" nodes can be created within a specific group.

Suppose a group already has X "Group Post" nodes within it, and a user goes to create a new Group Post node. There's no way to determine beforehand if this new Group Post node will violate the limit, because the user has the option to not make it belong to a group.

The way around this is to tap into the node validation phase and check to make sure that the node wouldn't violate a limit if it were actually created. This isn't too hard to do, and this is where my real question is:

  1. Would you prefer to see limitation stay how it is (allow/disallow before presenting the form) and then tack on an additional limitation check during validation (and then present an error and refuse creation if a limit is passed)?

    OR
  2. Would you prefer to see ALL limitation take place during the validation phase? (IE, allow the user to begin making a node, but deny creation if it violates a limit)

Your feedback is appreciated. =)

Dave

Comments

g76’s picture

I'd say #1, it seems it would save users from filling out the entire form before receiving the limitation message, correct?

thanks for all the work!

Jen

Chompas’s picture

#1, without doubt

Rosamunda’s picture

I think #1 would be my opinion too.
A thought: Wouldn´t it be easier if this could work only with "Audience required" group post?
That way it would be mandatory to choose a group, and maybe easier to set this...

Tanks for creating this fantastic and much needed module!

Rosamunda

aeronox’s picture

I see difficulties when it comes to Posting to multiple groups.

Taxoman’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Category: support » task

#2 above would cause people to waste time. The checks should be done when entering the form.

Alternatively, IMO:

a) check on form load and present the user with limit warning ONLY for those groups he/she is member of that actually has reached their limit.

b) when the user clicks on the tick mark to select a group, use JavaScript to present a warning if that group has reached its limit, and if not using JS, then present that warning as a "preview" screen regardless of the user clicking on Save or Preview... (only present that IF the limit of any chosen groups have been reached)

c) When the user clicks on preview, the warnings should also be presented (only for selected groups that has reached their limit, of course)

This goes against 7.x first now, right? Changing accordingly.

duaelfr’s picture

Assigned: davedelong » duaelfr
Status: Active » Needs work

I think "a" is the better choice. We could just disable (and add a textual warning) the group checkbox when the limit for it has been reached.
Javascript can be disabled and preview can be setted facultative so I think the other options are not safe.

Thank you for this summary.

OG API evolved a lot since the first implementation from davedelong so I will need some time to get in from scratch. Please be patient ;)

Taxoman’s picture

Actually, my meaning was that a, b and c goes together, in that order, as one solution.

duaelfr’s picture

This feature is no longer planned for node_limit 1.0
I am sorry but OG integration is really too complicated for the moment.