[PAID] Invitation / Referral System in one

Started by machinenoob, April 24, 2012, 10:58:29 PM

Previous topic - Next topic

machinenoob

Message:
[If this is a mod you are willing to pay for, please state that at the start of your post.  If you are willing to pay for upgrades to future versions of SMF, please state that as well.]


[PAID] Name a reasonable price.
Would be released for others for free

Version
[You need to state what version of SMF you want it for. Mods for 1.1.x don't generally work on 2.0 and vice versa.]


Latest version 2.02

Description
[Include a short description of what the mod is and what you expect it do.  Provide examples from other websites or link to other mods that may be similar but do not offer what you want.  The more precise you are, the better mod authors can understand you and crank out what you need.  Don't forget to list what version of SMF you need this created for.  If you aren't running the latest version of SMF, and the feature you are looking for exists in a newer version, you should probably upgrade.]


Similar to REFERRAL MOD 3.03 and INVITATION  SYSTEM mod

So lets call this one "Referral Invitation System"... lol aren't I original... :)

Basically the current "mods"  have some work that still need to be fixed on them, I have done some messing with them and have gotten some things done, but if possible I want a new packaged all in one updated version that can be used... also because i'm not sure of all the security issues that my coding/google pasting might cause..

1) When the mod is activated I want the registration page to have another text field to put in the INVITATION code that is generated by the user.
2) Based on the invitation code the smf db query would find out which "user" generated it and that user would be the person who INVITED/REFERRED them. This would be automatic.
3) The persons profile would then show "Invited by: or Referred by: MEMBERNAME aka JOE BLOW"..or N/A if account created manually by admin.  I have done this one already by changing the database to the persons name, i was told this was not a good idea and to use the users ID.... so after doing some digging and testing this worked...
Quote
$user="REFERRAL MOD DB QUERY"; (can't remember off the top of my head)
$userID=loadMemberData($user,false,'profile');
loadMemberContext($userID[0]);
echo $memberContext[$userID[0]]['username'];
So just grabbing the database query from the current referral mod (referrals ID) it would look it up... I did not change this and post it in the mods particular topic for everyone though..

This would be an administrative OPTION to allow everyone to see who Invited/referred WHO??, but the admin would be able to see it when going to the users profile..

4) On the invitation side, I belive the current mod uses the user ID, name and sha1 x 100 to generate a UNIQUE key... not sure but this might become taxing on a server if you had 100's of people using it at the same time...(worst case scenario), not sure why sha1(db_prefix + the user ID + the User Name + current server date/time) wouldn't generate a unique key (hoping the db_prefix is something that is kept secret among smf files)... but anyway.....a better way of getting a unique key???.

5) ability to set the starting number of invites/referral keys to be generated (current one sets a default 5 when creating the database entries, I know this can easily be changed again, but I am no coder, just trying to learn).

6) ability to set when keys expire or IF they expire

7) ability to view the keys that YOU generate, admin can view PERSONAL generated keys, and then ALL generated keys and show which user referred them.

8) when a user deletes his or her ACCOUNT, or the account is considered UNUSED and the admin purges it, then the REFERRING users TALLY will be subtracted...leads me toooo

9) Under the persons avatar in the forum, show the number of INVITEES/REFERRALs... this again should be an option the admin can set if he/she wants others to view it...but admin always gets to see it.

10)  User/Admin can generate a key FOR another user, chosen by a drop down box of users/easy way of selecting a user/typing it in with a validation check... when its generated FOR a user it will be added to THAT users keys in the database...PM option to send the user a message that he has had a KEY generated for him to give out(message customizable by admin)....again if the Admin enables this option, but admin has it at all times..

11) Current mod allows for SENDING an EMAIL...how about having this as an administrative option that can be disabled/hidden...

12) once a key is confirmed to be valid and used, it is deleted

13) setting a limit on the number of keys that can be generated by any user or USER GROUP/ if not that specific, then max number across the board.
ex. Max number of KEYS that person can generate is 100, as he generates them his AVAILABLE number decreases.  This would also be across users, admin has unlimited.


Permissions
[Include a section on permissions.  SMF has a very powerful permissions system, based on usergroup and board.  You should specify who would have access to your mod.  Is it an admin only feature?  How about something staff (moderators / global moderators) would use?  A feature for all members?  Only members of certain usergroups?  Please don't limit yourself to just answering these questions, but utilize this section to explain in detail what you expect for access to your mod.]

Admin
-access to enable/disable all features
- Generating keys, seeing who generated them, deleting the keys of users if necessary
- Setting a users # of keys he can generate./max number across board/etc
Users
-Generate key
-View THEIR generated keys
-View THEIR invitees/referrals
-Send Email if admin enables it
-Generate keys for another user IF admin enables it.

Feature Set
[Utilize this section to discuss exactly what features you want.  Admin options?  User options?  There really is no limit except the programmer, so feel free to be as specific as you can.]


See above.....

Many of these options are available on the current 2 mods...not sure if just modifying a couple of things would work... I am no coder and while I'm willing to continue messing with code, I also don't want to create something that KILLS someone's database or forum... so I leave it up to the experts.. reason I am offering a PAID one..

Any suggestions/comments/additions please reply... ANY modders who would be willing PM ME..

machinenoob

Should I put an amount????  I don't want to insult any coders.  I came across a "advanced invitation system" from smfpacks.com... it has alot of these features.... they ask $15.... I wanted some other features so I am willing to pay more.... I also wanted it to be released free for other members to be able to use it, but if this is whats holding the replies back then name your price, rules/guidelines.


shamun

I'll be doing this relatively soon for my site.  Some differences would be:

#10: Probably wouldn't be included
#8: Also probably won't be accounted for
#3: Also probably wouldn't be implemented

There'll likely be other features as well.


The other catch is it probably won't be done very quickly as I have several other mods needing to be custom made and the invitation/referral system isn't the top priority.  Expect 1-2 months.  If you want it done sooner, you could probably pay someone to hack the two mods you described together.  Would probably cost $60->$200.

machinenoob

Thanks for the reply... was thinking after over 100 views that someone might be willing to create this...

#10
#8
#3

are the differences in most invitation systems and the missing parts of the current invitation system...

Well I guess I will just have to dabble with some code and see what happens.....again thanks for the reply..

shamun

I did say 'probably'  :P
If I get bored or can spare the extra time to do it right, they may get added in.

machinenoob

well i have been messing with it and I have fixed and added a couple of things...

1) when someone registered the default number of invites for a new person even if you set it to zero via the control panel was 5, now it installs and the default is 0.
2) when someone registers, the script gets the member id of who generated it and places that into a new database field called invite_by
3) the profilepage now grabs the invite_by and uses loadmemberdata to populate Invited By: USERNAME and if it is the admin it shows N/A

Currently working on
1) fixing the install process to include the above actions
2) possibly adding # of invites
3) generating a key FOR someone or transferring a KEY TO someone so they can use it.



machinenoob

Ok I added the profile options and tested them..... ADMIN is not really the name of the admin, but you get the point....

Username:    tester3
Posts:    0 (N/A per day)
Invited By:    ADMIN
Number Of Invites:    0

Age:    N/A

and

Username:    ADMIN
Posts:    0 (N/A per day)
Invited By:    N/A
Number Of Invites:    1

Age:    N/A

so that knocks off #1 and #2.... now I might need to see about #3... not exactly sure how to do this one.. will have to definitely check on the code.... I just need to create a form that will allow me to type in a username and then check to see if it truly exists and then populate the invite portion of the database with a key under that members ID/NAME....

well if you have any suggestions let me know.. if you would like me to rar/zip up what i have let me know and i can give it to you so you can see the modifications...

shamun

semi pseudo-code:


// Get username from the post.  Typecast as a string and put it through smfs escape function.
$input_username = (string) $smcFunc['db_escape_string']($_POST['username']);

// Look it up.  We're not using any premade functions because they all get more information than we need...
$id_member = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE member_name = {string:input_username}
LIMIT 1
',
array (
'input_username' => $input_username
),
)

// Problem with fetch
if (!isset($id_member) || $id_member === '0')
fatal_error('Problem retrieving user ID!');


Advertisement: