1
wishcraft
XinCodes 1.05

XinCodes 1.05

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.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:
Resized Image

First goto your module administration in the system module after you have upload profile 1.63.

Step 2:
Resized Image

Update profile module with the module system admin.

Step 3:
Resized Image

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:
Resized Image

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:
Resized Image

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__xincodesWHERE `codeLIKE "[value]" and `active` = "1"


Step 8:
Resized Image

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 -/home/yoursite/public_html/modules/xincodes/cron/compair.php


Step 9:
Resized Image

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:
Resized Image
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

2
fdeconiac
Re: XinCodes 1.05
  • 2011/1/9 20:01

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Really interesting module!

Is there any posibility to add this option : if user have a specific code for his regitration (that i would communicate in my association newsletter'), he could be directly in a specific group?

Example using matching method:
- Matching validation code : "code1" => the user will directly be affected to "groupe-A"
- Matching validation code : "CodeBeta" => the user will directly be affected to "groupe-F"

Example using sql method:
- If [value]="code1" => the user will directly be affected to "groupe-A"
- If [value]="CodeBeta" => the user will directly be affected to "groupe-F"

Or something like that... :)

Thanks for sharing, this module could offer a very important point to xoops : manage by defined codes the access to a user in a group directly from the registration, avoiding a manual work !

3
xoobaru
Re: XinCodes 1.05
  • 2011/1/12 4:26

  • xoobaru

  • Just can't stay away

  • Posts: 494

  • Since: 2010/12/2


Profile 1.65 download link appears to be broken.

4
Mamba
Re: XinCodes 1.05
  • 2011/1/12 4:57

  • Mamba

  • Moderator

  • Posts: 11412

  • Since: 2004/4/23


Try the 1.66
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

5
xoobaru
Re: XinCodes 1.05
  • 2011/1/12 23:41

  • xoobaru

  • Just can't stay away

  • Posts: 494

  • Since: 2010/12/2


got that, thanks.

6
xoobaru
Re: XinCodes 1.05
  • 2011/1/13 1:15

  • xoobaru

  • Just can't stay away

  • Posts: 494

  • Since: 2010/12/2


Post Xincode install registration issue,
Upon entering new username/pword/invitecode and associated email entered into basic registration screen

then pressing validate button (assume it is required because it is there)

A "Validation Failed!" message gets displayed.

All info filled in. but form submit button is dead.

Using
XOOPS 2.5
Profile module 1.66 (is enabled for anonymous user access)
Xincodes 1.05
Installed/verified as directed above (my table prefix).
Crons compair.php every minute (GET and 200 code shows in server access log)
Invitecode successfully sends and is received by invitee

"Users can register" preference option is set but the above issue occurs whether user or admin activation is set.

Any reasons why this would happen? I'm sure Wishcraft tested this in and out, so I think it must be something I am overlooking.


7
xoobaru
Re: XinCodes 1.05
  • 2011/1/17 0:59

  • xoobaru

  • Just can't stay away

  • Posts: 494

  • Since: 2010/12/2


Another appeal,
This is the absolute last hurdle to getting this inviter working like a well oiled machine and no help as to why validation fails (does the validate button even need to be clicked before submitting)? Everything works but invitecode validation and reg submit.

This was carefully installed and checked exactly per the detailed instructions, and under every config permutation I could think of to no avail.

8
wishcraft
Re: XinCodes 1.05

How are you noobura,

It sounds like you haven't selected the rules of the validation field in the profile you are using. Goto the validation field in version 1.66 and later and you get a totality of the validation rules for the field to use, in the options of the field. You need to select the validation of field before you can or it will know what to check.
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

9
wishcraft
Re: XinCodes 1.05

Quote:

fdeconiac wrote:
Really interesting module!

Is there any posibility to add this option : if user have a specific code for his regitration (that i would communicate in my association newsletter'), he could be directly in a specific group?


You can do this with profile 1.66 and later. With either validation code, the xincode rule in validation. Or other rules as well in other pages with more validation field and particular validation options supporting the environment.
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

10
fdeconiac
Re: XinCodes 1.05
  • 2011/1/24 13:04

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Hi Wishcraft,

Thanks for your answer! I asked on many topics, but no-one seems to know how to manage default affecting group during registration!

Could you give me more details about it ? Could it be possible with a sql function with xincode, like :

if code="friend" then change user-group to group 4
if code="premium" then change user-group to group 7
else code="null" then change user-group to group 2

Maybe what i'm written is totally strange, I don't know anthing in coding... :(

Thanks for your helpfull advices :)

Login

Who's Online

152 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 152


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits