CVS edit link for Jakob Stoeck
Hi,
The Organic Group module lets you invite other users to a group. Sadly, those invites are not saved in the database.
This module saves OG invitations persistently in a database and lets you use them for messages like "You have 3 pending group invites".
The module is fully working and is activated on http://www.balanceonline.org/. In the future I plan to add German translations and block/view support.
This functionality is not in any other module of which I know. An issue I created in the OG project: http://drupal.org/node/771138 (the code in this issue is old, please review the new code).
Best, Jakob
Comments
Comment #1
Jakob Stoeck commentedog_invite
Usage
After installation of the Organic Groups and OG Invite module use og_invite_load_pending() to get all invitations for the current user.
Example
Comment #2
Jakob Stoeck commentedComment #3
sunShouldn't this rather be added to http://drupal.org/project/invite ?
Comment #4
avpadernoReading the Invite module page, I notice there is a reference to a branch that would contain a module called (I know; the development is not done on Drupal.org). Would not be possible to cooperate with that?
Comment #7
avpadernoI am changing status as per previous comments.
Comment #8
Jakob Stoeck commented@kiamlaluno: In the thread you are speaking of, there is only a patch to og which was put to won't fix http://drupal.org/node/170332#comment-2423346 because there should be a module.
@sun: Isn't the Invite module for this use case: a registered user invites an unregistered one to a drupal website.
The OG Invite module is for organic group invites, not the website. I don't think they should depend on each other.
Comment #9
avpaderno@Jakob Stoeck: I was referring to the project page of the Invite module.
Comment #10
Jakob Stoeck commentedWould you give me a hint? The only mention on the Invite module page I see is the aforementioned thread which is on won't fix.
Comment #11
avpadernoI am sorry; I was referring to that part. I take the link was placed just to make an example of possible sub-module that could be created.
Comment #12
Jakob Stoeck commentedCould you please elaborate why this plug in should use the Invite module? The version on Github http://github.com/smk/invite is only for site invites. This is a completely different use case.
Invite module:
You can invite someone to register for your website. (with the new branch on Github you get hooks for that event)
OG Invite module:
You invite a registered (or unregistered) user to an organic group.
The OG Invite module is used to get Facebook-like messages when you log in, e.g. a message on the frontpage: "You have been invited to the Example Group". That's completely different to the purpose of the Invite module which sends an email to an unregistered user. I don't see an advantage in combining those modules but I'll open an issue there asking for a possible collaboration.
Comment #13
avpadernoThat makes clearer what is the difference between the proposed module, and the Invite module.
Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.
Comment #14
avpadernoSchema descriptions are not passed to
t().Comment #16
YK85 commentedI'm guessing #14 was suppose to be 'needs review'=>'needs work'?
I hope OG Invite module is added. Many thanks!
Comment #17
avpadernoI apologize for not being explicit: The status is the correct one, as I have already approved the CVS account. What I reported is what it needs to be changed, but it isn't an application stopper.
Comment #18
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #19
charles.holtzkampf commentedHi,
Wonder if anyone can offer some advice, if installed the module and enabeld it.
I then created a block containing the code as specified in the README:
I added that block to the profile page. However it nevers displays any invitations ? Im not sure what im doing wrong, im not a programmer, bu would really like to implement this on my site.
Any advice anyone can offer wold be greatly appreciated.
Comment #20
Isostar commentedCharles, you need to add the following line:
print theme('item_list', $approve);
Comment #21
Isostar commentedWill this module be further developed?
There is still missing/broken functionality.
To add notice for users that were not user on the time of invitation the query should be:
$invitations = db_query('SELECT * FROM {og_invite} WHERE invitee = %s OR (invitee=0 AND email= "%s") AND response = "none"', $uid,$user->mail);
It's not possible to deny invitations, og_invite_set_response($gid, 'no') is not triggered anywhere in the code.
Comment #22
timoguic commentedInterested to see the development of this module too!
Comment #23
avpadernoI am giving credits to the users who actively participated in this issue.