234501
mrgym
international currency presentation format
  • 2004/9/26 1:51

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


(I hope this is the correct forum for this question)

I'm trying to write a module that has an admin preference for currency format. Each country has many differences in currency PRESENTATION format:

- symbol may be before or after the digits
- group separator characters differ

Examples;
en_US $1,000,000
fr_FR 1 000 000€

What approach should I take if I want to offer different currency presentation formats? ( I don't need to worry about the fractional portion of the currency for my app)

How about setlocale() and money_format()?

//'en_US','en_GB','fr_FR'are example prefs from {prefix}_config

setlocale(LC_MONETARY, 'en_US');
print("before:$x<br>");
$y = money_format("%.0n",$x);
print("after:$y<br>");

Or, should I set prefs for the symbol, symbol position, and group separator and write my own functions?

Another note. setlocale and money_format give a two-byte utf8 currency sign which does NOT display well as HTML 4. To convert to ASCII from the utf8, you may have to:

$localeArray = localconv();
$symbol = $localeArray['currency_symbol']; //what is symbol?
$symbolReplacement = utf8_decode($symbol);

//the new string with single-byte currency symbol
$y = preg_replace("/$symbol/",$symbolReplacement,$y);





234502
Josem
Re: Can't write tables to db?
  • 2004/9/26 1:10

  • Josem

  • Just popping in

  • Posts: 18

  • Since: 2004/8/22


Does the owner of the database have all the rights to the database?



234503
rlocone
Can't write tables to db?
  • 2004/9/26 0:34

  • rlocone

  • Just popping in

  • Posts: 9

  • Since: 2004/7/31


Hello All!

I get almost to the end of the install then this happens.

1 entries inserted to table xoops_bannerclient.
6 entries inserted to table xoops_configcategory.
26 entries inserted to table xoops_configoption.
1 entries inserted to table xoops_imgset.
1 entries inserted to table xoops_imgset_tplset_link.
7 entries inserted to table xoops_ranks.
17 entries inserted to table xoops_smiles.
3 entries inserted to table xoops_groups.
2 entries inserted to table xoops_groups_users_link.
52 entries inserted to table xoops_group_permission.
3 entries inserted to table xoops_banner.
1 entries inserted to table xoops_tplset.
1 entries inserted to table xoops_modules.
25 entries inserted to table xoops_tplfile.
25 entries inserted to table xoops_tplsource.
11 entries inserted to table xoops_newblocks.
1 entries inserted to table xoops_users.
11 entries inserted to table xoops_block_module_link.
71 entries inserted to table xoops_config.

Failed inserting 1 entries to table xoops_configoption.
Failed inserting 1 entries to table xoops_newblocks.
Failed inserting 1 entries to table xoops_tplfile.
Failed inserting 1 entries to table xoops_tplsource.
Failed inserting 3 entries to table xoops_group_permission.

Constant XOOPS_GROUP_ADMIN written to 1.
Constant XOOPS_GROUP_USERS written to 2.
Constant XOOPS_GROUP_ANONYMOUS written to 3.
---
As you can see the other tables get added. Why? How can this be corrected?

Thanks.



234504
JasonMR
Re: H1
  • 2004/9/26 0:12

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21





234505
Jackwan
Re: H1
  • 2004/9/25 23:59

  • Jackwan

  • Not too shy to talk

  • Posts: 129

  • Since: 2004/9/8 2


s



234506
hawkeyegop
Re: Changing date display in blocks (extcal and newmembers)
  • 2004/9/25 23:57

  • hawkeyegop

  • Just popping in

  • Posts: 83

  • Since: 2004/9/18


OK, I figured out how to change the display of the core blocks, but still can't figure it out in extCal. Please, can anyone help?



234507
hawkeyegop
Re: Changing date display in blocks (extcal and newmembers)
  • 2004/9/25 23:57

  • hawkeyegop

  • Just popping in

  • Posts: 83

  • Since: 2004/9/18


OK, I figured out how to change the display of the core blocks, but still can't figure it out in extCal. Please, can anyone help?



234508
jerry
VIP area
  • 2004/9/25 23:51

  • jerry

  • Just popping in

  • Posts: 11

  • Since: 2004/7/9 1


I want to create a special VIP area. I'm using xcgal to show pictures, but I would like to set permissions so that only "VIP's" can access certain pictures. Anyone have an idea on how to do this?



234509
Jackwan
Re: IStat not updating!
  • 2004/9/25 23:50

  • Jackwan

  • Not too shy to talk

  • Posts: 129

  • Since: 2004/9/8 2


VERY VERY strange.

My count on the istat is now 4! While I had three registered ids (all me) login and out at least 20-30 times. WHY 4? I believe the count increases not because I have a new id or a new IP address(I have dynamic ip address on the browser side and i have forced it to change). As I can see it, it is incrementing based on 2 hours interval 12:00-12:59 14:00-14:59 etc.

I am confused. BTW I have made the changes as decribed above.

<!--
istat = new Image(1,1);
istat.src = "http://creforum.net/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referer)+"&page="+location.href;
//-->



234510
JasonMR
Re: H1
  • 2004/9/25 23:50

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


Have you got a site up, where you are testing this, so that I can take a look at the code?







Login

Who's Online

206 user(s) are online (132 user(s) are browsing Support Forums)


Members: 0


Guests: 206


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits