I have an event content type and I want to allow users to 'add' themselves to it the same as Facebook users would join an event. Any ideas?
-
1IMHO, using entityreference would not be the right way to achieve this. It can be achieved by using the flag module and add a flag to the content type so that user's could subscribe / add themselves to the project.– AjitSCommented Jul 12, 2013 at 12:36
-
I'm not sure what do you mean by "add user to a content type". Could you explain a bit more? Apparently Letharion understood you all right, so I accept it might be problem at my side, but if you could be so nice anyway?– MołotCommented Jul 12, 2013 at 12:52
-
Add a user in the same way that you can add a user to a facebook event for example. A collection of users are referenced in some way on the node. And these users when viewing the node, can instigate this reference.– Andrew WelchCommented Jul 12, 2013 at 13:27
-
1Having written an answer doesn't preclude me from having completely misunderstood the question ;) Though my understanding is just that the question is 'How do I let end users create and manage arbitrary connections between their user account and an entity". I would love for the question to be re-phrased like that, but it seems like to big an edit for me to make on behalf of the original poster.– LetharionCommented Jul 12, 2013 at 14:25
-
Please do make the edit :)– Andrew WelchCommented Jul 15, 2013 at 12:00
3 Answers
I believe you are looking for the Organic Groups module (https://drupal.org/project/OG).
This module allows you set your current content types to be 'subscribed' to. Thus users can join a group, or event in your case.
The group can have administrators where they can manage and invite users, such as setting to them active, pending or blocked.
We recently created a Drupal module that would allow a group members to invite other users, even if they were registered or new.
Organic Groups will also allow you your members to 'post' content INTO the group. E.g. you could post pictures relating to that event.
It's quite easy to setup and many tutorials around.
Hope this helps, Amarjit
-
I was talking about this yesterday. I will look into it.Have heard good and bad htings about the OG modules.- e.g. difficulty of configuration, but with some investigation should be able to figure it out. Commented Jul 26, 2013 at 8:59
-
My fear is that OG is too complex for what I want to do at the moment, and as far as I can see it uses entity reference for its associations. However, it may also solve one of the other problems I have which is how a user can assign other users to edit their content. Can you define what 'group' means here. Is it a group of users or a group of content or a group as in a 'real world group' like a classic car collectors club Commented Jul 26, 2013 at 9:17
-
A group is a collection of entities. User can belong to a group, along with content belonging to a group. At the center of this group, could be say a particular Page. This page may list information about this particular group. Think of it as the Event being a group and users being able to join that group. As well as this, users can post content to these groups. Thus every Event can have its own bunch of users.– AmarjitCommented Jul 27, 2013 at 20:00
-
Hi, is it easily possible to rename group to event across all instances of the 'group' naming? Commented Aug 10, 2013 at 22:19
-
I believe this is not possible, unless you are creating custom displays and calling the OG functions. However, there is some work being done to get this functionality. If you are familiar with Drupal modules and such, you can follow this thread on Drupal, Allow the ability to rename "groups" / assign labels to groups.– AmarjitCommented Aug 28, 2013 at 8:44
With Entity reference, this isn't very easy, because references are fields, and the permission management you need here is hard to do on a field level. You could still do it, but it would require a significant amount of custom work.
Consider using Relation or Flag instead.
You'll most likely get a better "out of the box experience" with the Flag module, but you will get better flexibility with the Relation module.
I've tried to convince one of Flag maintainers that the Flag is a special case of the Relation module and so should be based on it, but he didn't want to add a dependency.
-
1Yes, using flag is the best approach in this case of associating a user with a node on the fly, otherwise if we try to have the entity reference while viewing the node we need to achieve it through code.– dhrubajCommented Jul 12, 2013 at 13:42
-
1@djs Nothing prevents you from invoking the flag functions in your own code if you need both scenarios.– mpdonadio ♦Commented Jul 12, 2013 at 13:52
-
You can also use rules so when a user flags a node they are appended to the list in the entity reference field Commented Jul 12, 2013 at 14:54
-
Entirely true, but I don't quite like the solution because it's not very flexible. It breaks as soon as one wants to create a reference between and two entities that doesn't include the user itself because then there's no longer any owner tracking, and so the connection cannot be managed once created. Also I find rules to in theory be a cool module, but in practice have a hard to work with UI. Commented Jul 12, 2013 at 16:33
-
1I think you underestimate the power of Flaggings. Flagging doesn't only mean to create attention for it. Flagging are entities and they are also fieldable, that means you can also add a form to a flag. And you can get the list of users who has flagged a node with views. You can also use rules to trigger actions on events, for example send email to all users who has flagged the node before one week of the event date etc. You can do so many powerful things with Flags. Just don't underestimate :)– Elin Y.Commented Jul 28, 2013 at 13:43
The Entity Registration module should be a solution.
Entity Registration is a simple, flexible module for allowing and tracking user registrations for events, or just about anything you want people to sign up for. Entity Registration can be integrated with Drupal Commerce to allow fee-based registrations: sell tickets to your stuff! This module is also handy if you want to collect information along with registrations: like shoe-size for a bowling event.