Home :: Forums :: Register :: Sign In :: Links :: Downloads
You are not signed in. Please sign in. If you have not registered, please click here.

Lottery mod Fix (multiple tickets)

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb   More...
#1Sun Feb 19, 2006 10:48 pm   Lottery mod Fix (multiple tickets)
skmaniac30
CZ Newbie
 Codezwiz Site Donator
skmaniac30 has been a member for over 2 year's 2 Year Member
Status: Offline
Joined: Jan 31, 2006
0.01 posts per day
Posts: 12
Points: 2,947
   
Eliminates users from buying more tickets than allowed.
3 files to edit

open: modules/Forums/admin/admin_lottery.php
Find:
   $l_ticktype_sing = ( $board_config['lottery_ticktype'] == 'single' ) ? 'SELECTED' : '';

Replace with:
   $l_ticktype_sing = ( $board_config['lottery_ticktype'] == 'multiple' ) ? 'SELECTED' : '';


open: modules/Forums/lottery.php
Find: on line 124
$sql_count = $db->sql_numrows($result);

Replace with:
$sql_ticketcount = $db->sql_numrows($result);

Find:
$tickbuy = ( ($board_config['lottery_ticktype'] == "single") && ($sql_count > 0) ) ? 0 : 1;

Replace with:
$tickbuy = ( ($board_config['lottery_ticktype'] == "single") && ($sql_ticketcount > 0) ) ? 0 : 1;

Find:
      if ( $tickbuy )

Replace with:
      if ( ( $tickbuy ) && ($sql_ticketcount < $board_config['lottery_mb_amount']) )

Find:
'TICKETS_OWNED' => $sql_count,

Replace with:
'TICKETS_OWNED' => $sql_ticketcount,

Find:
if ( $board_config['lottery_ticktype'] != 'multi' || !($board_config['lottery_mb']) )

Replace with:
if ( $board_config['lottery_ticktype'] != 'multiple' || !($board_config['lottery_mb']) )

Find:
if ($amount > $board_config['lottery_mb_amount']) { $amount = $board_config['lottery_mb_amount']; }

Replace with:
if( ($amount+$sql_ticketcount) > $board_config['lottery_mb_amount']) { $amount = ($board_config['lottery_mb_amount']-$sql_ticketcount); }

Find:
$msg = ( $amount < 2 ) ? sprintf($lang['lottery_ticket_bought'], $board_config['lottery_name']) : sprintf($lang['lottery_tickets_bought'], $amount, $board_config['lottery_name']);

After Add:
      $msg .= ($lang['lottery_back']);


Open: modules/Forums/language/lang_*/lang_main.php
Find:
$lang['lottery'] = 'Lottery';

After Add:
$lang['lottery_back'] = '<p><a href="modules.php?name=Forums&file=lottery">Return to lottery.</a>';


Save and close.

I think thats everything, lemme know if it works for ya


Back to top Reply with quote
#2Sun Feb 26, 2006 6:33 pm   re: Lottery mod Fix (multiple tickets)
Taut
PayPal Donation
Asst. Admin
 Codezwiz Site Donator
Taut has been a member for over 5 year's 5 Year Member
usa.gif california.gif
Occupation: Entrepreneur
Fav. Sports Team: SF Giants
Website: admins101.com
Status: Offline
Joined: May 27, 2003
2.86 posts per day
Posts: 5504
Points: 481,675
   
ty for posting the fix



Taut

adding to sticky




_________________
My life is spent in one long effort to escape from the commonplace of existence.
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb   More...
<< View previous topic View next topic >>
Post new topicReply to topic

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 cannot download files in this forum