XinCodes 1.05XinCodes is an inviter module for XOOPS 2.4 and XOOPS 2.5 which allows for your registered users to invite someone to the XOOPS Site with an invite code for them to use with Profile 1.65 for a verbose registration.
You need to set it up in Profile 1.65 with an SQL validation as well as scheduling a cron to execute every minute or so codes are marked claimed and taken offline for customer invites.
You can set the array for generating a code with the preferences as well as the total number of invites and the length of elements for the code to be produced.
Download:
xoops2.5_xincodes_1.05.zip - 48Kb
Installation:Step 1:First goto your module administration in the system module after you have upload profile 1.63.
Step 2:Update profile module with the module system admin.
Step 3:You should see an output like so.
Step 4:Now go back to your module admin and locate 'Invite Codes' and press the install button.
Step 5:You should see the output like so, take note of the table name you will need to know this for step 7, that is the table that is created. In this screen capture it is
demo__xincodes.
Step 6:Now goto validation in the profile module and click on 'create new validation'.
Step 7:Enter in the weight, check the type making sure it is set to 'Record Count SQL' and put in the following SQL statement, remember i am using the table name example from step 5.
SELECT count(*) as rc FROM `demo__xincodes` WHERE `code` LIKE "[value]" and `active` = "1"
Step 8:Now you have to set a cron for every minute of every hour of every month and the following command may vary on the path to the file in xincodes call compair.php in the /cron path of the module.
The following command needs to be executed as a cronjob.
/usr/bin/php -q /home/yoursite/public_html/modules/xincodes/cron/compair.php
Step 9:Now you need to add a validation field either JSON or POST to the profile module, it must be called
invitecode unless you have changed the define in compair.php (step 8)
This is a valid field setting for the default: