Jump to content

Welcome to DevFuse Forums

Sign In  Log in with Facebook

Create Account
Welcome to DevFuse Forums, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of DevFuse Forums by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.
Guest Message by DevFuse

Tutorial info Visit support topic

  • Added on: Aug 18 2013 06:01 AM
  • Date Updated: Aug 18 2013 09:37 AM
  • Views: 2841
  • IPB Version: 2.3.x

Change iPoints Lotto Payout

Posted by AndyF on Aug 18 2013 06:01 AM
This is for iPoints 241, it *may* work with other versions but has not been tested.

This is a simple change so that any 'Lotto' winnings are paid into the winners iPoints 'Bank' account instead of just into their 'points' , useful as that way they will not need to manually bank their winnings to gain any interest. :)

1. Open /sources/tasks/lotto.php - Take a backup of this file before editing it!

Around line 155, find...
$members_current_points = $get['points'];
Change to...
$members_current_points = $get['deposited_points'];
2. Around line 161, find...
$this->ipsclass->DB->do_update( 'members', array( 'points' => $points ), "id=".$row['m_id'] );
Change to..
$this->ipsclass->DB->do_update( 'members', array( 'deposited_points' => $points ), "id=".$row['m_id'] );
3. Around line 193, find...
$message  = "{$this->ipsclass->lang['msg_content']}<strong>{$total_points}</strong>";
Change to...
$message  = "{$this->ipsclass->lang['msg_content']}<strong>{$total_points}</strong><br /><br />These have been deposited into your iPoints bank account.";

Save / upload lotto.php

Test it by purchasing a ticket, making a note of your iPoints points / bank account points then running the lotto task via the task manager to force it to pick a winner. Examine your account and the PM (if enabled)

Powered by Tutorials 1.5.1 © 2017, by Michael McCune