• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[bd] Banking

Because avarage joe doesn't know why he got for post1 only 5 points and for the other 10 points.
If it would be separated, he would know that threads are worth more as posts.
Oh, good point. I will look into this, shouldn't be too hard ;)
 
Bank Model - Line 207
PHP:
$users[$userId] = array('user_id' => 0, 'username' => 'User #' . $userId); // handle deleted users
pls use a phrase for "user"

edit: phrase user is already available within xenforo
 
Bank Model - Line 207
PHP:
$users[$userId] = array('user_id' => 0, 'username' => 'User #' . $userId); // handle deleted users
pls use a phrase for "user"

edit: phrase user is already available within xenforo
Using a phrase there may cause an additional sql query. Quite unnecessary. Also, it rarely run into that line of code because it only happen once a user is deleted from XenForo.
 
Yes, i know it's only for deleted users, but, some boards deletes there users..:D
and it's ugly & strange if i have everything in cyrillic and "User" is writen normal
 
Yes, i know it's only for deleted users, but, we some boards delete there users..:D
and it's ugly & strange if i have everything in cyrilic and "User" is writen normal
Hmm, well, okie. This will be changed to use phrase in the next release :D
 
You can change a line in code to target another field of xf_user table to achieve that. That option is designed to be changed (I just didn't display it). Is that what you want?

Yes, instead of it going into the "bdbank_money" database, I have a different one I would want it to go into. Where would this line be if I went to change it?
 
Yes, instead of it going into the "bdbank_money" database, I have a different one I would want it to go into. Where would this line be if I went to change it?

You can edit the file xenforo-root/library/bdBank/Model/Bank.php
Line 301, original

PHP:
if ($option_id == 'field') return 'bdbank_money';

Say you want to change it to use the field 'new_money_field' in table `xf_user`, you should replace the line with

PHP:
if ($option_id == 'field') return 'new_money_field';

This will be available as an option in the next release. Sorry for the hassle now :)
 
You can edit the file xenforo-root/library/bdBank/Model/Bank.php
Line 301, original

PHP:
if ($option_id == 'field') return 'bdbank_money';

Say you want to change it to use the field 'new_money_field' in table `xf_user`, you should replace the line with

PHP:
if ($option_id == 'field') return 'new_money_field';

This will be available as an option in the next release. Sorry for the hassle now :)

No hassle at all, I appreciate the help. Thank you so much...
 
You can edit the file xenforo-root/library/bdBank/Model/Bank.php
Line 301, original

PHP:
if ($option_id == 'field') return 'bdbank_money';

Say you want to change it to use the field 'new_money_field' in table `xf_user`, you should replace the line with

PHP:
if ($option_id == 'field') return 'new_money_field';

This will be available as an option in the next release. Sorry for the hassle now :)

Ok, I changed what was instructed. With it left at bdbank_money, after a post, I went from 97---->102. I changed the above, now, when I post, using sportsbook_cash, I stayed at 1171, and it didn't increase. I understand that it will pull from sportsbook_cash when I do a transaction, say, donating to another user. I just cannot figure out where it needs to be changed to have all the incoming (from new threads, posts, likes) go into sportsbook_cash, instead of bdbank_money.

Also, after changing it over to sportsbook_cash, I went into the database and checked, and bdbank_money had increased two more times, from my test posts. Do all occurrences of bdbank_money need changed to the new table name?
 
Ok, I changed what was instructed. With it left at bdbank_money, after a post, I went from 97---->102. I changed the above, now, when I post, using sportsbook_cash, I stayed at 1171, and it didn't increase. I understand that it will pull from sportsbook_cash when I do a transaction, say, donating to another user. I just cannot figure out where it needs to be changed to have all the incoming (from new threads, posts, likes) go into sportsbook_cash, instead of bdbank_money.

Also, after changing it over to sportsbook_cash, I went into the database and checked, and bdbank_money had increased two more times, from my test posts. Do all occurrences of bdbank_money need changed to the new table name?
Ah, stupid me. You gotta edit one more file

xenforo-root/library/bdBank/Model/Personal.php
Line 84
Originally, it is

PHP:
return 'bdbank_money';

You should change it to

PHP:
return 'sportsbook_cash';

Yeah, this is real stupid :(
 
Actually, I found it.

bdBank/Model/Personal.php

Find:
PHP:
    public static function field() {
        return 'bdbank_money';
    }
}

Replace with:
PHP:
    public static function field() {
        return 'sportsbook_cash';
    }
}

That will make all posts, threads and like bonuses be added to that table.
 
Hope that you have satisfaction enough to done the shop add-on today :p
Oooooh. sounds interesting.
Shortcut for an Y!M emoticon. This http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/113.gif
It means "satification" to me, at least :D
Cool !
113.gif

xfrocks: have you ever coded any vBulletin addons ? or IPB ? or Wordpress ?
 
Top Bottom