MyBB-Plugins Forums
Money Prefix as a picture - Printable Version

+- MyBB-Plugins Forums (http://forums.mybb-plugins.com)
+-- Forum: Archived Forums (http://forums.mybb-plugins.com/Forum-Archived-Forums)
+--- Forum: MyBB 1.4.x (http://forums.mybb-plugins.com/Forum-MyBB-1-4-x)
+---- Forum: MyPlaza Turbo (http://forums.mybb-plugins.com/Forum-MyPlaza-Turbo)
+---- Thread: Money Prefix as a picture (/Thread-Money-Prefix-as-a-picture)



Money Prefix as a picture - Vysse - 03-16-2009

Is this possible I wanna make my Prefix this [Image: Datary_symbol.JPG] it is the symbol for credits in star wars. If anyone knows a way for me to do this please let me know.


RE: Money Prefix as a picture - Diogo Parrinha - 03-16-2009

http://forums.consoleworld.net/showthread.php?tid=1274&pid=24593&highlight=I+doubt#pid24593


RE: Money Prefix as a picture - Vysse - 03-16-2009

hmm so i tried that and it didn't work any other ideas?


RE: Money Prefix as a picture - Diogo Parrinha - 03-16-2009

You need to edit the function my_format_money in myplaza_general.php
Search for:
PHP Code:
/**
 * Formats cash to be displayed
 *
 * @param int Amount of money.
 * @return string Displayed money.
 */
function my_format_money($money)
{
    global 
$mybb;
    return 
htmlspecialchars_uni($mybb->settings['myplaza_money_prefix']
        .
number_format($money$mybb->settings['myplaza_money_decimals'], $mybb->settings['decpoint'], $mybb->settings['thousandssep'])
        .
$mybb->settings['myplaza_money_suffix']);

Line 105


Replace it with:
PHP Code:
/**
 * Formats cash to be displayed
 *
 * @param int Amount of money.
 * @return string Displayed money.
 */
function my_format_money($money)
{
    global 
$mybb;
    return 
$mybb->settings['myplaza_money_prefix']
        .
htmlspecialchars_uni(number_format($money$mybb->settings['myplaza_money_decimals'], $mybb->settings['decpoint'], $mybb->settings['thousandssep']))
        .
$mybb->settings['myplaza_money_suffix'];

Make sure you don't use any malicious code for money suffix or prefix.


RE: Money Prefix as a picture - Vysse - 03-16-2009

worked like a charm ty so much this should be stickied as im sure others might want this info. genius work on the entire thing. can't wait to try the premium work soon enough Big Grin.


RE: Money Prefix as a picture - Diogo Parrinha - 03-16-2009

I'm glad it worked, I'll tell shadows to place a link to this thread on his F.A.Q.s thread


RE: Money Prefix as a picture - Saeda - 05-28-2009

The code is super dubber.

Just one little small thing there. I tried to replace the code. Got a syntax error at line 116. Went back and deleted the ')'. Everything goes smoothly afterward.

Thank you very mucho.


RE: Money Prefix as a picture - Diogo Parrinha - 05-29-2009

Ooops fixed, yes there was an extra )
Thanks


RE: Money Prefix as a picture - mago056 - 06-28-2009

thanks, im going to put the Simmoleon sign (The Sims) Big Grin


RE: Money Prefix as a picture - Seeker - 06-28-2009

This is really nice, thanks. :yay: :yay: :yay: