Sfoglia il codice sorgente

Merge pull request #1255 from Arantor/release-2.1

! Add CAD and AUD to the list of supported currencies. This will (hopefu...
Arantor 10 anni fa
parent
commit
43f6ddf352

+ 2 - 2
Sources/ManagePaid.php

@@ -91,7 +91,7 @@ function ModifySubscriptionSettings($return_config = false)
 	{
 		// If the currency is set to something different then we need to set it to other for this to work and set it back shortly.
 		$modSettings['paid_currency'] = !empty($modSettings['paid_currency_code']) ? $modSettings['paid_currency_code'] : '';
-		if (!empty($modSettings['paid_currency_code']) && !in_array($modSettings['paid_currency_code'], array('usd', 'eur', 'gbp')))
+		if (!empty($modSettings['paid_currency_code']) && !in_array($modSettings['paid_currency_code'], array('usd', 'eur', 'gbp', 'cad', 'aud')))
 			$modSettings['paid_currency'] = 'other';
 
 		// These are all the default settings.
@@ -101,7 +101,7 @@ function ModifySubscriptionSettings($return_config = false)
 				array('select', 'paid_email', array(0 => $txt['paid_email_no'], 1 => $txt['paid_email_error'], 2 => $txt['paid_email_all']), 'subtext' => $txt['paid_email_desc']),
 				array('text', 'paid_email_to', 'subtext' => $txt['paid_email_to_desc'], 'size' => 60),
 			'',
-				'dummy_currency' => array('select', 'paid_currency', array('usd' => $txt['usd'], 'eur' => $txt['eur'], 'gbp' => $txt['gbp'], 'other' => $txt['other']), 'javascript' => 'onchange="toggleOther();"'),
+				'dummy_currency' => array('select', 'paid_currency', array('usd' => $txt['usd'], 'eur' => $txt['eur'], 'gbp' => $txt['gbp'], 'cad' => $txt['cad'], 'aud' => $txt['aud'], 'other' => $txt['other']), 'javascript' => 'onchange="toggleOther();"'),
 				array('text', 'paid_currency_code', 'subtext' => $txt['paid_currency_code_desc'], 'size' => 5, 'force_div_id' => 'custom_currency_code_div'),
 				array('text', 'paid_currency_symbol', 'subtext' => $txt['paid_currency_symbol_desc'], 'size' => 8, 'force_div_id' => 'custom_currency_symbol_div'),
 				array('check', 'paidsubs_test', 'subtext' => $txt['paidsubs_test_desc'], 'onclick' => 'return document.getElementById(\'paidsubs_test\').checked ? confirm(\'' . $txt['paidsubs_test_confirm'] . '\') : true;'),

+ 6 - 0
Themes/default/languages/ManagePaid.english.php

@@ -10,10 +10,14 @@ $txt['lang_paypal'] = 'US';
 $txt['usd_symbol'] = '$%1.2f';
 $txt['eur_symbol'] = '€%1.2f';
 $txt['gbp_symbol'] = '£%1.2f';
+$txt['cad_symbol'] = 'C$%1.2f';
+$txt['aud_symbol'] = 'A$%1.2f';
 
 $txt['usd'] = 'USD ($)';
 $txt['eur'] = 'EURO (€)';
 $txt['gbp'] = 'GBP (£)';
+$txt['cad'] = 'CAD (C$)';
+$txt['aud'] = 'AUD (A$)';
 $txt['other'] = 'Other';
 
 $txt['paid_username'] = 'Username';
@@ -96,6 +100,8 @@ $txt['paid_mod_email_desc'] = 'Where {NAME} is members name; {FORUM} is communit
 $txt['paid_mod_cost_usd'] = 'Cost (USD)';
 $txt['paid_mod_cost_eur'] = 'Cost (EUR)';
 $txt['paid_mod_cost_gbp'] = 'Cost (GBP)';
+$txt['paid_mod_cost_cad'] = 'Cost (CAD)';
+$txt['paid_mod_cost_aud'] = 'Cost (AUD)';
 $txt['paid_mod_cost_blank'] = 'Leave this blank to not offer this currency.';
 $txt['paid_mod_span'] = 'Length of Subscription';
 $txt['paid_mod_span_days'] = 'Days';