Advertisement:

Author Topic: Invitation System  (Read 81779 times)

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Invitation System
« on: July 21, 2010, 10:50:15 PM »
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!
« Last Edit: March 04, 2014, 01:17:10 PM by hadesflames »

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: Invitation System
« Reply #1 on: July 21, 2010, 11:13:49 PM »
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

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Invitation System
« Reply #2 on: July 22, 2010, 06:26:24 AM »
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.

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: Invitation System
« Reply #3 on: July 22, 2010, 07:10:46 AM »
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

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Invitation System
« Reply #4 on: July 22, 2010, 09:36:54 AM »
Indeed ;)

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: Invitation System
« Reply #5 on: July 22, 2010, 01:06:51 PM »
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

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Invitation System
« Reply #6 on: July 22, 2010, 01:24:29 PM »
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.

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: Invitation System
« Reply #7 on: July 22, 2010, 01:39:43 PM »
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

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Invitation System
« Reply #8 on: July 22, 2010, 05:32:46 PM »
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.
« Last Edit: July 22, 2010, 05:37:17 PM by hadesflames »

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: Invitation System
« Reply #9 on: July 22, 2010, 08:14:22 PM »
Nice, :) will download later :)

SMF 2.0 RC5

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

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Invitation System
« Reply #10 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 :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: Invitation System
« Reply #11 on: July 22, 2010, 08:57:57 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

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Invitation System
« Reply #12 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.

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Invitation System
« Reply #13 on: July 23, 2010, 06:51:56 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.

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 ;)


Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: Invitation System
« Reply #14 on: July 23, 2010, 07:09:05 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

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Invitation System
« Reply #15 on: July 23, 2010, 07:34:24 PM »
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 ;)


Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Invitation System
« Reply #16 on: July 23, 2010, 08:23:22 PM »
Go for it, but you can rest sure I won't be doing it.

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Invitation System
« Reply #17 on: July 24, 2010, 06:27:39 PM »
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 ;)


Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: Invitation System
« Reply #18 on: July 24, 2010, 10:55:47 PM »
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

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Invitation System
« Reply #19 on: July 24, 2010, 11:47:39 PM »
Doesn't happen for me =]