Modules: XinCodes 1.02 - Inviter Code System for Profile 1.62Posted by: wishcrafton 2010/12/19 17:50:00 4009 reads
Inviter Code System for Profile 1.62
Sponsored by AFS Espania
XinCodes 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.62 for a verbose registration.
You need to set it up in Profile 1.62 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.
This module was a concept taken from tracker cms titles for large system security when you want to control the people registering at the site. You can limit the amount of codes people can use as well as the elements of the code and number of elements. Currently Captalised Alpha Numerical Sequences.
(1) First install or upgrade to profile 1.62 (See attached Archive xoops2.5_profile_1.62.zip) you will need this for validation.
(2) Install XinCodes 1.02
(3) Add Validation field name ‘invitecode’ to profile module as a validation type.
(4) Add SQL Validation Script to Profile 1.62 (Remember to change the prefix to your database prefix)
SELECT count(*) as rc FROM `prefix_xincodes` WHERE `code` LIKE "[value]" and `active` = "1"
(5) Add Cron to CronTab on Cpanel or Server box for every minute (Remember to check the path name to compair.php) - (On a window box you have to schedule a task the php executable is located normally in c:/program files/php but the extension and call location will also be different)
Otherwise this is the normaly chrontab (Cronjob) you need to run, remembering to change the path to the file to be the full path (Inclusive of XOOPS_ROOT_PATH).
/usr/bin/php -q /home/yoursite/public_html/modules/xincodes/cron/compair.php
Download: xoops2.5_xincodes_1.02.zip - 48Kb
Demo: http://xoops.demo.chronolabs.coop/ - Must install.