Plugin Directory

Changeset 512117


Ignore:
Timestamp:
02/29/2012 04:46:36 AM (14 years ago)
Author:
WhiteCubes
Message:

Fix: over SSL + FJD

Location:
worldcurrency
Files:
4 edited
8 copied

Legend:

Unmodified
Added
Removed
  • worldcurrency/trunk/currencies.inc.php

    r507752 r512117  
    1717    $dt_wc_currencylist['RUB'] = array('name'=>'Russian Rouble (RUB)', 'symbol'=>'руб');
    1818    $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'=>'ƒ');
    2119    $dt_wc_currencylist['ARS'] = array('name'=>'Argentine Peso (ARS)', 'symbol'=>'$');
    2220    $dt_wc_currencylist['AWG'] = array('name'=>'Aruba Florin (AWG)', 'symbol'=>'ƒ');
     
    4846    $dt_wc_currencylist['EEK'] = array('name'=>'Estonian Kroon (EEK)', 'symbol'=>'kr');
    4947    $dt_wc_currencylist['EGP'] = array('name'=>'Egyptian Pound (EGP)', 'symbol'=>'£');
     48    $dt_wc_currencylist['SVC'] = array('name'=>'El Salvador Colon (SVC)', 'symbol'=>'$');
    5049    $dt_wc_currencylist['ERN'] = array('name'=>'Eritrea Nakfa (ERN)', 'symbol'=>'Nfk');
    5150    $dt_wc_currencylist['ETB'] = array('name'=>'Ethiopian Birr (ETB)', 'symbol'=>'');
    5251    $dt_wc_currencylist['FKP'] = array('name'=>'Falkland Islands Pound (FKP)', 'symbol'=>'£');
     52    $dt_wc_currencylist['FJD'] = array('name'=>'Fijian dollar (FJD)', 'symbol'=>'F$');
    5353    $dt_wc_currencylist['GHC'] = array('name'=>'Ghanian Cedi (GHC)', 'symbol'=>'¢');
    5454    $dt_wc_currencylist['GIP'] = array('name'=>'Gibraltar Pound (GIP)', 'symbol'=>'£');
     
    7777    $dt_wc_currencylist['LAK'] = array('name'=>'Lao Kip (LAK)', 'symbol'=>'₭');
    7878    $dt_wc_currencylist['LBP'] = array('name'=>'Lebanese Pound (LBP)', 'symbol'=>'£');
    79     $dt_wc_currencylist['LKR'] = array('name'=>'Sri Lanka Rupee (LKR)', 'symbol'=>'₨');
    8079    $dt_wc_currencylist['LSL'] = array('name'=>'Lesotho Loti (LSL)', 'symbol'=>'L');
    8180    $dt_wc_currencylist['LTL'] = array('name'=>'Lithuanian Lita (LTL)', 'symbol'=>'Lt');
     
    9796    $dt_wc_currencylist['MZN'] = array('name'=>'Mozambique Metical (MZM)', 'symbol'=>'MTn');
    9897    $dt_wc_currencylist['NAD'] = array('name'=>'Namibian Dollar (NAD)', 'symbol'=>'$');
     98    $dt_wc_currencylist['ANG'] = array('name'=>'Neth Antilles Guilder (ANG)', 'symbol'=>'ƒ');
    9999    $dt_wc_currencylist['NGN'] = array('name'=>'Nigerian Naira (NGN)', 'symbol'=>'₦');
    100100    $dt_wc_currencylist['NIO'] = array('name'=>'Nicaragua Cordoba (NIO)', 'symbol'=>'C$');
     
    121121    $dt_wc_currencylist['SLL'] = array('name'=>'Sierra Leone Leone (SLL)', 'symbol'=>'Le');
    122122    $dt_wc_currencylist['SOS'] = array('name'=>'Somali Shilling (SOS)', 'symbol'=>'S');
     123    $dt_wc_currencylist['LKR'] = array('name'=>'Sri Lanka Rupee (LKR)', 'symbol'=>'₨');
    123124    $dt_wc_currencylist['SRD'] = array('name'=>'Surinam Guilder (SRG)', 'symbol'=>'$');
    124125    $dt_wc_currencylist['STD'] = array('name'=>'Sao Tome Dobra (STD)', 'symbol'=>'Db');
    125     $dt_wc_currencylist['SVC'] = array('name'=>'El Salvador Colon (SVC)', 'symbol'=>'$');
    126126    $dt_wc_currencylist['SYP'] = array('name'=>'Syrian Pound (SYP)', 'symbol'=>'£');
    127127    $dt_wc_currencylist['SZL'] = array('name'=>'Swaziland Lilageni (SZL)', 'symbol'=>'L');
     
    144144    $dt_wc_currencylist['XOF'] = array('name'=>'CFA Franc (BCEAO) (XOF)', 'symbol'=>'Fr');
    145145    $dt_wc_currencylist['XPF'] = array('name'=>'Pacific Franc (XPF)', 'symbol'=>'Fr');
     146    $dt_wc_currencylist['AED'] = array('name'=>'UAE Dirham (AED)', 'symbol'=>'د.إ');
    146147    $dt_wc_currencylist['YER'] = array('name'=>'Yemen Riyal (YER)', 'symbol'=>'﷼');
    147148    $dt_wc_currencylist['ZAR'] = array('name'=>'South African Rand (ZAR)', 'symbol'=>'R');
  • worldcurrency/trunk/readme.txt

    r511695 r512117  
    55Requires at least: 2.8.0
    66Tested up to: 3.3.1
    7 Stable tag: 1.7
     7Stable tag: 1.8
    88
    99Recognises users by IP address and shows them converted values in their local currency, you can write post/pages in multiple currencies.
     
    3333* The currency selection box may be putted everywhere via html placeholder
    3434* 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
    3536
    3637= How To Use (once plugin is installed) =
     
    7576Alternatively, you can update this plugin through the WordPress Admin interface.
    7677
     78If the update includes a new currency that you need, il will appear only after a day because currency rates are cached.
     79If 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
    7782== Frequently Asked Questions ==
    7883
     
    8590
    8691== 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
    8797
    8898= 1.7 (28th February 2012) =
  • worldcurrency/trunk/worldcurrency-admin.php

    r511695 r512117  
    2525            $dt_wc_options['include_jquery']        = isset($_POST['include_jquery']) ? 'true' : 'false';
    2626            $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';
    2728           
    2829            update_option('dt_wc_options', $dt_wc_options);
     
    142143                        <p>
    143144                            <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>
    144153                                Plugin Firing Priorty:
    145154                                <input type="text" size="4" name="plugin_priority" value="<?php echo $dt_wc_options['plugin_priority']; ?>" />
  • worldcurrency/trunk/worldcurrency.php

    r511695 r512117  
    44Plugin URI: http://www.cometicucinoilweb.it/blog/en/worldcurrency-plugin-for-wordpress/
    55Description: 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.7
    7 Date: 28th February 2012
     6Version: 1.8
     7Date: 29th February 2012
    88Author: Daniele Tieghi
    99Author URI: http://www.cometicucinoilweb.it/blog/chi-siamo/daniele-tieghi/
     
    6767            if ($force || !isset($dt_wc_options['bottom_select']))      $dt_wc_options['bottom_select'] = 'true';
    6868            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';
    7071            if ($force || !isset($dt_wc_options['plugin_priority']))    $dt_wc_options['plugin_priority'] = 10;
    7172            if ($force || !isset($dt_wc_options['additional_css']))     $dt_wc_options['additional_css'] = <<<EOT
     
    113114                    echo "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>\n";
    114115                   
     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               
    115122                ?>
    116123                <script type="text/javascript">
     
    127134                            var theSpan = <?php echo $jQuerySymbol; ?>(this);
    128135                            <?php echo $jQuerySymbol; ?>.ajax({
    129                                 url: '<?php echo wp_nonce_url(admin_url('admin-ajax.php'), 'worldcurrency_safe'); ?>',
     136                                url: '<?php echo $ajax_url; ?>',
    130137                                dataType: 'html',
    131138                                type: 'GET',
     
    158165                            var theDiv = <?php echo $jQuerySymbol; ?>(this);
    159166                            <?php echo $jQuerySymbol; ?>.ajax({
    160                                 url: '<?php echo wp_nonce_url(admin_url('admin-ajax.php'), 'worldcurrency_safe'); ?>',
     167                                url: '<?php echo $ajax_url; ?>',
    161168                                dataType: 'html',
    162169                                type: 'GET',
     
    333340        // Don't proceed if we don't have enough info or if the nonce fails
    334341            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;
    336343           
    337344        // Include our Yahoo!Finance class
     
    391398        // Do not show conversions to the same currency
    392399            if ($dt_wc_options['hide_if_same'] == 'true' && $from_code == $to_code)
    393                 return;
     400                exit;
    394401           
    395402        // Echo in the required format
Note: See TracChangeset for help on using the changeset viewer.