SMF Shop
SMFShop => Coding => Topic started by: fightstar on July 15, 2007, 05:51:52 am
-
I have enough experience with modifying website code so you don't have to dumb down your response for me :)
What I'm looking to do is change where it says "Send Money" To "Send Points" .
The reason for this is i prefer the word points as it doesn't sound like its sending actual currency to people.
Please help :)
Thanks very much
-
There are quite are a few different spots to change this to do a complete job
but the one you are after is located in
Display.template.php
Just do a search for "Send Money"
other references are located in
languages/Errors.english.php
languages/ManagePermissions.english.php
languages/Shop.english.php
-
Thank you very much sir :)
Much appreciated ;D
-
sorry for double post, one last question.
It always displays your current balance that is outside of the bank.
is it possible to make it so it displays your out of bank balance, your in bank balance and total balance?
If so awesome :)
Thanks
-
it is yes
Your bank balance is store is variable
$context['user']['moneyBank']
as with
out of bank balance
$context['user']['money']
So they can be used where ever you would like
If you have issues with using this, just let me know how you would like it displayed and ill give you an example bit of code
-
your too kind :) i would just like it displayed like this :
http://www.1timeuser.com/index.php?topic=2
take a look that that , where it says "15.00 1T Points"
underneath that have it say "xxx Bank 1T Points"
then underneath that say "xx Total 1T Points"
----
Thanks so much for the help :) your a star man :D
Sample code would be great thanks :) im more of a editing guy than a code creation guy, in terms of website coding at least.
Thank you so much
-
ok its a little bit more difficult.
Just so you know, if you go ahead with this, it might make future patches fail.
first off
open up
Sources/Load.php
search for
mem.is_activated, mem.money,
replace with
mem.is_activated, mem.money, mem.moneyBank,
search for
stars, mem.money,
replace with
stars, mem.money, mem.moneyBank,
search for
'money' => $profile['money'],
on the next line add
'moneyBank' => $profile['moneyBank'],
Almost done,
open up your
Display.template.php
search for
', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '<br /><br />
replace with
', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '<br />
', $modSettings['shopCurrencyPrefix'], $message['member']['moneyBank'], ' Bank ' ,$modSettings['shopCurrencySuffix'], '<br />
', $modSettings['shopCurrencyPrefix'], ($message['member']['moneyBank']+$message['member']['money']), ' Total ' ,$modSettings['shopCurrencySuffix'], '<br /><br />
-
Thanks very much, I will try that right now :) I was in bed prior to know lol :coolsmiley:
The display template gave no errors after moification but the load.php did :(
I get this error :
Parse error: parse error, unexpected T_STRING, expecting ')' in c:\domains\1timeuser.com\wwwroot\Sources\Load.php on line 1102
line 1102 is : 'moneyBank => $profile['moneyBank'],
edit fixed it :) you typod :P
should have been - 'moneyBank' => $profile['moneyBank'],
thank you yet again :)
I recon that this would be a much welcome feature to be able to turn on or off via the admin cp in the next update :D
Cheers again mate :)
-
Sorry about that
made the relevant change in my post
glad you got it working.