DRE
Well-known member
Works great!In forum, how can we use this line? If checked and I put in "10", it doesn't work:
Bonus for New thread
- Use forum-based value i
For those of you who have been looking for a way to run the calculations on an already existing forum, I put together a little php script to do exactly that (it also logs all the initial imports in the transaction table so it shows up in the user's transaction history). I just ran it on my forum after installing the mod and it worked great.
I've attached it to this post. I haven't tested it extensively beyond my forum so I recommend making sure you've got a backup of your database first. Also, the script is hard-coded to use my currency rules for the import ($1 per post, $2 per thread, $2 per post like received) so if you want to change that you'll need to change the calculation on the line where $cashMoney is set. Even if you use different rules and don't want to change it though I figure this would still be better than having everyone start at 0.
Just fill out your db info at the top of the script and follow the instructions. If you want to edit anything I tried to make sure and comment it pretty well to make it easy to follow.
Enjoy...
nstead of system-wide value (set at 100)
Here is the actual name and it works! Thanks for the direction!Use a query?
I haven't installed the add-on, so I cannot verify which tables to hit, but it probably uses the user table for storage of the amounts, so the query would be something like:
Code:UPDATE xf_user SET bankBalance = 0;
UPDATE xf_user
SET bdbank_money = 0;