News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Invitation System

Started by hadesflames, July 21, 2010, 10:50:15 PM

Previous topic - Next topic

hadesflames

Link to Mod

Package Information

Latest Version: 1.1.2
Created by: hadesflames
Built for: SMF 2.0
Package: Invitation System
Special Thanks to: Arantor and ccbtimewiz for helping me out with some small bits of this mod =]

What is this?

This mod adds a full invitation system to your forum. With this, you can ONLY register if you have a key from one of the members, assuming the mod is enabled. The admin can set how many keys each member gets per renewal, and how many days before a renewal occurs, if at all. If you set a member group to -1, they get unlimited invites, and there is a feature called "roll over" where if the admin turns this option on, unused invites by a member "roll over" into the next month so that you can still use them, like AT&T's minutes if you know them.

Alteration Log

Version 1.1.2
[!]Removed edits to index.php
[!]Confirmed working with 2.0.7

Version 1.1.1

[!]Better permission set for invite menu button. - December 19, 2012
[!]A couple of minor optimizations. - December 19, 2012

Version 1.1

[!]Verified working with SMF 2.0.3. - December 17, 2012
[!]Verified working with SMF 2.0.2. - December 13, 2012
[!]Added integration hook support. - December 13, 2012
[!]Moved all language strings to own file. - December 13, 2012
[!]Added referral support. - December 13, 2012
[!]Added gift support. - December 13, 2012

Version 1.0.6

[!]Added batch email support. There must be the same amount of names as there are emails. Separate using a comma. - November 16, 2011
[!]Some perfectly valid emails would be "invalid" - November 16, 2011
[!]Confirmed working with SMF 2.0.1. - November 16, 2011

Version 1.0.5

[!] Support for pre smf 2.0 final versions dropped.
[!] Turkish translations provided by PLAYBOY added - June 21, 2011
[!] Confirmed working with 2.0 Final - June 21, 2011

Version 1.0.4

[!] Confirmed works with 2.0 RC5 - February 11, 2011
[!] Confirmed working with 2.0 RC4 - December 23, 2010
[!] Made the keys a bit more unique, before turning them into hashes - July 22, 2010.

Version 1.0.3

[!] Fixed some templating issues - June 25, 2010.

Version 1.0.2

[!] Fixed an error on install - June 24, 2010.

Version 1.0.1

[!] Fixed bugs, some settings were not in the DB on install, duplicate $txt, Remove all settings on uninstall did not remove some columns, causing an error on re-install - June 10, 2010.

Version 1.0

[!] Fixed bug, inactive keys still worked - May 18, 2010.
[!] Released - May 13, 2010.
[!] Confirmed works with 2.0 RC3 - May 09, 2010


Need Help?

If you need help with this modification, please don't hesitate to post in the support thread.

Info:
The referral part adds a field to a user's profile that shows who invited that user. For other members to see this field, they need to have permission to do so, which can be granted to different member groups in the permissions section of the admin panel. Regardless of that permission, users will be able to see who invited them.

The gift is a unique feature that allows members to send their own gifts to other members of the forum. In order for a member to be able to gift their invites to other members, they need to have the appropriate permission, same as the referral permission. If you don't want to use this feature, simply don't give anyone the permission.

License:

Version 1.1 and higher

This mod is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license. If you plan on distributing this mod in any way, there must be a link back to this page unless otherwise stated by a written agreement with the author. For full license details, visit this page:

http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode

or for a summary, visit this page, but take note of the disclaimer:

http://creativecommons.org/licenses/by-nc-sa/3.0/

Version 1.0 and 1.0.X

Licensed under the Simple Machines LLC license. This can be found here:

http://www.simplemachines.org/about/smf/license.php

NOTE:

THIS MOD IS SUPPORTED ONLY IN MYSQL!

ɔɔɔɔɔɔuɥoɾ

Nice, I have been waiting for an invitation system for RC3, well SMF 2 all together

Installed perfectly, checking it out now.

Good work, keep it up :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

hadesflames

Yeah, I figured I'd make one for the community to enjoy since there wasn't one for SMF 2.0 (except one, but it's not free)

I hope you'll all enjoy it.

~DS~

About time it got approved. ;)
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

hadesflames


ɔɔɔɔɔɔuɥoɾ

It installed perfectly, however, I have yet to try it out, I have so many members that only comeby once in a while, like mayby 80,000, I will prune the inactive ones and setup invitations only soon, just one question.

What are the odds that someone with half a brain at least, would use this mod on another smf forum, and generate a working key for any other smf forum?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

hadesflames

You know, I honestly never thought of that! XD

The odds are actually very quite low. Like, if it happened, it would truly be a site to see, however I doubt it will happen. None the less I'll come up with something in the generation function to eliminate those extremely low chances.

ɔɔɔɔɔɔuɥoɾ

So, you used the  uniqid  to generate the random string for the key?

I have not gone through the code yet lol


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

hadesflames

#8
Nah, I Generate random numbers, toss them into a string about 100 times, then I get the sha1 hash of that string, and compare it to the DB to make sure it doesn't already exist.

Edit:

Ok, I made the keys a bit more unique, I HIGHLY doubt someone will be able to use a key generated elsewhere now, not only that, keys expire after 7 days, so the possibility is nearly non-existent.

ɔɔɔɔɔɔuɥoɾ

Nice, :) will download later :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Sabre™

Very nice :)
You could also interrupt the reg by going directly to the "invite only" alert, so they wouldn't have to find out by filling in all the fields in the reg page first.
Good Job mate :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ɔɔɔɔɔɔuɥoɾ

Quote from: Sabre™ on July 22, 2010, 08:22:36 PM
Very nice :)
You could also interrupt the reg by going directly to the "invite only" alert, so they wouldn't have to find out by filling in all the fields in the reg page first.
Good Job mate :)

I have not tested the registration part yet, but Sabre is right, potential members should know, maybe adding it on the login box too would be cool


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

hadesflames

I think it's fine as is, and I will NOT be making any changes to it.

Sabre™

Quote from: ♪ JohnCcCcCc ♫ on July 22, 2010, 08:57:57 PM
... maybe adding it on the login box too would be cool

I think that's pretty cool aswell mate. But make that optional in the AP :)
I'm thinking permissions for the function/button etc aswell. So those which cannot invite(if any), cannot see anything.

Quote from: hadesflames on July 23, 2010, 12:12:56 PM
I think it's fine as is, and I will NOT be making any changes to it.

:D
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ɔɔɔɔɔɔuɥoɾ

Quote from: hadesflames on July 23, 2010, 12:12:56 PM
I think it's fine as is, and I will NOT be making any changes to it.

But how will Sabre

Quote
IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
lol


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Sabre™

LOL
I will be on this after lunch, the spoken suggestions should be added and checked by tonight, tomorrow if time restraints kick in ;)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


hadesflames

Go for it, but you can rest sure I won't be doing it.

Sabre™

I just looked at the other mod, and it does what I mentioned and more. Now I'm wanting the extras that mod offers lol
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


madman71

I just installed and it went just fine.

However when i clidk on the INVITE tab, i get this error:

Unknown column 'member_id' in 'where clause'
File: /home/celebri1/public_html/forum/Sources/Invite.php
Line: 332


when i try to generate a KEY, i get this errro:

Unknown column 'inv.key' in 'field list'
File: /home/celebri1/public_html/forum/Sources/Invite.php
Line: 922


this is in my LOGS:

Database Error: Unknown column 'member_id' in 'where clause'


SELECT COUNT(*) AS num_keys
FROM smf_invites
WHERE member_id = 1
Apply Filter: Only show the errors from this file
File: /home/celebri1/public_html/forum/Sources/Invite.php
Line: 332

hadesflames

Doesn't happen for me =]

Advertisement: