 |
footytips.net Get help for Wests, or just talk footy
|
| View previous topic :: View next topic |
| Author |
Message |
Daniel Wedge Site Admin
Joined: 06 Mar 2006 Posts: 166
|
Posted: Tue Jan 02, 2007 7:47 pm Post subject: Letting users register for your comp on your website |
|
|
This is a short guide on setting up your tipping website so that people can register online to enter the competition. If you are have a copy of sendtips.php on your server, then your tipsters can register up until the last minute before the competition starts, and then tip online straight away without your intervention.
If you are not hosting sendtips.php on your server, then you can ignore the steps marked with *asterisks*.
1) Download this file: http://footytips.net/contrib/register.txt
Rename it to register.php (or whateveryouwant.php) and follow the instructions in the file to set it up on your web server.
2*) In Wests, under Options > Customise file contents, untick the "Display a drop down list of tipster names" option. So, when your tipsters submit tips, they will have to type in their name exactly as it was entered on the web.
3*) In sendtips.php, modify the $filename variable in the getuseremail() function so that it is the same file as referred to by the $usersfile variable in register.php
4*) Once the first round is completed, you will need to enter data into Wests in the following order. Firstly, download the users file from your web server, and import it into Wests (Edit > Edit tipsters > Import tipsters). Then, download the first round's tips from the server, and import them (Data entry and output > Enter tips > Load tips from downloaded log file). If you are not allowing tipsters to register automatically anymore, then you can now open Options > Customise file contents, and tick the "Display a drop down list of tipster names" option to stop tipsters from entering their name incorrectly when they tip. Save and upload files for all rounds now. That's it!
4) if you are not hosting sendtips.php, you will need to download the users file from your web server, and import the data into Wests (Edit > Edit tipsters > Import tipsters). Then, tick the option to display a list of tipster names if it is not already ticked, and save and upload all files.
Any comments, suggestions, post away!
Last edited by Daniel Wedge on Tue Jan 09, 2007 8:55 am; edited 1 time in total |
|
| Back to top |
|
 |
Timbli
Joined: 19 Nov 2006 Posts: 11
|
Posted: Mon Jan 08, 2007 8:30 pm Post subject: |
|
|
hey I think you uploaded the wrong register.php.txt
That one there is what you use on your site and not the one to change variables.
Thankyou so much for making this script and looking forward to the right file
Cheers |
|
| Back to top |
|
 |
Daniel Wedge Site Admin
Joined: 06 Mar 2006 Posts: 166
|
Posted: Tue Jan 09, 2007 8:56 am Post subject: |
|
|
| That's odd - it was processing it as a PHP file even though the final extension wasn't PHP. Anyway, you should be able to view the file now, I've changed the link in my first post. |
|
| Back to top |
|
 |
themit
Joined: 20 Mar 2006 Posts: 60 Location: Geelong
|
Posted: Thu Jan 11, 2007 6:39 pm Post subject: |
|
|
Sometimes if the Apache server is configured, it can read PHP in any file you choose, .htm, .txt, .wests. _________________ Go Geelong, Season 2007 Premiers!
Themit. |
|
| Back to top |
|
 |
sdferris
Joined: 02 Apr 2006 Posts: 2 Location: Brisbane
|
Posted: Sat Jan 20, 2007 10:28 pm Post subject: |
|
|
Hi guys, I have made a few changes/additions to the registration.php file which might be of assistance to others. The changes/additions can be summarised as follows:
a. A confirmation email is sent to both the administrator's email (as a Bcc) and the party registering showing details of their Tipping Name and their Password. This is a useful records for both the administrator and the party registering.
b. A confirmation screen which follows the "Register Now!" screen. This simply gives the person registering an opportunity to immediately confirm the details are correct.
The changes/additions to the registration.php file are below:
1. After the code which sets up the cut off time for registrations (see below).........
| Code: | // this is the time that registrations for your competition close
// in order, the arguments to mktime are:
// hour, minute, second, month, day, year.
$cutofftime = mktime(12, 00, 00, 01, 31, 2007); |
..............add the following:
| Code: | // addded.... this sets up the admin email address for a copy of the details to be
// sent to once registration had been completed
$adminemail = "{insert your own email address here}"; |
2. After the code which sets up a response if the tipper registers with a name which has been used already (see below)......
| Code: | if ($namealreadyexists)
{
$message .= "Someone already has the name $name - please choose another name.";
}
else
{ |
............add the following:
| Code: | // added.... preparation for email to be sent to user
$mailto = $email;
$mailhead = "From: $adminemail \n" .
"Bcc: $adminemail \n" .
"Reply-To: $adminemail";
$mailmesg = "Your details have been added to the {INSERT THE NAME OF YOUR TIPPING COMP HERE}. Details of your
registration are below.\n\nTipping Name: $name\nPassword: $password\nEmail Address: $mailto\n\nYour details will be added
to the system as soon as possible.\nBest of Luck\n\n{INSERT YOUR NAME HERE}";
$mailsubject = "$name's {INSERT THE NAME OF YOUR TIPPING COMP HERE} Details";
mail($mailto, $mailsubject, $mailmesg, $mailhead);
// end of added |
3. After the code which writes the tippers registration details to the userfile (see below)..........
.................delete everything and replace with the following:
| Code: | $messageb .="Your details have been added to the {INSERT THE NAME OF YOUR TIPPING COMP HERE}. Details of your
registration are below.<p>Tipping Name: $name<p>Password: $password2<p>Email Address: $mailto<p><p>Your
details will be added to the system as soon as possible.<p>Best of Luck<p><p>{INSERT YOUR NAME HERE}<p><p>";
$messagec .="A confirmation email will be sent to you shortly containing details of your registration details.";
$success = 1;
}
} else
{
// echo "Required data missing.";
}
echo '<font color="#ff0000"><b><CENTER>';
echo "<br>";
echo "<br>";
echo "<br>";
echo $message;
echo "</b></font></CENTER><p>";
echo "<br>";
echo "<br>";
echo $messageb;
echo $messagec;
if (!$success)
{
?>
Use the form below to register for the current tipping competition.
<p>
<form action="<? echo $_SERVER['PHP_SELF']; ?>" method="post">
<table border="0" align="center">
<tr>
<td>Username:</td>
<td><input name="name" type="text"></td>
</tr>
<tr>
<td>Password (at least 4 characters):</td>
<td><input name="password" type="password"></td>
</tr>
<tr>
<td>Confirm password:</td>
<td><input name="password2" type="password"></td>
</tr>
<tr>
<td>Email address</td>
<td><input name="email" type="text">
</td>
</tr>
<tr><td></td><td>
<input value="Register now!" type="submit" name="plainpw">
</td></tr>
</table>
</form>
<?php
}
include('footer.php');
?> |
Obviously you can add you own spin on the text and its format, but the core code required to send the confirmation emails and have the confirmation screen is all contained above. I hope that this assists others out there.
Cheers
Shaun _________________ ----------------------------------------
My father always said "2nd place is
1st loser!"
---------------------------------------- |
|
| Back to top |
|
 |
Daniel Wedge Site Admin
Joined: 06 Mar 2006 Posts: 166
|
Posted: Sun Jan 21, 2007 7:46 pm Post subject: |
|
|
Nice one Shaun  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|