Changeset 512117
- Timestamp:
- 02/29/2012 04:46:36 AM (14 years ago)
- Location:
- worldcurrency
- Files:
-
- 4 edited
- 8 copied
-
tags/1.7 (copied) (copied from worldcurrency/trunk)
-
tags/1.7/currencies.inc.php (copied) (copied from worldcurrency/trunk/currencies.inc.php)
-
tags/1.7/ip2c (copied) (copied from worldcurrency/trunk/ip2c)
-
tags/1.7/readme.txt (copied) (copied from worldcurrency/trunk/readme.txt)
-
tags/1.7/worldcurrency-admin.php (copied) (copied from worldcurrency/trunk/worldcurrency-admin.php)
-
tags/1.7/worldcurrency.php (copied) (copied from worldcurrency/trunk/worldcurrency.php)
-
tags/1.7/worldcurrency.widget.php (copied) (copied from worldcurrency/trunk/worldcurrency.widget.php)
-
tags/1.7/yahoofinance.class.php (copied) (copied from worldcurrency/trunk/yahoofinance.class.php)
-
trunk/currencies.inc.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/worldcurrency-admin.php (modified) (2 diffs)
-
trunk/worldcurrency.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
worldcurrency/trunk/currencies.inc.php
r507752 r512117 17 17 $dt_wc_currencylist['RUB'] = array('name'=>'Russian Rouble (RUB)', 'symbol'=>'руб'); 18 18 $dt_wc_currencylist['---'] = array('name'=>'-------------------', 'symbol'=>'---'); 19 $dt_wc_currencylist['AED'] = array('name'=>'UAE Dirham (AED)', 'symbol'=>'د.إ');20 $dt_wc_currencylist['ANG'] = array('name'=>'Neth Antilles Guilder (ANG)', 'symbol'=>'ƒ');21 19 $dt_wc_currencylist['ARS'] = array('name'=>'Argentine Peso (ARS)', 'symbol'=>'$'); 22 20 $dt_wc_currencylist['AWG'] = array('name'=>'Aruba Florin (AWG)', 'symbol'=>'ƒ'); … … 48 46 $dt_wc_currencylist['EEK'] = array('name'=>'Estonian Kroon (EEK)', 'symbol'=>'kr'); 49 47 $dt_wc_currencylist['EGP'] = array('name'=>'Egyptian Pound (EGP)', 'symbol'=>'£'); 48 $dt_wc_currencylist['SVC'] = array('name'=>'El Salvador Colon (SVC)', 'symbol'=>'$'); 50 49 $dt_wc_currencylist['ERN'] = array('name'=>'Eritrea Nakfa (ERN)', 'symbol'=>'Nfk'); 51 50 $dt_wc_currencylist['ETB'] = array('name'=>'Ethiopian Birr (ETB)', 'symbol'=>''); 52 51 $dt_wc_currencylist['FKP'] = array('name'=>'Falkland Islands Pound (FKP)', 'symbol'=>'£'); 52 $dt_wc_currencylist['FJD'] = array('name'=>'Fijian dollar (FJD)', 'symbol'=>'F$'); 53 53 $dt_wc_currencylist['GHC'] = array('name'=>'Ghanian Cedi (GHC)', 'symbol'=>'¢'); 54 54 $dt_wc_currencylist['GIP'] = array('name'=>'Gibraltar Pound (GIP)', 'symbol'=>'£'); … … 77 77 $dt_wc_currencylist['LAK'] = array('name'=>'Lao Kip (LAK)', 'symbol'=>'₭'); 78 78 $dt_wc_currencylist['LBP'] = array('name'=>'Lebanese Pound (LBP)', 'symbol'=>'£'); 79 $dt_wc_currencylist['LKR'] = array('name'=>'Sri Lanka Rupee (LKR)', 'symbol'=>'₨');80 79 $dt_wc_currencylist['LSL'] = array('name'=>'Lesotho Loti (LSL)', 'symbol'=>'L'); 81 80 $dt_wc_currencylist['LTL'] = array('name'=>'Lithuanian Lita (LTL)', 'symbol'=>'Lt'); … … 97 96 $dt_wc_currencylist['MZN'] = array('name'=>'Mozambique Metical (MZM)', 'symbol'=>'MTn'); 98 97 $dt_wc_currencylist['NAD'] = array('name'=>'Namibian Dollar (NAD)', 'symbol'=>'$'); 98 $dt_wc_currencylist['ANG'] = array('name'=>'Neth Antilles Guilder (ANG)', 'symbol'=>'ƒ'); 99 99 $dt_wc_currencylist['NGN'] = array('name'=>'Nigerian Naira (NGN)', 'symbol'=>'₦'); 100 100 $dt_wc_currencylist['NIO'] = array('name'=>'Nicaragua Cordoba (NIO)', 'symbol'=>'C$'); … … 121 121 $dt_wc_currencylist['SLL'] = array('name'=>'Sierra Leone Leone (SLL)', 'symbol'=>'Le'); 122 122 $dt_wc_currencylist['SOS'] = array('name'=>'Somali Shilling (SOS)', 'symbol'=>'S'); 123 $dt_wc_currencylist['LKR'] = array('name'=>'Sri Lanka Rupee (LKR)', 'symbol'=>'₨'); 123 124 $dt_wc_currencylist['SRD'] = array('name'=>'Surinam Guilder (SRG)', 'symbol'=>'$'); 124 125 $dt_wc_currencylist['STD'] = array('name'=>'Sao Tome Dobra (STD)', 'symbol'=>'Db'); 125 $dt_wc_currencylist['SVC'] = array('name'=>'El Salvador Colon (SVC)', 'symbol'=>'$');126 126 $dt_wc_currencylist['SYP'] = array('name'=>'Syrian Pound (SYP)', 'symbol'=>'£'); 127 127 $dt_wc_currencylist['SZL'] = array('name'=>'Swaziland Lilageni (SZL)', 'symbol'=>'L'); … … 144 144 $dt_wc_currencylist['XOF'] = array('name'=>'CFA Franc (BCEAO) (XOF)', 'symbol'=>'Fr'); 145 145 $dt_wc_currencylist['XPF'] = array('name'=>'Pacific Franc (XPF)', 'symbol'=>'Fr'); 146 $dt_wc_currencylist['AED'] = array('name'=>'UAE Dirham (AED)', 'symbol'=>'د.إ'); 146 147 $dt_wc_currencylist['YER'] = array('name'=>'Yemen Riyal (YER)', 'symbol'=>'﷼'); 147 148 $dt_wc_currencylist['ZAR'] = array('name'=>'South African Rand (ZAR)', 'symbol'=>'R'); -
worldcurrency/trunk/readme.txt
r511695 r512117 5 5 Requires at least: 2.8.0 6 6 Tested up to: 3.3.1 7 Stable tag: 1. 77 Stable tag: 1.8 8 8 9 9 Recognises users by IP address and shows them converted values in their local currency, you can write post/pages in multiple currencies. … … 33 33 * The currency selection box may be putted everywhere via html placeholder 34 34 * Is possible to choose to hide conversion if target and origin currency are the same 35 * Is possible to choose to make ajax calls over SSL 35 36 36 37 = How To Use (once plugin is installed) = … … 75 76 Alternatively, you can update this plugin through the WordPress Admin interface. 76 77 78 If the update includes a new currency that you need, il will appear only after a day because currency rates are cached. 79 If you are using historic rates than you have to delete "wc_rates" custom field from the post to have it refreshed with the new currency 80 (but keep in mind that this will refresh also the other exchange rates) 81 77 82 == Frequently Asked Questions == 78 83 … … 85 90 86 91 == Changelog == 92 93 = 1.8 (29th February 2012) = 94 * Fix: ajax was not working if wordpress admin is under forced SSL with: define('FORCE_SSL_LOGIN', true); 95 * Added: possibility to choose to make ajax calls over SSL 96 * Added: Fijian dollar (FJD) - if using historic rates you shuld delete "wc_rates" custom field in each post to have it updated with the new currency 87 97 88 98 = 1.7 (28th February 2012) = -
worldcurrency/trunk/worldcurrency-admin.php
r511695 r512117 25 25 $dt_wc_options['include_jquery'] = isset($_POST['include_jquery']) ? 'true' : 'false'; 26 26 $dt_wc_options['jquery_no_conflict'] = isset($_POST['jquery_no_conflict']) ? 'true' : 'false'; 27 $dt_wc_options['ajax_over_ssl'] = isset($_POST['ajax_over_ssl']) ? 'true' : 'false'; 27 28 28 29 update_option('dt_wc_options', $dt_wc_options); … … 142 143 <p> 143 144 <h4> 145 Ajax over SSL: 146 <input type="checkbox" name="ajax_over_ssl" id="ajax_over_ssl" <?php if ($dt_wc_options['ajax_over_ssl']=='true') {echo 'checked="checked"';}?> /> 147 </h4> 148 Flag this if your site runs over SSL and you want worldcurrency ajax queries run over SSL too. 149 </p> 150 151 <p> 152 <h4> 144 153 Plugin Firing Priorty: 145 154 <input type="text" size="4" name="plugin_priority" value="<?php echo $dt_wc_options['plugin_priority']; ?>" /> -
worldcurrency/trunk/worldcurrency.php
r511695 r512117 4 4 Plugin URI: http://www.cometicucinoilweb.it/blog/en/worldcurrency-plugin-for-wordpress/ 5 5 Description: Recognises users by IP address and shows them converted values in their local currency, you can write post/pages in multiple currencies. 6 Version: 1. 77 Date: 2 8th February 20126 Version: 1.8 7 Date: 29th February 2012 8 8 Author: Daniele Tieghi 9 9 Author URI: http://www.cometicucinoilweb.it/blog/chi-siamo/daniele-tieghi/ … … 67 67 if ($force || !isset($dt_wc_options['bottom_select'])) $dt_wc_options['bottom_select'] = 'true'; 68 68 if ($force || !isset($dt_wc_options['include_jquery'])) $dt_wc_options['include_jquery'] = 'true'; 69 if ($force || !isset($dt_wc_options['jquery_no_conflict'])) $dt_wc_options['jquery_no_conflict'] = 'false'; 69 if ($force || !isset($dt_wc_options['jquery_no_conflict'])) $dt_wc_options['jquery_no_conflict'] = 'false'; 70 if ($force || !isset($dt_wc_options['ajax_over_ssl'])) $dt_wc_options['ajax_over_ssl'] = 'false'; 70 71 if ($force || !isset($dt_wc_options['plugin_priority'])) $dt_wc_options['plugin_priority'] = 10; 71 72 if ($force || !isset($dt_wc_options['additional_css'])) $dt_wc_options['additional_css'] = <<<EOT … … 113 114 echo "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>\n"; 114 115 116 if ($dt_wc_options['ajax_over_ssl'] == 'true') { 117 $ajax_url = wp_nonce_url(str_replace('http','https', admin_url('admin-ajax.php')), 'worldcurrency_safe'); 118 } else { 119 $ajax_url = wp_nonce_url(str_replace('https','http', admin_url('admin-ajax.php')), 'worldcurrency_safe'); 120 } 121 115 122 ?> 116 123 <script type="text/javascript"> … … 127 134 var theSpan = <?php echo $jQuerySymbol; ?>(this); 128 135 <?php echo $jQuerySymbol; ?>.ajax({ 129 url: '<?php echo wp_nonce_url(admin_url('admin-ajax.php'), 'worldcurrency_safe'); ?>',136 url: '<?php echo $ajax_url; ?>', 130 137 dataType: 'html', 131 138 type: 'GET', … … 158 165 var theDiv = <?php echo $jQuerySymbol; ?>(this); 159 166 <?php echo $jQuerySymbol; ?>.ajax({ 160 url: '<?php echo wp_nonce_url(admin_url('admin-ajax.php'), 'worldcurrency_safe'); ?>',167 url: '<?php echo $ajax_url; ?>', 161 168 dataType: 'html', 162 169 type: 'GET', … … 333 340 // Don't proceed if we don't have enough info or if the nonce fails 334 341 if (!isset($_GET['value']) || !isset($_GET['postId']) || !isset($_GET['historic']) || !isset($_GET['from']) || !isset($_GET['to']) || !check_admin_referer('worldcurrency_safe')) 335 die();342 exit; 336 343 337 344 // Include our Yahoo!Finance class … … 391 398 // Do not show conversions to the same currency 392 399 if ($dt_wc_options['hide_if_same'] == 'true' && $from_code == $to_code) 393 return;400 exit; 394 401 395 402 // Echo in the required format
Note: See TracChangeset
for help on using the changeset viewer.