Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: hadesflames on July 21, 2010, 10:50:15 PM

Title: Invitation System
Post by: hadesflames on July 21, 2010, 10:50:15 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2567)

Package Information

Latest Version: 1.1.2
Created by: hadesflames (http://www.simplemachines.org/community/index.php?action=profile;u=109619;sa=summary)
Built for: SMF 2.0
Package: Invitation System
Special Thanks to: Arantor (http://www.simplemachines.org/community/index.php?action=profile;u=53626) and ccbtimewiz (http://www.simplemachines.org/community/index.php?action=profile;u=111571) 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 (http://www.simplemachines.org/community/index.php?action=profile;u=74699) 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!
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ 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 :)
Title: Re: Invitation System
Post by: hadesflames 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.
Title: Re: Invitation System
Post by: ~DS~ on July 22, 2010, 07:10:46 AM
About time it got approved. ;)
Title: Re: Invitation System
Post by: hadesflames on July 22, 2010, 09:36:54 AM
Indeed ;)
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ 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?
Title: Re: Invitation System
Post by: hadesflames 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.
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ 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
Title: Re: Invitation System
Post by: hadesflames 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.
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ on July 22, 2010, 08:14:22 PM
Nice, :) will download later :)
Title: Re: Invitation System
Post by: 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 :)
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ 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
Title: Re: Invitation System
Post by: 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.
Title: Re: Invitation System
Post by: Sabre™ 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
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ 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
Title: Re: Invitation System
Post by: Sabre™ 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 ;)
Title: Re: Invitation System
Post by: hadesflames on July 23, 2010, 08:23:22 PM
Go for it, but you can rest sure I won't be doing it.
Title: Re: Invitation System
Post by: Sabre™ 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
Title: Re: Invitation System
Post by: madman71 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
Title: Re: Invitation System
Post by: hadesflames on July 24, 2010, 11:47:39 PM
Doesn't happen for me =]
Title: Re: Invitation System
Post by: madman71 on July 26, 2010, 12:57:12 AM
thanks Hades,

must be  conflicting  with another mod or something. oh well.
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ on July 30, 2010, 10:53:13 PM
"This is an outdated mod that is no longer supported by its author. Use at your own risk "

What happened, this mod was like just submitted, not even 3 pages, ???
Title: Re: Invitation System
Post by: hadesflames on July 31, 2010, 04:58:54 PM
I dropped support to all my mods.

Getting tired of SMF...Don't worry though, the mod works well...

EDIT:

Also, this mod was NOT "just" submitted. It got submitted two months ago. It was only recently "approved" there is a difference...
Title: Re: Invitation System
Post by: timmytimmy on August 12, 2010, 03:39:18 AM
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

happens to me as well.  i just installed 2.0 RC3, and this is the second mod i installed (first being a karma one).

i guess i'm out of luck?
Title: Re: Invitation System
Post by: timmytimmy on August 12, 2010, 09:31:24 PM
hadesflames would you be willing to fix this for $$$$ ?
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ on August 12, 2010, 09:34:04 PM
I dropped support to all my mods.

Getting tired of SMF...Don't worry though, the mod works well...

EDIT:

Also, this mod was NOT "just" submitted. It got submitted two months ago. It was only recently "approved" there is a difference...

Well, you know what I mean lol :P
Title: Re: Invitation System
Post by: timmytimmy on August 15, 2010, 01:48:08 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

i know this comes up as a database error, but i double checked all of the file edits to make sure they were okay, and i think everything is fine.  that being said, is there anyone who can give me some advice on how i might go about fixing the database issues?  in phpMyAdmin i can see that this mod creates a "smf_invites" table, but that's my limit as far as what i know/understand about databases.
Title: Re: Invitation System
Post by: hadesflames on September 01, 2010, 04:18:51 PM
Have you guys tried asking your hosts about this? It doesn't happen to me, and seeing as it didn't happen to any cust team member (otherwise the mod wouldn't have been approved) or anyone else for that matter, there's nothing wrong with the code itself...
Title: Re: Invitation System
Post by: Sabre™ on September 01, 2010, 05:20:06 PM
Run install.php through your browser
Title: Re: Invitation System
Post by: rd on September 02, 2010, 12:24:58 AM
This is a great mod, pretty useful to private forums.
Title: Re: Invitation System
Post by: cieplutki on September 25, 2010, 09:48:20 AM
Thanks for this great mod
Title: Re: Invitation System
Post by: hadesflames on December 23, 2010, 05:51:54 PM
I've confirmed that this mod works with 2.0 RC4
Title: Re: Invitation System
Post by: 4T3IG0 on January 01, 2011, 02:28:34 PM
Hi

Great Mod. I have only one problem, invitations go directly to spam. Any idea how to fix this?

Tnks   :)

Title: Re: Invitation System
Post by: Oranos on January 07, 2011, 04:05:21 PM
It's not a problem with the mod. If invitations are going to spam, then any email being sent by your forum goes to spam as well.
Title: Re: Invitation System
Post by: kingkingston on January 10, 2011, 04:53:42 AM
the invitation button isn't showing and the action isn't working properly, am i meant to cmod it or change the language of my forum and if so where do you do it, i couldn't find it anywhere
Title: Re: Invitation System
Post by: general_issimo on January 21, 2011, 05:21:48 AM
Hey Hadesflames,
this is really a very cool mod - exactly what I was looking for.
Nevertheless, I have a problem.
I have several Groups to limit access-levels to boards in my 2.0RC4 installation.
Now we want to restrict registration to invitation only. So your mod is perfect for us.
So I installed the mod and even have almost everything translated to german, yet.
But i still have a problem.
Where restrictions in Groups, who may create new invitation codes seem to work, a newly registered user has unlimited rights to create and send codes. Even though, I used another mod to move the user to a specific group on registration and limit the rights to 0
Any idea, what the problem can be?


#Update: Looks like any newly registered user can generate codes. Once, I manually assign a group, restriction works. But I will keep an eye on it, since I don't really rely on that behavior, yet. Is that a bug?
Title: Re: Invitation System
Post by: general_issimo on January 25, 2011, 04:48:22 AM
I had some more investigation on this.
All newly registered users can generate invitation codes - even if they are moved to another Usergroup, at regegistration with http://custom.simplemachines.org/mods/index.php?mod=1804

Only moving a user to another group after registration will enable the permission-system of invitations.
It makes no difference, if the user is added to a group by any mod or joins to another group, himself. Even leaving the group won't affect the restrictions to work.
So really only newly registered users can fully create new codes.
Can anyone recreate that issue?
Title: Re: Invitation System
Post by: hadesflames on January 27, 2011, 01:06:45 PM
When someone registers on your forum, they are initially assigned to the member group "Newbie" (or whatever your 0 post count member group is) do you have the restrictions in place for that member group? Make sure they aren't set to -1, as that would allow unlimited invitation key generations for that member group. Also, if you have a mod that places people on a certain member group on registration, but it doesn't work, you should talk to that mod's author about that.
Title: Re: Invitation System
Post by: hadesflames on February 11, 2011, 10:44:41 PM
Confirmed working with RC5
Title: Re: Invitation System
Post by: kingkingston on March 30, 2011, 09:32:57 PM
it is an alright mod but would be better if it allowed people to register if they haven't been invited
Title: Re: Invitation System
Post by: hadesflames on June 03, 2011, 10:01:15 PM
it is an alright mod but would be better if it allowed people to register if they haven't been invited

What do you mean? The entire point of this mod is to restrict membership to invitations only. Otherwise it wouldn't need to generate codes. As a matter of fact, if you wanted to just send invitations to have people register, you could just have your members do it themselves, without having a mod for it at all...
Title: Re: Invitation System
Post by: kingkingston on June 09, 2011, 01:39:39 AM
it is an alright mod but would be better if it allowed people to register if they haven't been invited

What do you mean? The entire point of this mod is to restrict membership to invitations only. Otherwise it wouldn't need to generate codes. As a matter of fact, if you wanted to just send invitations to have people register, you could just have your members do it themselves, without having a mod for it at all...
yes it only allows people to sign up if they have been invited to, what if a person stumbles across your website and wants to join but can't because they haven't been invited.
Title: Re: Invitation System
Post by: live627 on June 09, 2011, 01:43:51 AM
And that's the whole point, no?
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ on June 09, 2011, 01:46:39 PM
There is a disable invitation mod option there too if you want open registrations...

And yes, that is the whole point, its for private forums.
Title: Re: Invitation System
Post by: hadesflames on June 13, 2011, 04:21:17 PM
it is an alright mod but would be better if it allowed people to register if they haven't been invited

What do you mean? The entire point of this mod is to restrict membership to invitations only. Otherwise it wouldn't need to generate codes. As a matter of fact, if you wanted to just send invitations to have people register, you could just have your members do it themselves, without having a mod for it at all...
yes it only allows people to sign up if they have been invited to, what if a person stumbles across your website and wants to join but can't because they haven't been invited.

That is exactly the point. If you have a forum that you want to restrict membership ONLY to those invited by the community, you would want this mod. A very good example of a potential user are those women who set up motherhood/pregnancy forums and don't want random people lurking around that are not mother/future mothers. With this mod, they know that the only people that can sign up are those whom they themselves have invited. Of course, this is only one example of a potential user.
Title: Re: Invitation System
Post by: general_issimo on June 14, 2011, 04:32:30 AM
Anyone else having compatibility-problems with SMF2.0 (final)?
Title: Re: Invitation System
Post by: PLAYBOY on June 19, 2011, 12:29:21 PM
Will you add it to the next update if i translate it to Turkish?
just give me the texts.

Is it compatible with 2.0 yet? Can i install and use it right away?
Title: Re: Invitation System
Post by: hadesflames on June 19, 2011, 01:35:18 PM
Will you add it to the next update if i translate it to Turkish?
just give me the texts.

Sure just post the translations and I'll add 'em in.

Is it compatible with 2.0 yet? Can i install and use it right away?

I have not yet tested it on 2.0 gold. Once I find the free time to do so (perhaps later on today if I finish studying early enough) I'll update it and post accordingly. Once you see that the mod page says it's compatible with 2.0 final, it will be.
Title: Re: Invitation System
Post by: PLAYBOY on June 19, 2011, 02:08:31 PM
Turkish Translation:

$txt['invite_system'] = 'Davet Sistemi';
$txt['invite_system_mod_settings'] = 'Ayarlari Degistir';
$txt['invite_system_mod_settings_desc'] = 'Davet sistemi icin ayalari degistir.';
$txt['invite_system_mod_settings_group'] = 'Uye gruplari ayarlarini degistir';
$txt['invite_system_mod_settings_group_desc'] = 'Kisisel uye grubu ayarlarini degistir.';
$txt['invite_system_mod_manage'] = 'Anahtarlari Yonet';
$txt['invite_system_mod_manage_desc'] = 'Butun davetiye anahtarlarini yonet';
$txt['invite_system_mod_generate'] = 'Davetiye Anahtari Yarat';
$txt['invite_system_mod_generate_desc'] = 'Yeni bir davetiye anahtari yarat.';
$txt['invite_system_mod_email'] = 'Email ayarlari';
$txt['invite_system_mod_email_desc'] = 'Email ayarlarini yonet.';

$txt['invite_blank'] = 'Davetiye anahtari bolumunu bos biraktiniz';
$txt['invite_wrong'] = 'Girdiginiz davetiye anahtari yanlis';

$txt['invite'] = 'Davetler';
$txt['invite_key'] = 'Davetiye anahtari:';
$txt['invite_manage'] = 'Davet anahtarlarini yonet';
$txt['invite_generate'] = 'Davet anahtari yarat';
$txt['invite_email_send'] = 'Davetiyeyi email ile gonder';

$txt['scheduled_task_invitePrune'] = 'Aktif olmayan anahtarlari sil';
$txt['scheduled_task_desc_invitePrune'] = '7 gunden fazla aktive olmamiz davetiyeleri siler';
$txt['scheduled_task_keyExpire'] = 'Davetiyelerin gecerlilik suresi';
$txt['scheduled_task_desc_keyExpire'] = 'Belli bir sure kullanilmayan davetiyeleri gecersiz kil';
$txt['scheduled_task_keyRenew'] = 'Davetiyelerin yenilenme zamani';
$txt['scheduled_task_desc_keyRenew'] = 'Uyelerin yaratabildigi davetiyeler yeniler..';

$txt['invite_settings_title'] = 'Davet Sistemi Ayarlari';
$txt['invite_enabled'] = 'Davet sistemini aktive et';
$txt['invite_email'] = 'Email ile daveti aktive et';
$txt['invite_email_member'] = 'Anahtari gonder';
$txt['roll_over'] = 'Davetlerin bir sonraki aya gecebilmesine izin ver?';
$txt['key_renew'] = 'Uyelerin daha cok davet anahtarina sahip olabilmesi icin gereken dun sayisi (0 = asla yenileme)';
$txt['key_expire'] = 'Anahtarin kac gun gecerli kalacagi (0 = asla gecersiz olmaz)';
$txt['invite_groups'] = 'HEr grup icin davet sayisi:<br />-1 = limitsiz.';
$txt['invite_reg_page'] = 'Davet numarasi:';
$txt['invite_error'] = 'Hata';
$txt['invite_email_subject'] = 'Email\'inin Konusu';
$txt['invite_email_message'] = 'Email\'inin icerigi<br />
Degisken icerik:<br />
{invitee} = Alici\'nin Adi<br />
{inviter} = Gondern\'nin Adi<br />
{forum} = Forum\'un Adi<br />
{message} = Gonderen\'in aliciya mesaji**<br />
{link} = Kayit sayfasinin linki**<br />
{key} = Davetiye numarasi**<br />
**Konu icerisinde kullanilamaz';
$txt['invite_email_title'] = 'Email ile bir davet gonder';
$txt['invite_email_invalid'] = 'Girdiginiz email adresi gecersiz.';
$txt['invite_email_empty'] = 'Gerekli alani bos biraktiniz. Tekrar deneyin.';
$txt['invite_email_sent'] = 'Kisiye davetiye numarasi basari ile gonderilmistir.';
$txt['invite_email_not_sent'] = 'Davetiyenizi gondermede bir sorun olustu. Admini konuda haberdar ediniz.';
$txt['invite_email_recipient_name'] = 'Alici\'nin Adi';
$txt['invite_email_recipient'] = 'Alici\'nin Emaili';
$txt['invite_email_recipient_message'] = 'Aliciya Mesaj';
$txt['invite_new_key_head'] = 'Yeni Davetiye Anahtrariniz';
$txt['invite_new_key'] = 'Yeni Davetiye Numaraniz:<br /><br />';
$txt['invite_no_key'] = 'Suan icin daha fazla davetiye yaratamazsiniz.<br />Konu ile ilgili Admini haberdar edebilir kendisinden detayli bilgi edinebilirsiniz.';
$txt['invite_system_no_keys'] = 'Henuz davet anahtari yok.';
$txt['invite_system_key_id'] = 'Davet anahtari numarasi';
$txt['invite_system_member_name'] = 'Yaraticinin Ismi';
$txt['invite_system_key'] = 'Anahtar';
$txt['invite_system_status'] = 'Statu';
$txt['invite_system_remove'] = 'Secilenleri Sil';
$txt['invite_system_remove_all'] = 'Hepsini Sil';
$txt['invite_system_change'] = 'Statuyu Degistir';
$txt['invite_system_remove_confirm'] = 'Secili Anahtarlari Silmek Uzeresiniz';
$txt['invite_system_remove_all_confirm'] = 'Butun Anahtarlari Silmek Uzeresiniz';
$txt['invite_system_change_confirm'] = 'Secili anahtarlarin statusunu degistirmek uzeresiniz';
$txt['active'] = 'Aktif';
$txt['nactive'] = 'Aktif Degil';
$txt['save'] = 'Kaydet';
$txt['send'] = 'Gonder';


It was way longer than i thought :)

I am waiting for the update so i can install it. Thank you.
Title: Re: Invitation System
Post by: hadesflames on June 21, 2011, 01:29:06 PM
Works with 2.0 final.
Title: Re: Invitation System
Post by: PLAYBOY on June 21, 2011, 08:23:52 PM
Installation process was good but after installation i cant see the INVITE tab. Its just blank and when you go to invite page it gives this error.
Unknown column 'member_id' in 'where clause'
Dosya: /home/site/public_html/forum/Sources/Invite.php
Satır: 332

When i try to see it in default theme i get message/error on top of the page

//Invitation System Mod $txt['invite'] = 'Davetler'; $txt['invite_key'] = 'Davetiye anahtari:'; $txt['invite_manage'] = 'Davet anahtarlarini yonet'; $txt['invite_generate'] = 'Davet anahtari yarat'; $txt['invite_email_send'] = 'Davetiyeyi email ile gonder';    <<<<< Thas Turkish BTW.

Plus i see many blank buttons/spaces in admin panel invite section.
 

Can you please fix the issues/bugs?
I got many wierd errors.
Title: Re: Invitation System
Post by: live627 on June 21, 2011, 10:56:38 PM
Quote
I got many wierd errors.
And you only posted one. Are they all the same?
Title: Re: Invitation System
Post by: PLAYBOY on June 22, 2011, 01:08:37 PM
1- i cant see the INVITE tab. Its just blank
2- when you go to invite page it gives this error.
Unknown column 'member_id' in 'where clause'
Dosya: /home/site/public_html/forum/Sources/Invite.php
Satır: 332

3- When i try to see it in default theme i get message/error on top of the page

//Invitation System Mod $txt['invite'] = 'Davetler'; $txt['invite_key'] = 'Davetiye anahtari:'; $txt['invite_manage'] = 'Davet anahtarlarini yonet'; $txt['invite_generate'] = 'Davet anahtari yarat'; $txt['invite_email_send'] = 'Davetiyeyi email ile gonder';    <<<<< Thas Turkish BTW.

4- Plus i see many blank buttons/spaces in admin panel invite section.

Can you please fix the issues/bugs?
I got 4 wierd errors :)
Title: Re: Invitation System
Post by: Fred Biles on June 23, 2011, 03:01:35 PM
I had these errors when I went to install the mod on SMF 2.0

Under Manage Keys

Database error

Unknown column 'inv.invite_id' in 'field list'
File: /dir/subdir/subsubdir/Sources/Invite.php
Line: 862

Under Generate Invitation Key

Database error

Unknown column 'inv.key' in 'field list'
File: /dir/subdir/subdir/Sources/Invite.php
Line: 922

I had to uninstall it.

I found, using my ftp program that CHMODing my Sources folder to 777 and then reinstalling the mod got rid of the errors. After a recent upgrade to SMF 2.0, most of my other folders were already CHMODed to 777 but not the Sources folder. That did the trick and everything works fine.

One improvement suggestion for the mod. When an admin sets the number of invites they have (for each membergroup), it would be nice to tell them how many they have left during the process.

Also, when a member clicks on the Invite button, then chooses to generate an invite key, they may then see the tab for sending an invite key though email, they may then click on that thinking they are sending the same key when instead they are generating another key. Under the email tab, it if they had already generated a key first, it would be nice if it just used that key.

Thanks for this great mod!
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ on June 23, 2011, 03:08:04 PM
Thanks, this works fine for me on SMF 2.0 final.
Title: Re: Invitation System
Post by: PLAYBOY on June 26, 2011, 09:04:41 PM
Something is wrong with the Turkish translation. It puts this line on top of every page

//Invitation System Mod $txt['invite'] = 'Davetler'; $txt['invite_key'] = 'Davetiye anahtari:'; $txt['invite_manage'] = 'Davet anahtarlarini yonet'; $txt['invite_generate'] = 'Davet anahtari yarat'; $txt['invite_email_send'] = 'Davetiyeyi email ile gonder';

Can somebody help me please? I think there is a bug in the mod in turkish translation.
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ on June 26, 2011, 11:23:02 PM
Something is wrong with the Turkish translation. It puts this line on top of every page

//Invitation System Mod $txt['invite'] = 'Davetler'; $txt['invite_key'] = 'Davetiye anahtari:'; $txt['invite_manage'] = 'Davet anahtarlarini yonet'; $txt['invite_generate'] = 'Davet anahtari yarat'; $txt['invite_email_send'] = 'Davetiyeyi email ile gonder';

Can somebody help me please? I think there is a bug in the mod in turkish translation.

The bug would likely be with the translation file itself, compare the English and Turkish language files and you should find the bad code.
Title: Re: Invitation System
Post by: PLAYBOY on June 27, 2011, 12:55:39 PM
ok i found the bug. This code

//Invitation System Mod
$txt['invite'] = 'Davetler';
$txt['invite_key'] = 'Davetiye anahtari:';
$txt['invite_manage'] = 'Davet anahtarlarini yonet';
$txt['invite_generate'] = 'Davet anahtari yarat';
$txt['invite_email_send'] = 'Davetiyeyi email ile gonder';

doesnt get added before the

?>

But it adds it After

So that creates an error and puts the txt off the code, On the screen.
Title: Re: Invitation System
Post by: PLAYBOY on June 27, 2011, 01:00:52 PM
I still get this error though on the invite page on any language...

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

Can somebody fix these errors/bugs please?
Title: Re: Invitation System
Post by: Fred Biles on June 27, 2011, 07:04:28 PM
I still get this error though on the invite page on any language...

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

Can somebody fix these errors/bugs please?

Use chmod on the Sources folder and see if it is not 777. If not, unistall the Invitation system, chmod the Sources folder to 777, then reinstall the Invitation system. I had a number of errors and that fixed them for me.
Title: Re: Invitation System
Post by: PLAYBOY on June 28, 2011, 12:06:02 AM
Wouldnt it make/create any security hole? or decrease the security of the forum?
Title: Re: Invitation System
Post by: Fred Biles on June 28, 2011, 03:02:47 PM
Wouldnt it make/create any security hole? or decrease the security of the forum?

I know that, in the upgrade instructions for going to SMF 1 to SMF 2, it has one chmoding various folders to 777and the question was answered there that it was not necessary to change them back.
Title: Re: Invitation System
Post by: PLAYBOY on June 28, 2011, 05:45:13 PM
I dont get it much. setting 777 to source folder wouldnt make any security hole? Is that what you are saying?
Title: Re: Invitation System
Post by: Fred Biles on June 28, 2011, 06:18:56 PM
I dont get it much. setting 777 to source folder wouldnt make any security hole? Is that what you are saying?

Based on the answer I saw, yes. Also, if you were still worried, after you installed it and everything was working ok, you could CHMOD it back (the Sources folder).
Title: Re: Invitation System
Post by: PLAYBOY on June 29, 2011, 06:09:21 PM
No. I just tried it but changing the chmod doesnt make any difference for me. I still get the error.

Looks like many people has the same error.

I have spent 1 hour translating this mod to turkish. Can please anybody (including the writer of the mod) find a solution to this problem?

Unknown column 'member_id' in 'where clause'
Dosya: /home/site/public_html/forum/Sources/Invite.php
Satır: 332

I am afraid its conflicting with other mods but which ones and why?
Would it be cb|login mod?

HELP PLEASE!
Title: Re: Invitation System
Post by: Fred Biles on June 29, 2011, 06:29:51 PM
No. I just tried it but changing the chmod doesnt make any difference for me. I still get the error.

Looks like many people has the same error.

I have spent 1 hour translating this mod to turkish. Can please anybody (including the writer of the mod) find a solution to this problem?

Unknown column 'member_id' in 'where clause'
Dosya: /home/site/public_html/forum/Sources/Invite.php
Satır: 332

I am afraid its conflicting with other mods but which ones and why?
Would it be cb|login mod?

HELP PLEASE!

You said you tried CHMODing the folder to 777, but did you uninstall the mod., then do the CHMOD to 777, and then reinstall the mod?
Title: Re: Invitation System
Post by: PLAYBOY on June 29, 2011, 06:36:56 PM
Quote
You said you tried CHMODing the folder to 777, but did you uninstall the mod., then do the CHMOD to 777, and then reinstall the mod?

You are the Man!
Thank you. Now its perfect.
Title: Re: Invitation System
Post by: Jessica. on June 29, 2011, 06:43:53 PM
How would I fix the Message to Recipient box?
Title: Re: Invitation System
Post by: PLAYBOY on June 29, 2011, 07:01:09 PM
How do i set the registration to be only with invitation?
Right now anybody can register through  http://www.site.com/forum/index.php?action=register

Also the writer of the mod needs to fix the bug. (http://www.simplemachines.org/community/index.php?topic=391962.msg3090537#msg3090537)
Title: Re: Invitation System
Post by: Jessica. on June 29, 2011, 07:05:05 PM
How do i set the registration to be only with invitation?
Right now anybody can register through  http://www.site.com/forum/index.php?action=register

Also the writer of the mod needs to fix the bug. (http://www.simplemachines.org/community/index.php?topic=391962.msg3090537#msg3090537)

I would love to know as well
Title: Re: Invitation System
Post by: PLAYBOY on June 29, 2011, 07:22:37 PM
Also how do i change the senders email adress?
Right now it shows the servers email adress which is pretty wrong for me.
Title: Re: Invitation System
Post by: Spoogs on June 29, 2011, 07:27:48 PM
How do i set the registration to be only with invitation?
Right now anybody can register through  http://www.site.com/forum/index.php?action=register

Also the writer of the mod needs to fix the bug. (http://www.simplemachines.org/community/index.php?topic=391962.msg3090537#msg3090537)

I would love to know as well
It is enabled when you enable the mod... on register you will see an additional field for the invite key, once the mod is enabled invitation is the only form of registration permitted (at least so it seems).
Title: Re: Invitation System
Post by: PLAYBOY on June 29, 2011, 08:23:01 PM
1- Is there a way to hide the invite tab from members who are not allowed to send an invitation?

2- Also how do i change the senders email adress?
Right now it shows the servers email adress which is pretty wrong for me.

3- It sends the Admins email adress on top of every email message. Why? and how to delete that?

4- How can i make the "Message to recipient" box to be not required to fill? or put a default value so it wont ask for a value in message box every time.
Title: Re: Invitation System
Post by: Fred Biles on June 30, 2011, 02:05:08 PM
Quote
You said you tried CHMODing the folder to 777, but did you uninstall the mod., then do the CHMOD to 777, and then reinstall the mod?

You are the Man!
Thank you. Now its perfect.

You're welcome. Glad I could help  :)
Title: Re: Invitation System
Post by: PLAYBOY on June 30, 2011, 10:52:14 PM
1- Is there a way to hide the invite tab from members who are not allowed to send an invitation?

2- Also how do i change the senders email adress?
Right now it shows the servers email adress which is pretty wrong for me.

3- It sends the Admins email adress on top of every email message. Why? and how to delete that?

4- How can i make the "Message to recipient" box to be not required to fill? or put a default value so it wont ask for a value in message box every time.

Can anybody answer my questions please?
I am pretty desperate here!

Are they very hard to answer?
I translated the entire mod in Turkish so that i could use it. But there are errors and problems.
Title: Re: Invitation System
Post by: PLAYBOY on July 02, 2011, 05:46:16 AM
Quote
3- It sends the Admins email adress on top of every email message. Why? and how to delete that?

Solution to #3
Delete where says "$webmaster_email" from invite.php

Quote
4- How can i make the "Message to recipient" box to be not required to fill? or put a default value so it wont ask for a value in message box every time.

Solution to #4
I still dont know how to make the field NOT REQUIRED but i found out how to add a default value. Open invite.template.php then find and change this.
<textarea name="r_message" rows="3" cols="35" style="width: 90%">YOUR DEFAULT VALUE</textarea>

These are not the best solutions because im very amateur with PHP and these things but it would be a temporary solution until somebody pays a little attention to this topic.
Title: Re: Invitation System
Post by: live627 on July 07, 2011, 02:37:21 AM
until somebody pays a little attention to this topic.
and who actually knows the mod enough to be of some service.
Title: Re: Invitation System
Post by: PLAYBOY on July 16, 2011, 08:40:08 PM
**Solution to the 2nd problem:
Open invite.php from sources directory
Change
            if(mail($email, $subject, $message_final, $webmaster_email))
with this
                                if(mail($email, $subject, $message_final, 'From: '.$webmaster_email, '-f'.$webmaster_email))




Now i have 3 little problems...

A- Is there a way to hide the invite tab from members who are not allowed to send an invitation?

B- It would be SOOO HELPFUL to put more than one email adress into the "Send Key Via Email" form. So i can send multiple invitations to different adresses at once.

C- Why invitation email shows turkish characters as JAPANESE characters?
Title: Re: Invitation System
Post by: hadesflames on July 27, 2011, 01:06:37 PM
**Solution to the 2nd problem:
Open invite.php from sources directory
Change
            if(mail($email, $subject, $message_final, $webmaster_email))
with this
                                if(mail($email, $subject, $message_final, 'From: '.$webmaster_email, '-f'.$webmaster_email))




Now i have 3 little problems...

A- Is there a way to hide the invite tab from members who are not allowed to send an invitation?

B- It would be SOOO HELPFUL to put more than one email adress into the "Send Key Via Email" form. So i can send multiple invitations to different adresses at once.

C- Why invitation email shows turkish characters as JAPANESE characters?

A - You would have to go to Subs.php and look for the invite button, then in visible or something like that, put instead of "true" something  that returns whether or not the user can view the area.

B - No because one invitation can only work once. Sending the same invite to different people would be useless.

C - No idea...
Title: Re: Invitation System
Post by: PLAYBOY on July 27, 2011, 01:13:12 PM
Quote
B - No because one invitation can only work once. Sending the same invite to different people would be useless.

No. I meant sending more than one invitation at once. Like a form you just put the email addresses and it will create and send the invitations automatically. I think that would be very useful.
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ on July 28, 2011, 02:43:53 PM
Quote
B - No because one invitation can only work once. Sending the same invite to different people would be useless.

No. I meant sending more than one invitation at once. Like a form you just put the email addresses and it will create and send the invitations automatically. I think that would be very useful.

Adding many email address into the form would send just the one invitation code to all those email addresses, rephrased, you should be asking about batch invites.
Title: Re: Invitation System
Post by: PLAYBOY on July 28, 2011, 10:03:16 PM
Quote
B - No because one invitation can only work once. Sending the same invite to different people would be useless.

No. I meant sending more than one invitation at once. Like a form you just put the email addresses and it will create and send the invitations automatically. I think that would be very useful.

Adding many email address into the form would send just the one invitation code to all those email addresses, rephrased, you should be asking about batch invites.

Sorry about the english. you are right. Batch invites feature.



Also does anybody have any idea about this japanese problem?
Quote
C- Why invitation email shows turkish characters as JAPANESE characters?
Title: Re: Invitation System
Post by: PLAYBOY on August 06, 2011, 09:55:23 PM
Quote
A - You would have to go to Subs.php and look for the invite button, then in visible or something like that, put instead of "true" something  that returns whether or not the user can view the area.

I have put 'show' => allowedTo('invite'), but it didint work. Tab didint show to anybody except the admin.

I need to hide this tab only from some membergroups. How can i do it?
Title: Re: Invitation System
Post by: ɔɔɔɔɔɔuɥoɾ on August 07, 2011, 07:03:12 PM
You can either code up some permission based value to use instead of straight out true or false. (looks like you tried that already, but you need to add the permission as well, looks like you simply called out the permission, but it actually does not exist because you didn't add it to ManagePermissions.php

looks something like
ManagePermissions.php
'invitemod_permission' => array(false, 'allow_invite_button', 'allow_invite_button'),

Subs.php
$context['allow_invite_button'] = allowedTo('enable_invite_button');

'show' => $context['allow_invite_button'] && !empty ($modSettings['enable_invite_button']) ? true : false,

Then add the text in modifications.english.php and whatever other languages you use.

The above are not actually valid, you will have to look into the mod code yourself to get the proper values, this is just an example.


Or...

manually add the code, figure out the membergroup ID numbers then use "if" function to make true appear if a certain member id is viewing the page and false appear otherwise.
Title: Re: Invitation System
Post by: PLAYBOY on August 07, 2011, 07:44:33 PM
You can either code up some permission based value to use instead of straight out true or false. (looks like you tried that already, but you need to add the permission as well, looks like you simply called out the permission, but it actually does not exist because you didn't add it to ManagePermissions.php

looks something like
ManagePermissions.php
'invitemod_permission' => array(false, 'allow_invite_button', 'allow_invite_button'),

Subs.php
$context['allow_invite_button'] = allowedTo('enable_invite_button');

'show' => $context['allow_invite_button'] && !empty ($modSettings['enable_invite_button']) ? true : false,

Then add the text in modifications.english.php and whatever other languages you use.

The above are not actually valid, you will have to look into the mod code yourself to get the proper values, this is just an example.


Or...

manually add the code, figure out the membergroup ID numbers then use "if" function to make true appear if a certain member id is viewing the page and false appear otherwise.


I wish this was included in the mod. Its just a pain.
But thank you very much for the solution though.
Title: Re: Invitation System
Post by: PLAYBOY on August 12, 2011, 10:39:55 PM
Is there anyway to know who sent the invitation to the "Newly registered member" ?
Like Invite mod used to have the "Invitation Sender" posted on the members profile which only permitted membergroups could see.

I would love tu use a feature like this. Its very beneficial.
Title: Re: Invitation System
Post by: PLAYBOY on September 30, 2011, 01:32:27 AM
Is there anyway to add a feature to this mod?
I dont want people to be able to register from with a different email address than the one the invitation has been sent to.
Title: Re: Invitation System
Post by: Account Abandoned on October 21, 2011, 11:41:42 PM
Are there plans to update this for 2.0.1? If so, this addon is perfect for the big secret forum competition I have planned for my admin forum :)
Title: Re: Invitation System
Post by: kimba on October 22, 2011, 07:52:48 AM
This mod looks very interesting. However, every time I click on the download link, I end up with what appears to be an application document of 14KB instead of a zip folder. Should this be happening???
Title: Re: Invitation System
Post by: Southernpaw on October 27, 2011, 04:57:35 AM
Really would love 2.0.1 Compatibility...

Or is it already?
Title: Re: Invitation System
Post by: PLAYBOY on November 14, 2011, 03:04:33 PM
I cant send invitations to the emails which has a dash (-) in it. Ex;   blabla-123214@hotmail.com
It says "The Email address you entered is invalid."

Can somebody fix this bug please?
Title: Re: Invitation System
Post by: hadesflames on November 18, 2011, 03:41:46 PM
The mod has been updated to version 1.0.6

Changelog has been updated with the changes in the new version.

@PLAYBOY there are some new txt strings. If you wish to translate them, post them here. They are

$txt['invite_success'] = 'Success';
$txt['invite_email_separate'] = 'Separate multiple emails and names with a comma';
$txt['invite_key_batch_sent'] = 'An invite key was sent to';
$txt['invite_key_batch_not_sent'] = 'An invite key was not sent to';
$txt['invite_email_not_sent_reason'] = array(
   'because that email was invalid.',
   'because there was a problem sending your key, please contact your administrator.',
   'becuase you can not generate anymore keys for now.<br />' . $txt['invite_email_not_sent_spaces'] . 'Please contact your administrator to find out when you can generate more keys.',
);

For whatever reason, the download gives you a random file instead of the zip file. This seems to be a bug with the mod site for files with spaces in the name, as I JUST uploaded the new version file, and the same thing happens. You can just save the file, and add ".zip" to the end of it and it should work just fine, alternatively I have attached the mod to the original post, and you can download it from there as well.
Title: Re: Invitation System
Post by: PLAYBOY on November 18, 2011, 04:18:35 PM
$txt['invite_success'] = 'Basarili';
$txt['invite_email_separate'] = 'Birden cok emaillari virgul ile ayiriniz';
$txt['invite_key_batch_sent'] = 'Davetiye bu email adresine gonderildi';
$txt['invite_key_batch_not_sent'] = 'Davetiye bu adrese gonderileMEdi';
$txt['invite_email_not_sent_reason'] = array(
   'cunku email adresi gecerli degil.',
   'davetiyeyi gonderirken bir sorun cikti. Lutfen Admini haberdar ediniz..',
   'Cunku suan icin daha fazla davetiye gonderilemez.<br />' . $txt['invite_email_not_sent_spaces'] . 'Ne zaman daha cok davetiye gonderebileceginizi ogrenmek icin Admine danisiniz.',
);

Done.
Thx :)
Title: Re: Invitation System
Post by: PLAYBOY on November 18, 2011, 04:39:11 PM
1- All Turkish language files gives error during uninstalling of 1.0.5
It says it cant find ?>

2- Uploaded file in smf site is not a zip file. It doesnt have a format.

3- How will they send multiple invitations at once?

NAME, NAME2, NAME3, NAME4
email@domain.com, email2@domain2.com, email3@domain3.com, email4@domain4.com

So for the NAME3 email2@domain2.com will be used right?

It would be lot more helpful if there were fields for each invitation just like the attachments. You can add more fields if you want to.

4- Message box is too wide, it goes off the frame.

5- It would be nice if the invitation keys were shorter.
Title: Re: Invitation System
Post by: hadesflames on November 18, 2011, 09:39:43 PM
1- All Turkish language files gives error during uninstalling of 1.0.5
It says it cant find ?>

2- Uploaded file in smf site is not a zip file. It doesnt have a format.

3- How will they send multiple invitations at once?

NAME, NAME2, NAME3, NAME4
email@domain.com, email2@domain2.com, email3@domain3.com, email4@domain4.com

So for the NAME3 email2@domain2.com will be used right?

It would be lot more helpful if there were fields for each invitation just like the attachments. You can add more fields if you want to.

4- Message box is too wide, it goes off the frame.

5- It would be nice if the invitation keys were shorter.

1 - no idea.

2 - I posted about that in my last post...

3 - No...Name3 would use email3@domain3.com, also they must be separated by a comma, not a comma and a space. name,name2 is right. name, name2 is wrong, unless the second person's name is " name2" same with the emails.

4 - It depends on your screen size, it looks fine for me. It can be resized in any case.

5 - I'm not changing it.
Title: Re: Invitation System
Post by: hadesflames on November 18, 2011, 10:07:13 PM
Re-download the mod for the new translations.
Title: Re: Invitation System
Post by: krazytim on November 25, 2011, 08:36:29 PM
Thanks for the awesome mod hades.

I do have one issue with it though. When I click on "Modify Member Group Settings" in the mod's settings, I get this error: "Unable to load the 'group_settings' template."

I was also getting the same error message as other before, so I did the chmod 777 trick and it fixed all of the the other pages. Now I just need to be able to view this screen: http://custom.simplemachines.org/mods/index.php?action=download;mod=2567;id=145157;image


*edit: I am also getting this error "Unable to load the 'email' template" when clicking on the "Send Key via Email" button.


Thanks in advanced!
-Tim

:)
Title: Re: Invitation System
Post by: hadesflames on November 28, 2011, 03:29:31 PM
That's rather odd. Does it work on the SMF Default theme?
Title: Re: Invitation System
Post by: krazytim on November 30, 2011, 02:09:02 PM
That's a great idea, didn't try yet. My custom theme is based off of the default curve theme, and all of the file tests were successful, but it still could be an issue with my theme. I'll try that asap and report back. Thanks for the reply/support, I appreciate it. :)

*Edit - Had time to check this, and it does work for the default theme. I have no clue why it wouldn't work for my custom theme though. I'll try to manually input the parsed code instead of letting the installation handle it.

Until then, any advise or ideas as to the root of the problem could be helpful. Again, thanks a ton for taking the time to help out. :D
Title: Re: Invitation System
Post by: hadesflames on December 01, 2011, 04:01:07 AM
Thing is, the "email" template is in the Invite template file, which your custom theme shouldn't have. Since it doesn't have it, SMF should fall back to the default theme for that, so it should work. It works just fine on my custom theme. I would post a support topic to see if there's something wrong with SMF, along with contacting your theme's author to see what's going on with that.
Title: Re: Invitation System
Post by: machinenoob on December 03, 2011, 12:08:33 AM
Just as a notice this mod is not compatible with referral mod 3.0.3.  I installed the referral mod first and then tried to install the invitation mod and got errors on the registration.php

If i install this one first then the referral it worked great... not sure why.. just wanted to let you know/member know..

1)install invitation system first
2) install referral mod

also some of those modifications would be great mentioned above if there was a way for the admin to see who generated what key..
Title: Re: Invitation System
Post by: krazytim on December 03, 2011, 06:05:24 AM
I finally got the mod working.

I somehow had an invite.template.php file within my custom theme's folder. So I deleted that file, uninstalled the mod, reinstalled it, and everything now works in both the default theme & my custom theme.

One last question: Is there a way to only allow for registration through invitation?

*edit - Nvm, I didn't realize I had to change my method of registration off of the "registration disabled" setting.

Thanks for the support! This mod is wonderful. :)
Title: Re: Invitation System
Post by: machinenoob on December 04, 2011, 09:44:34 AM
OK i have some questions...maybe I just set it up differently..

1) when someone registers they are not put in a permission group yet, so they are classified as newbie. Per membergroup invite numbers I have Newbie set at 0.  When testing this a newly registered member can generate 5 keys before they are out...

2) is there a way for the admin to generate a key FOR a member??

3) is there a way to increase a specified groups TOTAL amount of keys or is this automatically done when the number of days is set for more to be added... ??
Title: Re: Invitation System
Post by: hadesflames on December 05, 2011, 04:51:55 PM
I finally got the mod working.

I somehow had an invite.template.php file within my custom theme's folder. So I deleted that file, uninstalled the mod, reinstalled it, and everything now works in both the default theme & my custom theme.

One last question: Is there a way to only allow for registration through invitation?

*edit - Nvm, I didn't realize I had to change my method of registration off of the "registration disabled" setting.

Thanks for the support! This mod is wonderful. :)

If you enable the mod, no one can register without an active key. You don't need to edit your registration settings. If you turn registration off, no one can register, key or not.

OK i have some questions...maybe I just set it up differently..

1) when someone registers they are not put in a permission group yet, so they are classified as newbie. Per membergroup invite numbers I have Newbie set at 0.  When testing this a newly registered member can generate 5 keys before they are out...

2) is there a way for the admin to generate a key FOR a member??

3) is there a way to increase a specified groups TOTAL amount of keys or is this automatically done when the number of days is set for more to be added... ??


1 - What?...

2 - Not really. You can create one, the edit the db to give it to someone else, but the mod itself does not support this.

3 - It's on the settings page. Go take a look.
Title: Re: Invitation System
Post by: machinenoob on December 05, 2011, 07:04:59 PM
Quote
1 - What?...

2 - Not really. You can create one, the edit the db to give it to someone else, but the mod itself does not support this.

3 - It's on the settings page. Go take a look.

1) I installed the mod.  I enabled the invite system.  When a person registers they are automatically placed in a "Regular Group" as well as a post based group NEWBIES.. I went to set permissions and it doesn't list REGULAR groups, just Group moderator and the others that I added.  Then it lists Newbies, etc.  For newbies I put 0 as the number.  But it still allows a regular member who is NOT placed in any group except the AUTOmatic NEWBIE to have 5 generated keys. 

I am no coder by any means, BUT i looked at the INSTALL PHP...

Code: [Select]
$invites_column = array(
1 => array(
'name' => 'invite_count',
'type' => 'int',
'size' => 5,
'null' => false,
'default' => 0,
'unsigned' => true,
),
2 => array(
'name' => 'invite_max',
'type' => 'int',
'size' => 5,
'null' => false,
'default' => 5, <---------------------------??????????
'unsigned' => false,
),
3 => array(
'name' => 'invite_roll_max',
'type' => 'int',
'size' => 5,
'null' => false,
'default' => 5,
'unsigned' => false,
),

To me it seems that when a user is created the DEFAULT is 5.  Maybe it should be 0 until they are added to a group.????

Not sure.. but that is my current guess...

Anyway regular members get 5 automatically when they register...is there another setting that i need to change in order to not allow this at all for the regular members?
Title: Re: Invitation System
Post by: krazytim on December 07, 2011, 12:29:56 AM
Thanks for the feedback Hades.

Another few questions.

1.) Is there a way to show who a member was invited by? The old invitation system I used (for SMF 1) had an "Invited by: User" section on the profile pages.

2.) Even though I left the "Modify Member Group Settings" fields on "0" for some membergroups, every member group is able to generate invitation keys. How can I turn off invitations for membergroups?

3.) In the admin settings under "Manage Keys" every member link goes to the same page, which is a missing profile page "index.php?action=profile;u=255". So if I have 5 users who generated keys (Bill, Bob, Joe, John, and Josh), click on any one of their names in the list will take me to "index.php?action=profile;u=255" for some reason.

Just curious, is an update for this mod in the works?
Title: Re: Invitation System
Post by: PLAYBOY on December 25, 2011, 03:23:16 PM
When you send multiple invitations at once by writing emails and names seperated by commas, mod doesnt add the emails to SMF Emailing order (list) , it just sends them all at once which is a problem for the people who is using smf under a shared hosting because we can send 100-200 emails per hour. So can this be fixed?


Quote
1.) Is there a way to show who a member was invited by? The old invitation system I used (for SMF 1) had an "Invited by: User" section on the profile pages.

I wish. I desperately need it.

Quote
is an update for this mod in the works?

i use the current version under 2.0.2
Title: Re: Invitation System
Post by: Alex311 on February 23, 2012, 10:05:13 AM
Hello

I installed this mod on version 2.0.2 it works perfectly.

I want to know which file edit to change the language of the world ?
I have a forum in French and the mod is in English.

Thank you for your answers
Title: Re: Invitation System
Post by: CR Forum on February 26, 2012, 03:42:22 PM
I installed it. Same issue of not wanting to have it available to everybody but only to select levels. I want to have it only for admins, for example. Also, the mod does not disable. I disabled it by checking the box but it was still showing up for other users. I had to uninstall it for this reason until i figure out how to get it working to my requirements. Great mod. Just needs a little more tweaking i guess.

Cheers!
Title: Re: Invitation System
Post by: CR Forum on February 26, 2012, 04:47:16 PM
Okay i was able to make it appear for Admin only. I wanted to know how to customize the text "The invitation key you used is invalid...". I tried finding it in modifications.english.php and errors.template.php but couldn't find anything....

Please advise.
Thanks
Sam
Title: Re: Invitation System
Post by: CR Forum on February 26, 2012, 05:13:57 PM
Problem: The way I made it to show up for admin only perhaps led to a problem with sessions for other members and I could not get folks who leggoed in to SMF log automatically in to WP through the WP-SMF bridge that I have installed. So I have to find a more cleaner way of making the button appear only for admin and for nobody else. A permission based way could be the best.
Title: Re: Invitation System
Post by: kiziol on April 09, 2012, 08:23:22 AM
Hello All... i have a problem with the mod... how to change the length of the generated code, I would like instead of 40 to generate 8th .. Thanks in advance Regards
Title: Re: Invitation System
Post by: NeobeatIKK on April 28, 2012, 12:08:08 PM
Works in smf 2.0.2... just wondering why this isn't listed as "2.0.2 compatible"
Title: Re: Invitation System
Post by: machinenoob on April 29, 2012, 05:27:25 PM
Just did a fresh install on 2.02.  At first it would not let me, but when navigating to the PACKAGES at the bottom RIGHT corner there is an ADVANCED option that allows you to emulate a different version.  Once I changed it to 2.01 the package was available to install.


Title: Re: Invitation System
Post by: machinenoob on April 29, 2012, 05:49:06 PM
Well I had been away from SMF for a while.. and came back and asked for a mod that was an invitation/referral type system... well no one really has time so I started looking at the code again on this mod.. I am no coder so if anyone can help.. any advice would be appreciated..

One issue that was mentioned above was the fact that when someone registers on the forum they are put in a group called NEWBIE and even if you set the number of invites to ZERO in the admin panel they are able to generate keys.  I am wondering if this is the reason???

Code: [Select]
function GenerateInviteKey()
{
global $context, $user_info, $smcFunc;

$request = $smcFunc['db_query']('', '
SELECT invite_count, invite_roll_max, invite_max
FROM {db_prefix}members
WHERE id_member = {int:id}
LIMIT 1',
array(
'id' => (int)$user_info['id'],
)
);

$member = $smcFunc['db_fetch_assoc']($request);

if(allowedTo('admin_forum') || $member['invite_max'] < 0) <-----------------------------this compares to see if its admin or if invite_max is -1 = unlimited invites....
{
// This person is an admin, or has infinite invites, no need to ask any questions.
$context['invitation_key'] = gen_key($user_info['id'], $user_info['name']);
$context['sub_template'] = 'invite_generate';
}
else <--------------------------------------------------------------------------------if your not admin and your invite_max is NOT set to -1 then do this...
{
// Sorry buddy, but the same can't be said about you ;)
$smcFunc['db_free_result']($request);

if($member['invite_count'] < $member['invite_roll_max']) <------------------ROLL MAX?????? should it be invite_max???? remember during install the invite_max and roll_max default to 5
{
// Good, you have some invites left =]
$context['invitation_key'] = gen_key($user_info['id'], $user_info['name']);
$smcFunc['db_query']('', '
UPDATE {db_prefix}members
SET invite_count = {int:count}
WHERE id_member = {int:id}',
array(
'count' => ((int)$member['invite_count']) + 1,
'id' => (int)$user_info['id'],
)
);
$context['sub_template'] = 'invite_generate';
}
else
// Sorry, maybe next time ;)
$context['sub_template'] = 'no_keys';
}
}

so not sure if that is the issue or not... Hades can you describe why you use invite_count, invite_max, invite_roll_max...

to me the member should only have a invite_count = current number of invites a user can make, which SUBTRACTS each time a key is generated, once it equals 0 then no more keys get generated....  as for invite_max_roll........in the admin panel it just asks if you would like them to roll over, NOT a number to allow to roll over??? looking at the code I notice you subtract these values, but why??? if you used just the invite_count option that subtracts, then you can set a default number of invites per group and then when they reach 0 that's it, no more and it would 1)never go away 2) could be a task to change after so many days 3) more could be added per admin panel for each group

if I am looking at this completely wrong PLEASE educate me.  I am trying to understand it

again thanks for this mod.
Title: Re: Invitation System
Post by: Wuschii on May 13, 2012, 09:29:37 AM
Can you please add 2.0.2 Support? That would be really nice!

EDIT: Just Changed the Compativle mode to 2.0.1 and installed it. Works very well!
Title: Re: Invitation System
Post by: bolubeyi61 on June 18, 2012, 06:44:37 PM
thank you hadesflames. very good mod.
Title: Re: Invitation System
Post by: IceFork on June 21, 2012, 07:22:08 PM
¡Thanks for the Mod hadesflames!


This is my Spanish translation:

Code: [Select]
<file name="$languagedir/Admin.spanish_es.php">
<operation>
<search position="end" />
<add><![CDATA[
//MOD Sistema de Invitaciones
$txt['invite_system'] = 'Sistema de Invitaciones';
$txt['invite_system_mod_settings'] = 'Ajustes Generales';
$txt['invite_system_mod_settings_desc'] = 'Modificar ajustes del Sistema de Invitaciones.';
$txt['invite_system_mod_settings_group'] = 'Ajustes de Grupos de Usuarios';
$txt['invite_system_mod_settings_group_desc'] = 'Modificar ajustes para cada Grupo de Usuarios.';
$txt['invite_system_mod_manage'] = 'Administrar Invitaciones';
$txt['invite_system_mod_manage_desc'] = 'Administrar todas las Invitaciones.';
$txt['invite_system_mod_generate'] = 'Generar Invitacion';
$txt['invite_system_mod_generate_desc'] = 'Generar nueva Invitacion.';
$txt['invite_system_mod_email'] = 'Ajustes de Correo';
$txt['invite_system_mod_email_desc'] = 'Administrar ajustes de Invitaciones por Correo electronico.';
]]></add>
</operation>
</file>



<file name="$languagedir/Errors.spanish_es.php">
<operation>
<search position="end" />
<add><![CDATA[
//MOD Sistema de Invitaciones.
$txt['invite_blank'] = 'No se ha introducido ningun Codigo de Invitacion.';
$txt['invite_wrong'] = 'El Codigo de Invitacion introducido es incorrecto.';
]]></add>
</operation>
</file>



<file name="$languagedir/index.spanish_es.php">
<operation>
<search position="end" />
<add><![CDATA[
//MOD Sistema de Invitaciones
$txt['invite'] = 'Invitaciones';
$txt['invite_key'] = 'Invitacion:';
$txt['invite_manage'] = 'Administrar Invitaciones';
$txt['invite_generate'] = 'Generar Invitacion';
$txt['invite_email_send'] = 'Enviar Invitacion por Correo';
]]></add>
</operation>
</file>



<file name="$languagedir/ManageScheduledTasks.spanish_es.php">
<operation>
<search position="end" />
<add><![CDATA[
//MOD Sistema de Invitaciones
$txt['scheduled_task_invitePrune'] = 'Eliminar Invitaciones no utilizadas';
$txt['scheduled_task_desc_invitePrune'] = 'Eliminar las Invitaciones a los 7 dias de no haber sido utilizadas.';
$txt['scheduled_task_keyExpire'] = 'Tiempo de expiracion de las Invitaciones';
$txt['scheduled_task_desc_keyExpire'] = 'Desactivar Invitaciones trascurrido un tiempo de no haber sido utilizadas.';
$txt['scheduled_task_keyRenew'] = 'Tiempo para renovar las Invitaciones';
$txt['scheduled_task_desc_keyRenew'] = 'Renovar las Invitaciones que un usuario puede generar.';
]]></add>
</operation>
</file>



<file name="$languagedir/Modifications.spanish_es.php">
<operation>
<search position="end" />
<add><![CDATA[
// MOD Sistema de Invitaciones.
$txt['invite_settings_title'] = 'Ajustes del Sistema de Invitaciones';
$txt['invite_enabled'] = 'Activar Sistema de Invitaciones';
$txt['invite_email'] = 'Activar Sistema de Invitaciones por Correo electronico';
$txt['invite_email_member'] = 'Enviar Invitacion por Correo';
$txt['roll_over'] = 'Permitir usar las Invitaciones no utilizadas durante un mes, el mes siguiente';
$txt['key_renew'] = 'Dias tras los que los usuarios volveran a disponer automaticamente de Invitaciones (0 = Desactivar)';
$txt['key_expire'] = 'Dias tras los que caducaran las Invitaciones (0 = Nunca caducan)';
$txt['invite_groups'] = 'Numero de Invitaciones por Grupo de Usuarios:<br />-1 = Invitaciones ilimitadas.';
$txt['invite_reg_page'] = 'Codigo de Invitacion:';
$txt['invite_error'] = 'Error';
$txt['invite_success'] = 'Aceptado';
$txt['invite_email_separate'] = 'Separa las diferentes direcciones de correo y nombres por comas.';
$txt['invite_email_subject'] = 'Asunto del Correo:';
$txt['invite_email_message'] = 'Mensaje del Correo:<br />
Codigos:<br />
{invitee} = Nombre del destinatario.<br />
{inviter} = Nombre de quien lo envia.<br />
{forum} = Nombre del foro.<br />
{message} = Cuerpo del mensaje.*<br />
{link} = Enlace a la pagina de registro.*<br />
{key} = Invitacion.*<br />
*Puede ser usado en el Asunto.';
$txt['invite_email_title'] = 'Enviar una Invitacion por Correo Electronico';
$txt['invite_email_invalid'] = 'La direccion de Correo introducida no es valida.';
$txt['invite_email_empty'] = 'No se ha rellenado algun campo, vuelve a intentarlo.';
$txt['invite_key_batch_sent'] = 'La Invitacion fue enviada a';
$txt['invite_key_batch_not_sent'] = 'La Invitacion no fue enviada a';
$txt['invite_email_not_sent_spaces'] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
$txt['invite_email_not_sent_reason'] = array(
'porque la direccion de Correo electronico es invalida.',
'porque hubo un problema al enviar la Invitacion, ponte en contacto con el Administrador.',
'porque no dispones de Invitaciones.',);
$txt['invite_email_sent'] = 'La Invitacion ha sido enviada con exito.';
$txt['invite_email_not_sent'] = 'Hubo un problema al enviar tu Invitacion, ponte en contacto con el Administrador.';
$txt['invite_email_recipient_name'] = 'Nombre del destinatario:';
$txt['invite_email_recipient'] = 'Direccion de Correo electronico del destinatario:';
$txt['invite_email_recipient_message'] = 'Mensaje que se adjuntara a la Invitacion:';
$txt['invite_new_key_head'] = 'Tu nueva Invitacion';
$txt['invite_new_key'] = 'Tu nueva Invitacion es:<br /><br />';
$txt['invite_no_key'] = 'No dispones de Invitaciones.';
$txt['invite_system_no_keys'] = 'No hay Codigos de Invitacion.';
$txt['invite_system_key_id'] = 'Invitacion ID';
$txt['invite_system_member_name'] = 'Nombre del creador';
$txt['invite_system_key'] = 'Codigo de Invitacion';
$txt['invite_system_status'] = 'Estado';
$txt['invite_system_remove'] = 'Eliminar seleccionados';
$txt['invite_system_remove_all'] = 'Eliminar todos';
$txt['invite_system_change'] = 'Cambiar estado';
$txt['invite_system_remove_confirm'] = 'Vas a eliminar las Invitaciones seleccionadas.';
$txt['invite_system_remove_all_confirm'] = 'Vas a eliminar todas las Invitaciones.';
$txt['invite_system_change_confirm'] = 'Vas a cambiar el estado de las Invitaciones seleccionadas.';
$txt['active'] = 'Activa';
$txt['nactive'] = 'Inactiva';
$txt['save'] = 'Guardar';
$txt['send'] = 'Enviar';
]]></add>
</operation>
</file>


languages.xml file (english +  spanish_es) attached.
Title: Re: Invitation System
Post by: IceFork on June 21, 2012, 07:30:42 PM
Now, some questions...

How I can know the number of invitations that each user have?

How a user can know the invitations he has?

How do I assign invitations to a single user?

 ???

Sorry for my bad english.
Title: Re: Invitation System
Post by: Mstcool on July 25, 2012, 02:33:44 PM
Does this work with 2.0.2?
Title: Re: Invitation System
Post by: IceFork on July 25, 2012, 02:53:08 PM
Does this work with 2.0.2?

Yes. ;)
Title: Re: Invitation System
Post by: Mstcool on July 25, 2012, 02:56:17 PM
Alright thank you.
Wait does this make it so if a person doesnt have a key they CANT register AT ALL?
Title: Re: Invitation System
Post by: IceFork on July 26, 2012, 06:22:48 AM
If the Invitation System is active, nobody can register without a invite key.
Title: Re: Invitation System
Post by: Mstcool on July 26, 2012, 12:56:13 PM
Oh ok thx.
Title: Re: Invitation System
Post by: TrickyRicky on July 26, 2012, 01:41:00 PM
Iv used this with 2.0.2 can confirm it works with no errors

great system to have for a invite only community

Title: Re: Invitation System
Post by: PLAYBOY on July 29, 2012, 03:18:48 AM
http://www.site.com/forum/index.php?action=invite;area=email
Apply Filter: Only show the errors with the same message
8: Undefined variable: email_data
Apply Filter: Only show the errors from this file
File: /home/site/public_html/forum/Themes/default/Invite.template.php
Line: 160
Title: Re: Invitation System
Post by: PLAYBOY on August 16, 2012, 04:53:19 AM
Can we please just hide the invite button on the top menu for the member groups who has not credits to send an invitation?



Also i cant uninstall the mod. I emulated to all versions but it never shows me the uninstall option.
Title: Re: Invitation System
Post by: Tien on August 17, 2012, 02:31:11 AM
I received the following error message when trying to email the key.

There was a problem sending your key, please contact your administrator.

Please advise what would have cause this error?
Title: Re: Invitation System
Post by: TheNiceUb3r on September 13, 2012, 09:37:19 PM
Please update for 2.0.2
Title: Deinstallation?
Post by: b0tze on September 14, 2012, 07:25:01 AM
Works good on smf 2.02, but I found another way to cutomize my registration (description here (http://www.simplemachines.org/community/index.php?topic=486331)).
So I want to deinstall it, but it gives me an error: deinstall instructions missing... Should I just erase the files, or will there be unused code left?
Thanks, b0tze

PS: Installation for 2.02 works fine with the option to "fake" smf v2.00...
Title: Re: Invitation System
Post by: Shambles on September 14, 2012, 07:57:16 AM
So I want to deinstall it, but it gives me an error: deinstall instructions missing... Should I just erase the files, or will there be unused code left?
Reupload (but don't try to reinstall) the package via package manager then try to uninstall the mod via package manager. Sounds like the package content (zip) itself went walkies (but the manager requires that to know what/how to uninstall) ;)
Title: Re: Invitation System
Post by: b0tze on September 16, 2012, 12:21:32 PM
Thanks, but still does not work (uninstall).

This is what the archive on the server contains:

    Invite.php (31973 Bytes)
    Invite.template.php (6348 Bytes)
    languages.xml (18272 Bytes)
    package-info.xml (1242 Bytes)
    uninstall.php (625 Bytes)
    install.php (4900 Bytes)
    install.xml (8016 Bytes)
    invite.gif (910 Bytes)

so there is a "uninstall.php" but it seems smf does not find it. Is there maybe a way to trigger this manually? sorry i don't know much about this... and thanks for your help!
Title: HELP: Invitation System
Post by: b0tze on September 18, 2012, 05:20:13 PM
Ok I could really need some help here, since I now figured out that now if the mod is switched off new members won't receive their registration confirmation mail (which is turned on at registration settings)  -now I want this really to be removed, but even re-downloading the zip here and uploading it (not installing it again) and trying to uninstall it gives me the same error about missing uninstall instructions... HELP!
Title: Re: Invitation System
Post by: Shambles on September 18, 2012, 05:37:08 PM
You did set the emulation back to 2.0.1, didn't you?

I just downloaded the package, installed it, configured it then removed it ok, on my localhost.

So no idea what your issue is. It doesn't look too difficult to remove by hand though, tbh...
Title: Re: Invitation System
Post by: b0tze on September 19, 2012, 09:55:43 AM
Nope, that was exactly what I was missing.  :-[
Thanks for helping and sorry for being stupid...
Title: Re: Invitation System
Post by: Shambles on September 19, 2012, 09:59:59 AM
Nope, that was exactly what I was missing.  :-[

Easily done mate. Glad it's sorted for you :)
Title: Re: Invitation System
Post by: PLAYBOY on October 03, 2012, 01:02:30 AM
Please, please add a feature which you can see who has invited that person in their profile.
I desperately need this feature.
Title: Re: Invitation System
Post by: denyboy on October 12, 2012, 07:42:00 AM
Thanks for the feedback Hades.

Another few questions.

1.) Is there a way to show who a member was invited by? The old invitation system I used (for SMF 1) had an "Invited by: User" section on the profile pages.

2.) Even though I left the "Modify Member Group Settings" fields on "0" for some membergroups, every member group is able to generate invitation keys. How can I turn off invitations for membergroups?

3.) In the admin settings under "Manage Keys" every member link goes to the same page, which is a missing profile page "index.php?action=profile;u=255". So if I have 5 users who generated keys (Bill, Bob, Joe, John, and Josh), click on any one of their names in the list will take me to "index.php?action=profile;u=255" for some reason.

Just curious, is an update for this mod in the works?

Trhird problem is becouse developer of this mod used tinyint variable for member_id. But tiny int can only go to 255. So for all users with id_member larger than 255 will be saved as 255. But it will work ok for all users with id_member less than 255. So solution is to change (in invite.php) that to int and change size to 4. Do the same in mysql table also.

Second problem is defined also in invite.php where u have default value of 5 for every new member.


Title: Re: Invitation System
Post by: PLAYBOY on October 12, 2012, 09:54:44 AM
Quote
1.) Is there a way to show who a member was invited by? The old invitation system I used (for SMF 1) had an "Invited by: User" section on the profile pages.

Looks like everybody needs this feature A LOT! just like many times i have asked for it too. I guess people just keep ignoring it. Is it that much hard to add this?
Title: Re: Invitation System
Post by: PLAYBOY on November 15, 2012, 05:35:59 AM
Is there anyway to have the person register only through the email address which the invitation was sent to?
Title: Re: Invitation System
Post by: GeekyLass on November 24, 2012, 06:33:31 PM
I've downloaded, emulated 2.0.1, and installed this add-on. Strangely, where one would set-up the add-on doesn't appear anywhere in the admin section. Any thoughts on what's going on there, and what I need to do to beat it into working?
Title: Re: Invitation System
Post by: telcy on November 27, 2012, 06:29:50 PM
did you installed it in your custom theme too?
Title: Re: Invitation System
Post by: GeekyLass on November 28, 2012, 04:54:37 AM
I'm not using a custom theme yet. I am still using the theme that comes default with the forum.
Title: Re: Invitation System
Post by: hadesflames on December 09, 2012, 10:55:36 PM
An update is in the works.
Title: Re: Invitation System
Post by: Lazarevics on December 11, 2012, 12:00:34 PM
Subscribe ;)
Title: Re: Invitation System
Post by: hadesflames on December 13, 2012, 08:38:26 AM
Version 1.1 now released. In an effort to reduce file edits, all language strings have been moved to their own file "Invite.english.php"

There have also been a couple of new strings added for the new features. If you want to see this mod in your language, submit an Invite.language.php and an Invite.language-utf8.php. If you don't know how to format the files properly, ask for help, but don't submit a utf8 version that's formatted improperly, or it won't be added. I'll try to add languages as they're submitted, but I don't hang out around here anymore, so don't be surprised if your language doesn't get added.

The new features are explained in the original post, and the download page. For the languages already submitted (turkish and spanish) here are the language.xml files so that you don't have to translate the mod from scratch again.
Title: Re: Invitation System
Post by: Lazarevics on December 13, 2012, 10:38:27 AM
hello!

The registration page is not visible in the "key" field.
The amendment is included in the file Register.template.php ...

Any idea?
Title: Re: Invitation System
Post by: hadesflames on December 13, 2012, 12:12:05 PM
Turn the mod on.
Title: Re: Invitation System
Post by: PLAYBOY on December 13, 2012, 12:26:24 PM
You are so good! Thank you very much for the "Invited by" field in profile and adding it to permissions. I really Appreciate it! You are doing a perfect job!

1- Do you think you can add just one more tiny little thing in permissions?
Who (which member group) can see the "Invite" button in the menu bar.
Or the button just wont be visible if they dont have any invitation keys.

2- Also It would be very very helpful if people can register only through the email address they got he invitation in. This is just an extra (nice-to-have) feature if you would like to add. Because people register with any email address and i lose track of which person was that which i invited. You dont have to do this one but just an idea though.
Title: Re: Invitation System
Post by: Lazarevics on December 14, 2012, 06:34:03 AM
This was the error: conflicts "Password Strength Meter" plugin
Title: Re: Invitation System
Post by: mikeshine on December 14, 2012, 11:20:24 AM
is there any points system that can be integrated with this mod?
Title: Re: Invitation System
Post by: hadesflames on December 19, 2012, 11:22:56 AM
1- Do you think you can add just one more tiny little thing in permissions?
Who (which member group) can see the "Invite" button in the menu bar.
Or the button just wont be visible if they dont have any invitation keys.

I don't think I would extend such a decision to the admin. Instead, the invite button should only be visible to people that either A) have had invite keys in the past or B) have the ability to generate invite keys (even if they already ran out for that month) Since the invite button also allows them to manage their keys. A permission doesn't make sense.
Title: Re: Invitation System
Post by: PLAYBOY on December 19, 2012, 11:33:28 AM
Right. It would make more sense to if we make the button invisible to the ones,
"A) have had invite keys in the past or B) have the ability to generate invite keys (even if they already ran out for that month) Since the invite button also allows them to manage their keys. "

Are you gonna be able to do it?

Also I think there is only one extra thing for the Turkish translation in the new version "Invited by"
you can add it as "Davet eden"

Thank you
Title: Re: Invitation System
Post by: hadesflames on December 19, 2012, 09:44:41 PM
Are you gonna be able to do it?

It's done.

Also I think there is only one extra thing for the Turkish translation in the new version "Invited by"
you can add it as "Davet eden"

No, there are more, you need to attach an Invite.turkish.php and Invite.turkish-utf8.php like I said previously if you want it in your language, then I'll add a language pack. The number of lines in the turkish files should be the same as the Invite.english.php file.

Also, the second thing you want doesn't really make sense. In regards to forcing people to use the email they got their invite from. How would that work if I generated an invite and gave it to someone normally? Then I can't force anything at all. Besides, users shouldn't HAVE to use a certain email to register to a forum. So, I won't be adding that.
Title: Re: Invitation System
Post by: PLAYBOY on December 20, 2012, 01:14:03 AM
Quote
Also, the second thing you want doesn't really make sense. In regards to forcing people to use the email they got their invite from. How would that work if I generated an invite and gave it to someone normally? Then I can't force anything at all. Besides, users shouldn't HAVE to use a certain email to register to a forum. So, I won't be adding that.

It makes sense on my situation because i use this mod little different than everybody else.
I got an application form to register to my forum. People fill up the application form and basically ask for an invitation. Then only some people can invite them after reading their form and once they invite that person we should know which new member had filled that application form to archive. Most of the time people write one email address in the application form and we send the invitation there but they signup with another email address, then we cant find the guys application form and cant associate him to who he was. Anyways, this feature would be very helpful for me and I understand you dont want to add it as a feature. I just think it could be just a checkbox option when you sending an invitiation.

Quote
No, there are more, you need to attach an Invite.turkish.php and Invite.turkish-utf8.php like I said previously if you want it in your language, then I'll add a language pack. The number of lines in the turkish files should be the same as the Invite.english.php file.

Sure.. I ll do the translation for Turkish.

Quote
It's done.

Thank you.
So now people who cant send an invitation cant see the menu button i assume. I dont think there is an option to turn it off and on.
But now I think the members who can send invitations doesnt see the "Email an invitation" button under the invite menu. They see only the first 2 options but not the 3rd which is emailing the invitation.
Can you confirm that its there? Maybe im doing something wrong.
I, as an admin can see it though. But the other membergroups who has been given unlimited invitation priviliges cant see the email option in the menu.
Title: Re: Invitation System
Post by: hadesflames on December 20, 2012, 02:44:43 PM
It means invitations by email are turned off. If you turn off the mod completely in the settings page, no one will be able to see the invite button at all.
Title: Re: Invitation System
Post by: PLAYBOY on December 20, 2012, 05:58:31 PM
but my point was that if some members can't send invitations then why they should still see the invite button on top? so I suggest only the members who can send invitations should be able to see the invite button.
Title: Re: Invitation System
Post by: hadesflames on December 22, 2012, 11:53:46 AM
I already explained why, I'm not going to change it.
Title: Re: Invitation System
Post by: Rifugio on January 31, 2013, 09:26:27 AM
Hi,  Just gave this a try with SMF 2.0.3 installed all seemed to be fine until I went to generate keys and I got the following error:

Unknown column 'inv.invite_id' in 'field list'
File: <forum>/Sources/Invite.php
Line: 1051

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.3, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.

I read somewhere that it may be the permissions on the sources folder so uninstalled then set them to 0777 - and retried still no joy - any ideas? 
Title: Re: Invitation System
Post by: JMantis on February 06, 2013, 08:22:41 AM
I uninstalled this mod because we didn't need it anymore.

However while the uninstallation didn't give me any problems, the menu item and even the options in the admin menu are still visible so it seems it wasn't removed properly after all.

When I click on anything related to the mod that's still there, this appears:

Fatal error: require_once() [function.require]: Failed opening required '/public_html/Sources/Invite.php' (include_path='.:/usr/local/lib/php') in /public_html/index.php on line 379
Title: Re: Invitation System
Post by: machinenoob on February 18, 2013, 07:32:45 PM
Request if possible:

Ability to generate keys for other users or give keys away.  Of course Admin gets as many as possible.
Title: Re: Invitation System
Post by: hadesflames on February 19, 2013, 03:29:01 PM
Request if possible:

Ability to generate keys for other users or give keys away.  Of course Admin gets as many as possible.

This feature already exists.
Title: Re: Invitation System
Post by: machinenoob on February 20, 2013, 12:31:26 PM
ahh I found it... where you can GIFT it out. 

one thing to mention is that it still lists it created under the Admin and doesn't show WHO you gave it too.  also it uses the person's ID... now i know its not hard to get the ID by looking at the users profile links for u=####.. but is there a way it could be easily changed to the email??? make it simpler.

OR

how about an option to just give a credit to another person by email.  So instead of generating it for them, you can give them +1 on their numbers and -1 on yours (or admin unlimited).

Just wondering...but thankyou for your hard work... i was browsing the code and WOW trying to keep up with some of it was intimidating because not only am i looking at PHP, but also how SMF codes its functions.

If you could implement this, it would be great, but I know it takes time.
Title: Re: Invitation System
Post by: machinenoob on February 23, 2013, 01:28:59 PM
OK by messing around I found out how to change it from the "Receiver id:" to the "Receiver's Email:" and use the users EMAIL.  It will also change the creator to the USER you gave it to so that you know it is theirs when looking up what keys are active and who has them.  The previous way gave the key to the member, but still showed it was created by the original user.  So if the admin was the ONLY person creating keys and wanted to see what key went to which person you couldn't do it without looking in the database and looking at the ID for which it was assigned.

in INVITE.PHP

Code: [Select]
// Looks like this guy is giving this thing away.

if(!empty($_GET['sa']) && $_GET['sa'] == 'gift' && !empty($_GET['id']) && allowedTo('gift_invites')){

$empty = empty($_POST['receiver']);

checkSession($empty ? 'get' : 'post');



if($empty){

$context['invite_gift']['id'] = $_GET['id'];

$context['sub_template'] = 'gift';

return;

}else{

$email_gift = $_POST['receiver'];

$request = $smcFunc['db_query']('', '

SELECT *

FROM {db_prefix}members

WHERE email_address = {string:id}

LIMIT 1',

array(

'id' => $email_gift

)

);

$gift_info = $smcFunc['db_fetch_assoc']($request);

$smcFunc['db_free_result']($request);

if(empty($gift_info)){

$context['sub_template'] = 'no_email';

return;

}

$receiver = $gift_info['id_member'];
$gift_name = $gift_info['member_name'];

and then at the end

Code: [Select]
$smcFunc['db_query']('', '

UPDATE {db_prefix}invites

SET member_id = {int:receiver},
member_name = {string:membername}

WHERE invite_id = {int:id}

LIMIT 1',

array(

'receiver' => $receiver,

'id' => $invite_id,

'membername' => $gift_name,

)

);

in INVITE.ENGLISH.PHP added
Code: [Select]
$txt['gift_receiver_email'] = 'Receiver' . "'s" . ' Email:';

$txt['no_email'] = 'Email was not found.';

in INVITE.TEMPLATE.PHP add this function
Code: [Select]
function template_no_email(){

global $txt;



echo '

<div class="cat_bar">

<h3 class="catbg">

', $txt['invite_error'],'

</h3>

</div>

<span class="clear upperframe"><span></span></span>

<div class="roundframe"><div class="innerframe">

<div style="text-align: center;">', $txt['no_email'], '</div>

</div></div>

<span class="lowerframe"><span></span></span>';

}

All credits go to the original mod designer.  I hope he will consider incorporating it with BETTER optimized coding.  I am no coder by far.

Thank you for your mod Hadesflames, it is much appreciated.
Title: Re: Invitation System
Post by: machinenoob on February 24, 2013, 09:24:22 AM
I also created a form in the admin that uses the same GIFT idea, but instead to give the user invites,but the invitation system is setup on MEMBERGROUPS max invites, and not necessarily the actual invite_max...

not sure why it was setup this way... to me the easiest way would be to just have invite count and subtract from there until 0, but i understand being able to set each group to a roll max/etc.

so the way the system is setup now... this is how I think it should be setup... if I am TOTALLY wrong or someone has a better Idea PLEASE post/correct mine.

probably in the MEMBERGROUPS this should have ROLL MAX.. so that the when the system runs it will only roll over that amount (ex. if a user has 15 invites (invite max), it will set it to what ever ROLL MAX is even if its only 5.  This would be based on invite count, since this number should keep growing.  THen you could probably get a statistics page on how many invites the user has generated.

so on the mod page there should not just be ROLL MAX numbers there should be also CURRENT INVITES.. because it when you set each group, it changes MAX INVITES, INVITE ROLL MAX, INVITE MAX to the same numbers....

Another suggestion
MAX INVITES = maximum for each group no matter what.
ROLL MAX = maximum that will carry over on top of the current invite max
INVITE MAX = maximum each person can invite. 

example
GROUP NEWBIE = MAX INVITES in membergroups = 10
user JOHN =, INVITE COUNT = 0, INVITE MAX = 1, ROLL MAX = 5

This means john can generate only 10 keys throughout his time as a newbie.  He has earned 1 invite, and has not used it. At the end of the cycle the system will leave everything alone because its less than MAX INVITES and less than ROLL MAX.

8 months later JOHN = INVITE COUNT = 8, INVITE MAX = 20, ROLL MAX = 5.

This means JOHN has earned up to 20 invites, but the max he can ever currently use is 10, so the system won't let him go above 10.  However he can roll 5 keys for when he MOVES up the GROUP ladder, so his INVITE MAX would drop to 13 so that he still rolls over the 5 on top of his current 8.

OK this is long and I got lost myself.. anyway... just a suggestion..

If someone can explain it better or has a better suggestion, PLEASE post it..

Hadesflames may incorporate it, or may not, but a user with coding skills might take on the challenge..



Title: Re: Invitation System
Post by: danigp6 on March 08, 2013, 05:38:20 AM
Hi all, I have a problem installing this mod.

I had a 500 server error when doing it. Do I have to do something manually? Maybe it is a problem with permissions

What can I do? Thank you
Title: Re: Invitation System
Post by: jafonseca on April 29, 2013, 06:41:05 AM
I have a question, when a registered user (normal user) generate an invitation and the new user make registration uin the forum, the in the profile new user does  not appear the line invited by:___ , usually it put in the database  that is invited by user id 255 that does not exit, but the invitation had been make by an user!!
In other user groups the they make the invite code, and the new user make registration in the forum, in the profile of the new shows invited by:---
How can I find the error? Why put the name who invited that person in Member groups and not in comme registered users? What is the membre of ID 255 that does not exist??¿
Title: Re: Invitation System
Post by: hadesflames on May 01, 2013, 09:19:25 AM
@machinenoob the invite max column is so that the mod knows how many invites to refill the user with whenever you have it set to refill.
Title: Re: Invitation System
Post by: JFFP on June 06, 2013, 07:08:17 AM
What is the membre of ID 255 that does not exist??¿

Because member ID 255 not exist in your forum (deleted account), only members up to 255 ID can receive and manage yours invites, if you are a member 300 and create a new key, your key will be saved as 255's key.
Someone can help with this? I have 7000 ID's
Title: Re: Invitation System
Post by: slavegirl on June 06, 2013, 05:05:34 PM
Some improvements of this mod.

Title: Re: Invitation System
Post by: carlos777 on June 28, 2013, 12:53:56 PM
hi!
 I'm trying to install this mod on my forum, and throws me this error when installing

Code: [Select]
SQL logic error or missing database
near "DESCRIBE": syntax error
File: /home/u542269640/public_html/Packages/temp/install.php
Line: 74

Code: [Select]
db_extend('packages');

$smcFunc['db_create_table']($invite['table'], $invite['columns'], $invite['indexes'], array(), 'ignore');

$request = $smcFunc['db_query']('', '
DESCRIBE {db_prefix}members invited_by',
array()
);

Does anyone could help me?

I am Spanish and I am translating with google, hope it reads well. thanks

Title: Re: Invitation System
Post by: thestone on September 01, 2013, 09:40:14 AM
I installed the mod, how is write here in special page for instructions: http://custom.simplemachines.org/mods/index.php?action=parse
But, nothing was happenned, when I access install.php, I receive a blank page.
Someone want to help me?



// SOLVED
Title: Re: Invitation System
Post by: net5 on February 01, 2014, 09:04:42 PM
Hello.

Well im using that mod but i cant find out the way to generate invite keys or send invite email from normal members.
Title: Re: Invitation System
Post by: dllb on February 05, 2014, 04:46:40 PM
Is there any chance that you might update the mod any time soon, so it will work with v. 2.0.7 as well? That would be awesome.
Title: Re: Invitation System
Post by: hadesflames on March 04, 2014, 01:18:38 PM
Hello.

Well im using that mod but i cant find out the way to generate invite keys or send invite email from normal members.

Make sure normal members have permission to use the mod. Go to the permissions section in the admin panel.

Is there any chance that you might update the mod any time soon, so it will work with v. 2.0.7 as well? That would be awesome.

1.1.1 worked fine in 2.0.7. You should upgrade to 1.1.2, which also works fine in 2.0.7. What was the problem you had...
Title: Re: Invitation System
Post by: net5 on March 06, 2014, 01:14:08 PM
Hello.

1st: Great mod.
2nd: I installed a mod " Menu Editor Lite " for the nav bar. when i installed that mod the Invites tab gone. Any help to restore it ? Thanx!


[SOLVED]: i add a tab from menu editor lite to be external this: /index.php?action=invite  for everyone with the same problem.
Title: Re: Invitation System
Post by: hadesflames on March 08, 2014, 10:31:22 PM
This means the menu editor mod was not done properly. I suspect Labradoodle probably just approved the mod himself thinking it was fine even though his code is usually terrible.
Title: Re: Invitation System
Post by: TMR Guy on March 27, 2014, 07:10:54 PM
Hello all,

I am very new at this computer stuff so please bear with me as I might get some of the terminology wrong. I just learned how to copy and paste a year ago but I'm learning fast lol. I do try and find the answer on my own by reading as much as I can but sometimes it gets a little overwhelming, it's like trying to read a foreign language (like I said I'm very new at this) Anyways if someone would be kind enough to help me out it would be greatly appreciated.

I installed this mod and it only works with my Admin account, my members keep getting this message saying "Sorry, but you can not generate anymore keys for now. Please contact your administrator to find out when you can generate more keys," when they use the Send Key via Email or Generate Invitation Key tab. I'm sure I'm just missing something simple like checking a box or setting user's permission, but I can't for the life of me figure it out or does it not work with 2.0.7? If not can someone suggest a similar mod that will?

Thanks in advance,

TMR Guy

Title: Re: Invitation System
Post by: SlowRiot on April 16, 2014, 10:12:32 AM
Hi,

There appears to be a bug with batch email invite mode.  The list of names and addresses appears to get processed correctly, and you get a confirmation saying they've been emailed - however, only the first email is sent, and only the first key is generated.  Mail server logs confirm that no other emails are attempted.

The system is Debian linux x86_64, webserver is apache2, php 5.5.11-2 and the mail server is exim4 4.82.
Title: Re: Invitation System
Post by: TMR Guy on April 21, 2014, 02:35:20 PM
But it only works with my Admin account, my members keep getting this message saying "Sorry, but you can not generate anymore keys for now. Please contact your administrator to find out when you can generate more keys," when they use the Send Key via Email or Generate Invitation Key tab.

I'm only allowing one member group to invite members and it's set to -1 (unlimited)

Quote
The system is Debian linux x86_64, webserver is apache2, php 5.5.11-2 and the mail server is exim4 4.82.
I have no idea what that means  ???
Title: Re: Invitation System
Post by: koantig on May 20, 2014, 07:04:40 AM
Great mod, thanks!

I have translated Invite.english.php to Invite.french-utf8.php. I'm happy to share it if you're interested.

I've got an issue though: the invitation system only uses the forum's default language, regardless of the user's preference. ( I also installed the language button mod, and it doesn't have an effect.). Is there something I can do to capture the current language selection? I'm happy to tweak the code, I know PHP.

Thanks in advance!
Title: Re: Invitation System
Post by: suresh1983 on June 29, 2014, 11:27:37 PM
Hi,

Thanks for such a beautiful mod.

Is there any option where we can showcase the profile photo of the user who has most of the invites.

I mean, to show the profile photo of the user who has invited most of the users to the forum. I want to show the profile photo in the login screen of the forum as guests are not allowed to browse my forum.

This will encourage users to invite their friends to join the forum.
Title: Re: Invitation System
Post by: norristh on November 16, 2014, 07:34:49 PM
TMR Guy, I couldn't get permissions based on membergroups to work, so wound up manually editing the database to give unlimited invites to the few users who should have them, but who are not Forum administrators.

I edited the smf_members table to set invite_max=-1 for the appropriate users.
Title: Re: Invitation System
Post by: kimberly_bark on June 16, 2015, 02:36:12 AM
Is there any way to add this feature only to access a certain board?
Title: Re: Invitation System
Post by: general_issimo on August 17, 2015, 10:02:23 AM
Hey Guys,
does anyone know, if this Mod works in 2.0.10? Will need to update sooner or later...
thx!
Title: Re: Invitation System
Post by: DarkTexas on August 29, 2015, 01:09:13 PM
Is it possible to NOT FORCE a Key on registration and using that system like just for inviting Users to the forum but normal Users still can register themself without a key?
Title: Re: Invitation System
Post by: hadesflames on January 03, 2016, 04:49:51 AM
Hey Guys,
does anyone know, if this Mod works in 2.0.10? Will need to update sooner or later...
thx!

It should work with any version of 2.0 as long as it installs.

Is it possible to NOT FORCE a Key on registration and using that system like just for inviting Users to the forum but normal Users still can register themself without a key?

Why would you want this? If you don't force the key, then there's literally no point to this mod at all, just have your members refer people normally. If you want to keep track of referrals, search for a referral mod. This isn't what you're looking for.