Clan Adverts

Custom PHPNuke Scripts

 

www.clan-themes.co.uk :: View topic - Lottery module

 Welcome To Clan Themes 

As the board grows please remember the Search Option and we hope you find our community useful.

We also monitor Private Messages to stop members from abusing our sites system.
If you are asking for assistance please provide your site link and nuke version, Thanks.

Lottery module

11 Replies / 897 Views


Post new topic   Reply to topic  

   www.clan-themes.co.uk Forum Index » Modules

View previous topic :: View next topic


Untergang
Reputation: 593.6
votes: 4
Local time: 2:15 AM
Location: Lommel
belgium.gif

Status: Offline
0.47 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 05 Sep 2008
Posts: 227
Points: 5644 

View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

Ped
Reputation: 368
votes: 17
Local time: 2:15 AM
Location: Great British Empire
uk.gif

Status: Offline
2.58 posts per day
Medals: 2 (View more...)
Dedicated User (Amount: 1)
Clan Themes Theme Guru
Clan Themes Theme Guru
Joined: Nov 13, 2006
Last Visit: 06 Sep 2008
Posts: 1710
Points: 11558 

View user's profileSend private messageSend e-mailVisit poster's website Reply with quote

Untergang
Reputation: 593.6
votes: 4
Local time: 2:15 AM
Location: Lommel
belgium.gif

Status: Offline
0.47 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 05 Sep 2008
Posts: 227
Points: 5644 

View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

Ped
Reputation: 368
votes: 17
Local time: 2:15 AM
Location: Great British Empire
uk.gif

Status: Offline
2.58 posts per day
Medals: 2 (View more...)
Dedicated User (Amount: 1)
Clan Themes Theme Guru
Clan Themes Theme Guru
Joined: Nov 13, 2006
Last Visit: 06 Sep 2008
Posts: 1710
Points: 11558 

View user's profileSend private messageSend e-mailVisit poster's website Reply with quote




Untergang
Reputation: 593.6
votes: 4
Local time: 2:15 AM
Location: Lommel
belgium.gif

Status: Offline
0.47 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 05 Sep 2008
Posts: 227
Points: 5644 

Post Re: Lottery module Posted: Fri Nov 16, 2007 10:01 am   

Thanks just found that one too :D
I've added it to my site and it work,
some numbers aren't correct like days left.
It should be like 30 but it says 608.
But that doenst really matter.
Users can now signup and might win a wars module :D

Greets
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

Ped
Reputation: 368
votes: 17
Local time: 2:15 AM
Location: Great British Empire
uk.gif

Status: Offline
2.58 posts per day
Medals: 2 (View more...)
Dedicated User (Amount: 1)
Clan Themes Theme Guru
Clan Themes Theme Guru
Joined: Nov 13, 2006
Last Visit: 06 Sep 2008
Posts: 1710
Points: 11558 

View user's profileSend private messageSend e-mailVisit poster's website Reply with quote

Untergang
Reputation: 593.6
votes: 4
Local time: 2:15 AM
Location: Lommel
belgium.gif

Status: Offline
0.47 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 05 Sep 2008
Posts: 227
Points: 5644 

View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

Ped
Reputation: 368
votes: 17
Local time: 2:15 AM
Location: Great British Empire
uk.gif

Status: Offline
2.58 posts per day
Medals: 2 (View more...)
Dedicated User (Amount: 1)
Clan Themes Theme Guru
Clan Themes Theme Guru
Joined: Nov 13, 2006
Last Visit: 06 Sep 2008
Posts: 1710
Points: 11558 

Post Re: Lottery module Posted: Fri Nov 16, 2007 10:08 am   

Just for your info i signed up and got the error

ERROR: You must login before you can sign up for the lottery...

when i refreshed it had added me, so i suppose thats another error

you can delete me if you like...
 

 
View user's profileSend private messageSend e-mailVisit poster's website Reply with quote




Untergang
Reputation: 593.6
votes: 4
Local time: 2:15 AM
Location: Lommel
belgium.gif

Status: Offline
0.47 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 05 Sep 2008
Posts: 227
Points: 5644 

View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

Untergang
Reputation: 593.6
votes: 4
Local time: 2:15 AM
Location: Lommel
belgium.gif

Status: Offline
0.47 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 05 Sep 2008
Posts: 227
Points: 5644 

Post Lottery module Posted: Fri Nov 16, 2007 10:29 am   

I think I found the bug

Code:
if($action == "signup" && memberCanSignup($id))
{
   $msg = "You have been added to the lottery.  Check back often to view your winning status.";
}
if($action == "signup")
{
   $msg = "ERROR: You must login before you can sign up for the lottery...";
}


There some more in between but this shows you what is wrong
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

kardson
Reputation: 0.8
Local time: 8:15 PM
Location: Michigan
usa.gif

Status: Offline
0.05 posts per day
Medals: 0

Joined: Apr 28, 2008
Last Visit: 07 May 2008
Posts: 7
Points: 183 

Post Lottery module Posted: Wed Apr 30, 2008 12:21 am   

For the your not logged in error

in the index.php file within the modules/TotalLottery/ folder

CHANGE if($action == "signup" && memberCanSignup($id))
TO if(($action == "signup") && (memberCanSignup($id) == "true"))

a little farther down
CHANGE if($action == "signup")
TO if(($action == "signup") && (memberCanSignup($id) == "false"))


The whole section should look like this

Code:
if(($action == "signup") && (memberCanSignup($id) == "true"))
{
   $userInfo =& $CMS->getCurrentUserInfo();   
   // Sign member up for lotto
   $q = mysql_query("SELECT remaining_members FROM totallottery_contests WHERE id = '".$id."'");
   list($remPlayers) = mysql_fetch_row($q);
   $membersLeft = unserialize($remPlayers);
   if(!is_array($membersLeft)) $membersLeft = array();
   $membersLeft[] = $userInfo['uid'];
   $serializedPlayers = serialize($membersLeft);
   $u = mysql_query("UPDATE totallottery_contests SET num_starting_members = num_starting_members + 1, remaining_members = '".$serializedPlayers."' WHERE id = '".$id."'") or die("ERROR: ".mysql_error());
   $msg = "You have been added to the lottery.  Check back often to view your winning status.";
}
if(($action == "signup") && (memberCanSignup($id) == "false"))
{
   $msg = "ERROR: You must login before you can sign up for the lottery...";
}



By the way, how did you fix the numbers?
 

 
View user's profileSend private messageVisit poster's websiteAIM AddressYahoo Messenger Reply with quote

Untergang
Reputation: 593.6
votes: 4
Local time: 2:15 AM
Location: Lommel
belgium.gif

Status: Offline
0.47 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 05 Sep 2008
Posts: 227
Points: 5644 

Post Re: Lottery module Posted: Wed Apr 30, 2008 3:26 pm   

Lottery module Posted: 2007-11-16, 11:29:00

It has been a long while, I fixed that bug too.
But I don't know what the problem was with the numbers.
Or how I fixed it.

Greets
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote



Post new topic   Reply to topic  
   www.clan-themes.co.uk Forum Index » Modules


 
11 Replies / 897 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
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
You cannot attach files in this forum
You can download files in this forum