Not logged in. · Lost password · Register
Forum: Support Ideas and suggestions RSS
Invite codes
Avatar
puck #1
Member since May 2008 · 13 posts · Location: Warsaw, Poland
Group memberships: Members
Show profile · Link to this post
Subject: Invite codes
Hello.

I added a patch to my board that uses "promo codes" in the registration.

Here`s why and how it works:
On my board I have a lot of subforums. Each of them is about a single project, website usually. Each of the subforums has it`s own group set up with ACL that allows to view and post to this group. The members group hasn`t got access to any forum.
So now, when someone registers, he/she has no rights granted until someone adds him/her to a group.

That`s why I added promo codes. While registering, you may enter a "promo code". If the the registration is successful, the promo code is entered and matches one of the groups` promo codes, the user is added to this group automatically,
Now, on every website I can add an invite link to the forum:
http://example.com/forum/forum.…?req=register&code=m…
When user registers, he gets access to the specified project-related subforum, without the need of administrator to add him manually. Yeah, I know that there are public groups, but thats not the same. Not anyone can find out the promo code, and giving a special link to register is easier than giving a simple link and a note: "after you register, please edit your profile, find groups and add yourself to Xyzzy group". ;-)

What`s under the hood?
Every group has another field, "promo code". It`s optional. Registration form has this field as well. When user registers, the code is checked against the codes in "GroupNames" table, and if a match is found, the user is added to this group.
For now I am doing a little magic to auto-create the promo codes (I didn`t have time to finish that), but for the registering user it changes nothing.

Patch attached. Briefly tested, so treat this as an alpha release. Does it have a chance to get to the next board release? Of course it needs to be finished (groupeditor and some configuration option to switch it off). This may be connected with "user invite" registration mode.
I find UNB very easy to modify and patch (and I usually don`t like it in other software), so I`d like to contribute a lot. And if my changes would land in the board`s base code, I wouldn`t have to worry about patching the new releases after upgrade. :-)
The author has attached one file to this post:
promo.patch 3.1 kBytes
You have no permission to open this file.
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Interesting idea. Could you think of doing that as a plugin as well? If yes, please tell me what hooks and configuration interfaces and what else you need for the plugin.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
puck #3
Member since May 2008 · 13 posts · Location: Warsaw, Poland
Group memberships: Members
Show profile · Link to this post
I don`t know if it would work out as a plugin. It requires at least two template modifications (registration form and group editor).
Anyway, the hook will be needed at the end of registration process, for sure.

Or maybe I should change the angle. For example: every user with "invite" privileges could have "invites editor". Invite codes could work the same, and could be mailed by the user to the specified e-mail address. Each of them would have an option to automatically bypass manual (admin) validation, and to add new user to specified groups (some kind of ACL restrictions should take place — only groups, that invite owner is already in?)
I could try to implement task #12 in some way, but it`s not in english. :)
Avatar
Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Task #12 is about sending an invitation through e-mail. It contains some optimisations related to that e-mail process that do not apply to your described promotion code approach.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 187.2 ms (98.1 ms) · 55 database queries in 138.2 ms
Current time: 2012-02-07, 20:40:23 (UTC +01:00)