Referral add-on for GeekLog
Modified by RACooper (rac {at} noidea.us) 10 Nov 2005

based on original "refer" by maximus of darja.2y.net 
and updated by Squatty of squatty.com

USAGE:
A PHP block for Geeklog 1.3.x so users can invite friends to visit/register your geeklog site.


INSTALLATION:
1. Copy contents of public_html to your public_html
2. Copy contents of plugins to your geeklog/plugins directory
3. Add the following to your lib-custom.php:

/* Block code for referral plugin */
include $_CONF['path'] .'/plugins/referral/functions.php';

4. Edit geeklog/plugins/referral/conf.php to your liking.
5. Create a new PHP block, using the function name phpblock_referral.


UPDATES/CHANGES:
-- 10 Nov 2005
   * Moved customization variables to plugins/referral/conf.php
   * modified location of files
   * corrected spelling errors in all files (including function names)
   * updated email validation to use geeklog's COM_isEmail function
   * moved block function to it's own file plugins/referral/functions.php
   * removed COM_refresh from error messages so they can be read
   * Changed outgoing mailer to use geeklog's COM_mail


----- ORIGINAL NOTES FILE -----
Notes from GXBlock Website:
Ultimate Referral Block w/update    Date Added: Jun 19 2002

Description:
Created by maximus of darja.2y.net and updated by Squatty of squatty.com ...

The differences from the iowaoutdoors version:

1)Does not depend on STMP or sendmail, will use the geeklog mailer. So if
you can send passwords for the new users you can use this no changes. 

2)Better boink feedback. 

3)this one will check to see if email is for an actual user on a system. 

This excellent block was created by maximus of darja.2ya.net 

----- ORIGINAL REFER.INSTALL -----
Installing your new referal block:

1) copy the contents of refer.txt into you lib-custom.php file in /path/to/geeklog/system.
	this sets up your display, you can change the user code at the bottom or remove it to allow guest
	users to refer.

2) edit the text message at the top of refer.php and copy it into your base web dir (on RedHat systems 
	that's /var/www/html/)

3) Go to your blocks page and put in a new block, function php_blockrefer.

4) make sure the block works by:
	a) mailing an address you can check that is not in the user tables (i.e. not already a user) 
		(should pass)
	b) put in an address you know is bad. (should fail)
	c) put in an address you know is in the user database. (should fail)
	d) put in random text. (should fail)

5) mail skads of cash to Gxblock.com and Darja.2y.net (it's free code, but I'm sure we won't say no. I'd love 
	to buy that server in the dell catalog, but that's 2000$ more than I have right now.)

6) enjoy you new block!