পণ্যের অংশে চলে যান
LCPanelলাইসেন্স সেন্টার প্যানেল
MMB MyMeetBook টি অধ্যায়

MyMeetBook ডকুমেন্টেশন

মাল্টি কারেন্সি

দর্শকের নিজের মুদ্রায় দাম: বেস কারেন্সি, ফরম্যাটসহ চালু মুদ্রার তালিকা, ক্রনে রিফ্রেশ হওয়া অনলাইন রেট, হাতে দেওয়া রেট, ফুটার, অ্যাকাউন্ট মেনু ও সেটিংসে পিকার।

প্লাগিনগুলো হালনাগাদ ৬ নভে ২০২৬ ৩৪ / ৪০

The Multi Currency plugin shows prices in the currency each visitor picks. The site keeps working in one base currency (the Wallet plugin's currency when the wallet is on, otherwise the one you set here); every price the Marketplace, Jobs, Fundraisers, Gifts and the wallet print is converted on the way out with the latest rate. Rates come from free online services without a key, are refreshed by cron, and any of them can be overridden by hand.

What members and visitors get

  • A picker: the footer link Currency: USD and the Currency row of the account menu open /currency, a page with one card per enabled currency (symbol, name and the rate against the base). One tap switches; the choice is kept in a cookie for a year, and for a signed-in member it is saved to the account as well, so it follows them to the next device.
  • Settings → Currency: the same choice as a select, with the rate of each currency next to it.
  • Converted prices everywhere the plugins print money: a marketplace listing of $10.00 reads €9,20 ($10.00) to a member who picked euros - the amount in the viewer's currency first, the original in brackets (you can switch the brackets off). Hovering a converted price shows the original in a tooltip. Salary ranges in Jobs, goals and donations in Fundraisers, gift prices and the wallet balance shown by other plugins go through the same filter.
  • Each currency written the way it is written at home: the euro as €1.234,56, the Swedish krona as 1 234,56 kr, the Saudi riyal after the number, the yen and the won without decimals, the ringgit as RM 4.70. The symbol, the decimals, the position and both separators can be changed per currency.

Admin → Plugin pages → Multi Currency

  • Refresh rates now fetches at once and shows when the rates were last fetched and from where; a failed attempt is flagged with the reason in its tooltip.
  • Rates: the base currency (read from the Wallet plugin when it is on), the rate source - Automatic tries exchangerate.host, then open.er-api.com, then frankfurter.app, and you can pin one of them or choose Manual rates only - the refresh interval in hours for the cron job, and an optional own rates address: any JSON with a rates object (per 1 US dollar, or with a base of its own) that is read instead of the online services.
  • Display: Show the original price too, the footer link and the account-menu row.
  • Currencies: 41 currencies come ready (USD, BDT, EUR, GBP, INR, SAR, AED and MYR are on at first). Per row: on/off, symbol, decimals (0-4), position before or after the number, thousands and decimal separators, the online rate (per 1 base), a manual rate box - a number in it wins over the online rate until you clear it - and the sort order. The base currency is always on and cannot be removed.
  • Add a currency: any three-letter code with a name and a symbol; it gets its rate at the next fetch when the source knows it, otherwise give it a manual rate. A currency you added can be removed again.
  • Rate history: the last 30 fetches with their source and the rates of the enabled currencies at that moment, failed attempts included.

Cron

currency-rates runs every refresh interval hours (6 by default) and fetches only when the cached rates are older than that. Rates are cached in the database, so a dead service never slows a page: the last good rates stay in use and the failure is listed in the history.

For plugin writers

The plugin answers these filters; call them and degrade gracefully when they return nothing, so your plugin also works without it:

  • apply_filters('money_format', '', $amount, 'USD') - HTML: the amount in the viewer's currency with a title carrying the original.
  • apply_filters('money_text', '', $amount, 'USD') - the same as plain text (safe for e()).
  • apply_filters('money_range_text', '', $min, $max, 'USD') - a converted range for salaries.
  • apply_filters('currency_convert', null, $amount, 'USD', 'BDT') - a float, or null when a rate is missing.
  • apply_filters('currency_list', []) - the enabled currencies, code => row; apply_filters('currency_viewer', '') - the viewer's code.
  • wallet_money is answered at a late priority: when the viewer's currency differs from the base, the wallet's text is replaced by the converted one. wallet_currency is answered when the Wallet plugin is off, so plugins that ask for the site currency get the base set here.
এটি কি কাজে লেগেছে?
এই অধ্যায়টি শেয়ার করুন