Plugin Directory

Changeset 539584


Ignore:
Timestamp:
05/03/2012 07:09:20 PM (14 years ago)
Author:
mdbitz
Message:

Commit of Version 1.8.0

Location:
wordpress-amazon-associate/trunk
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • wordpress-amazon-associate/trunk/APaPi/AmazonProduct/Iterator.php

    r309850 r539584  
    6363    public function __construct( $result ) {
    6464        $this->_request = $result->request; // init request object
    65         if( is_int( $result->TotalResults ) ) {
     65        if( is_int( intval( $result->TotalResults ) ) ) {
    6666            $this->_total_results = intval($result->TotalResults); // set total item results
    6767            $item_index = ( intval($this->_request->ItemPage) - 1 ) * 10 + 1;
  • wordpress-amazon-associate/trunk/APaPi/AmazonProduct/Locale.php

    r313769 r539584  
    3939     */
    4040    public static $_Locales = array(
    41             "CA" => "ca",
    42             "DE" => "de",
    43             "FR" => "fr",
    44             "JP" => "jp",
    45             "UK" => "co.uk",
    46             "US" => "com" );
     41            "CA" => "ecs.amazonaws.ca",
     42            "CN" => "webservices.amazon.cn",
     43            "DE" => "ecs.amazonaws.de",
     44            "ES" => "webservices.amazon.es",
     45            "IT" => "webservices.amazon.it",
     46            "FR" => "ecs.amazonaws.fr",
     47            "JP" => "ecs.amazonaws.jp",
     48            "UK" => "ecs.amazonaws.co.uk",
     49            "US" => "ecs.amazonaws.com" );
    4750
    4851    /**
     
    5659
    5760    /**
     61     *  CN
     62     */
     63    const CN = "CN";
     64
     65    /**
     66     * CN
     67     */
     68    const CHINA = "CN";
     69
     70    /**
    5871     *  DE
    5972     */
     
    6578
    6679    /**
     80     *  ES
     81     */
     82    const ES = "ES";
     83
     84    /**
     85     * Spain
     86     */
     87    const SPAIN = "ES";
     88
     89    /**
    6790     *  FR
    6891     */
     
    7295     */
    7396    const FRANCE = "FR";
     97
     98    /**
     99     *  IT
     100     */
     101    const IT = "IT";
     102
     103    /**
     104     *  IT
     105     */
     106    const ITALY = "IT";
    74107
    75108    /**
     
    120153        $locales = array();
    121154        $locales[self::CA] = "Canada";
     155        $locales[self::CN] = "China";
    122156        $locales[self::FR] = "France";
     157        $loacles[self::IT] = "Italy";
    123158        $locales[self::DE] = "Germany";
    124159        $locales[self::JP] = "Japan";
     160        $locales[self::ES] = "Spain";
    125161        $locales[self::UK] = "United Kingdom";
    126162        $locales[self::US] = "United States";
  • wordpress-amazon-associate/trunk/APaPi/AmazonProduct/Request.php

    r315217 r539584  
    11<?php
    22/*
    3  * copyright (c) 2010 MDBitz - Matthew John Denton - mdbitz.com
     3 * copyright (c) 2011 MDBitz - Matthew John Denton - mdbitz.com
    44 *
    55 * This file is part of AmazonProductAPI.
     
    4646
    4747    /**
    48      * host
    49      */
    50     private $_host = "ecs.amazonaws.";
    51 
    52     /**
    5348     * uri
    5449     */
     
    7570     */
    7671    public function __construct( ) {
    77         $this->set( "Version", "2010-09-01" );
     72        $this->set( "Version", "2011-08-01" );
    7873        $this->set( "Service", "AWSECommerceService" );
    7974        $this->set( "ItemPage", 1 );
     
    156151
    157152        // create signature
    158         $signing_string = "GET\n" . $this->_host . $this->_domain . "\n" . $this->_uri . "\n" . $query_string;
     153        $signing_string = "GET\n" . $this->_domain . "\n" . $this->_uri . "\n" . $query_string;
    159154        $signature = base64_encode(hash_hmac("sha256", $signing_string, $this->_secret_key, True) );
    160155        $signature = str_replace("%7E", "~", rawurlencode($signature));
     
    169164     *
    170165     */
    171     public function execute( ) {
     166     public function execute( $time = null) {
    172167        // set common parameters
    173         $this->set( "Timestamp", gmdate("Y-m-d\TH:i:s\Z") );
    174 
     168        //if( $time == null ) {
     169            $this->set( "Timestamp", gmdate("Y-m-d\TH:i:s\Z") );
     170        /*} else {
     171            $this->set( "Timestamp", $time );
     172        }*/
    175173        // execute request
    176174        $ch = $this->generateCURL( $this->getUrl( ) );
    177175        $data = curl_exec( $ch );
    178176        $code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
    179         return new AmazonProduct_Result( $code, $data, $this );
     177        $result = new AmazonProduct_Result( $code, $data, $this );
     178        /*
     179         *  logic to validate time of server
     180         */
     181        /*if( $time == null && !$result->isSuccess() ) {
     182            if( $result->Errors[0]->Code == "RequestExpired" ) {
     183                $time = $this->get_remote_gmt_time();
     184                if( $time != null ) {
     185                    return $this->execute( $time );
     186                }
     187            }
     188        }*/
     189        return $result;
     190    }
     191
     192    protected function get_remote_gmt_time() {
     193        $timercvd = $this->query_time_server( 'nist1-ny.ustiming.org', 37);
     194        if (!$timercvd[1]) { # if no error from query_time_server
     195            $timevalue = bin2hex ($timercvd[0]);
     196            $timevalue = abs (HexDec('7fffffff') - HexDec($timevalue) - HexDec('7fffffff')) ;
     197            $tmestamp = $timevalue - 2208988800; # convert to UNIX epoch time stamp
     198            $datum = date("Y-m-d\TH:i:s\Z",$tmestamp);// - date("Z",$tmestamp)); /* incl time zone offset */
     199            return $datum;
     200        }
     201        return null;
     202    }
     203
     204    /*
     205     * Query a time server
     206     * (C) 1999-09-29, Ralf D. Kloth (QRQ.software) <ralf at qrq.de>
     207     */
     208    protected function query_time_server ($timeserver, $socket) {
     209        $fp = fsockopen($timeserver,$socket,$err,$errstr,5);
     210
     211        # parameters: server, socket, error code, error text, timeout
     212        if ($fp) {
     213            fputs($fp,"\n");
     214            while ($line = fgets($fp)) $timevalue .= $line;
     215            fclose($fp);
     216        }
     217        else {
     218            $timevalue = " ";
     219        }
     220
     221        $ret = array();
     222        $ret[] = $timevalue;
     223        $ret[] = $err;     # error code
     224        $ret[] = $errstr;  # error text
     225        return($ret);
    180226    }
    181227
  • wordpress-amazon-associate/trunk/APaPi/AmazonProduct/Result.php

    r406922 r539584  
    149149        $xmlDoc->loadXML($xml);
    150150        $x = $xmlDoc->documentElement;
    151         if( $x->nodeName == "Errors" || $x->nodeName == "ItemLookupErrorResponse" ) {
     151       if(     $x->nodeName == "Errors" ||
     152               $x->nodeName == "ItemLookupErrorResponse" ||
     153               $x->nodeName == "BrowseNodeLookupErrorResponse")
     154       {
    152155            $this->set( "IsValid", "False" );
    153156            foreach( $x->childNodes as $node ) {
  • wordpress-amazon-associate/trunk/APaPi/changelog.htm

    r313769 r539584  
    22<p>This is the changelog of the AmazonProductAPI library for PHP. The current available release of the library can be found <a href="http://labs.mdbitz.com/amazon-product-api/downloads/">here</a></p>
    33<hr/>
     4<div class="entry">
     5    <h2>Version: <b>1.1.0</b> Released 05/03/2012</h2>
     6    <div class="comment">Minor Release Version - Support for Additional Locales</div>
     7    <ul>
     8        <li>China (CN) Support Added.</li>
     9        <li>Italy (IT) Support Added.</li>
     10        <li>Italy (IT) Support Added.</li>
     11        <li>Updated API Version to 2011-08-01.</li>
     12        <li>Added BrowseNodeLookupError Handling.</li>
     13        <li>Added Fix for correcting for Server Time discrepencies</li>
     14    </ul>
     15</div>
    416<div class="entry">
    517    <h2>Version: <b>1.0.1</b> Released 11-19-2010</h2>
  • wordpress-amazon-associate/trunk/AmazonProduct.php

    r412894 r539584  
    113113                        break;
    114114                }
    115                 if( ! is_null($options['class']) ) {
    116                     $image->set( "class", $options['class'] );
    117                 }
    118                 if( ! is_null($options['rel']) ) {
    119                     $image->set( "rel", $options['rel'] );
    120                 }
    121                 if( ! is_null($options['title']) ) {
    122                     $image->set("title", $options['title'] );
    123                 } else {
    124                     $image->set("title", $options['content'] );
    125                 }
    126                 if( ! is_null($options['alt']) ) {
    127                     $image->set("alt", $options['alt'] );
     115                if( ! is_null($image) ) {
     116                    if( ! is_null($options['class']) ) {
     117                        $image->set( "class", $options['class'] );
     118                    }
     119                    if( ! is_null($options['rel']) ) {
     120                        $image->set( "rel", $options['rel'] );
     121                    }
     122                    if( ! is_null($options['title']) ) {
     123                        $image->set("title", $options['title'] );
     124                    } else {
     125                        $image->set("title", $options['content'] );
     126                    }
     127                    if( ! is_null($options['alt']) ) {
     128                        $image->set("alt", $options['alt'] );
     129                    }
    128130                }
    129131                $output_str = '';
  • wordpress-amazon-associate/trunk/AmazonWidget/Abstract.php

    r353979 r539584  
    255255            case "CA":
    256256            case "DE":
     257            case "ES":
    257258            case "FR":
    258259            case "JP":
  • wordpress-amazon-associate/trunk/AmazonWidget/Omakase.php

    r410533 r539584  
    188188            "ad_price" => "all",
    189189            "ad_discount" => "add",
    190             "color_border" => "#000000",
    191             "color_background" => "#FFFFFF",
    192             "color_text" => "#000000",
    193             "color_link" => "#3399FF",
    194             "color_price" => "#990000",
    195             "color_logo" => "#CC6600",
     190            "color_border" => "000000",
     191            "color_background" => "FFFFFF",
     192            "color_text" => "000000",
     193            "color_link" => "3399FF",
     194            "color_price" => "990000",
     195            "color_logo" => "CC6600",
    196196            "locale" => ""
    197197        );
  • wordpress-amazon-associate/trunk/WPAA.php

    r421932 r539584  
    107107        "FR" => "wp-amazon-associate08-21",
    108108        "IT" => "wp-amazon-associate04-21",
    109         "JP" => "wp-amazon-associate-22"
     109        "JP" => "wp-amazon-associate-22",
     110        "ES" => "wp-amazon-associate07-21"
    110111    );
    111112
     
    130131        "UK" => true,
    131132        "CA" => true,
     133        "CN" => true,
    132134        "DE" => true,
    133135        "FR" => true,
    134         "JP" => true
     136        "JP" => true,
     137        "IT" => true,
     138        "ES" => true
    135139    );
    136140
     
    147151        "FR" => 8,
    148152        "IT" => 29,
    149         "JP" => 9
     153        "JP" => 9,
     154        "ES" => 7   // TODO need locale
    150155    );
    151156
     
    183188                "AccessKey" => null,
    184189                "SecretKey" => null,
    185                 "AssociateSupport" => "0",
     190                "AssociateSupport" => "1",
    186191                "AdminSupport" => "0",
    187192                "ProductPreview" => false,
     
    337342     */
    338343    public function filter_amazon_associate_tag($content) {
    339         //Get Matches
    340         $regex = '|<a.*?href=[""\'](?P<url>http://www\.amazon\..*?)[""\'].*?>.*?</a>|i';
    341         preg_match_all($regex, $content, $matches, PREG_PATTERN_ORDER);
    342         $filtered_matches = array_unique($matches['url']);
    343         foreach ($filtered_matches as $key => $match) {
    344             $orig_str = $match;
    345             $new_str = $orig_str;
    346             if( $this->modules[self::MODULE_IP2NATION]->isInstalled() && $this->options['LocaleByGeoIP'] ) {
    347                 $new_str = $this->localize_static_tag( $new_str );
    348             }
    349             $new_str = $this->replace_associate_tag( $new_str );
    350             if( $orig_str != $new_str ) {
    351                 $content = str_replace($orig_str, $new_str, $content);
     344        //Match http://www.amazon & http://amazon.
     345        $regexs = array('|<a.*?href=[""\'](?P<url>http://www\.amazon\..*?)[""\'].*?>.*?</a>|i',
     346            '|<a.*?href=[""\'](?P<url>http://amazon\..*?)[""\'].*?>.*?</a>|i');
     347        //iterate over Regular Expressions
     348        foreach( $regexs as $regex ) {
     349            preg_match_all($regex, $content, $matches, PREG_PATTERN_ORDER);
     350            $filtered_matches = array_unique($matches['url']);
     351            foreach ($filtered_matches as $key => $match) {
     352                $orig_str = $match;
     353                $new_str = $orig_str;
     354                if( $this->modules[self::MODULE_IP2NATION]->isInstalled() && $this->options['LocaleByGeoIP'] ) {
     355                    $new_str = $this->localize_static_tag( $new_str );
     356                }
     357                $new_str = $this->replace_associate_tag( $new_str );
     358                if( $orig_str != $new_str ) {
     359                    $content = str_replace($orig_str, $new_str, $content);
     360                }
    352361            }
    353362        }
     
    386395                    $result = $api->browseNodeLookup("927726");
    387396                    break;
     397                case "CN":
     398                    $result = $api->browseNodeLookup("658390051");
     399                    break;
    388400                case "DE":
    389401                    $result = $api->browseNodeLookup("541686");
    390402                    break;
     403                case "ES":
     404                    $result = $api->browseNodeLookup("599364031");
     405                    break;
    391406                case "FR":
    392407                    $result = $api->browseNodeLookup("468256");
     408                    break;
     409                case "IT":
     410                    $result = $api->browseNodeLookup("411663031");
    393411                    break;
    394412                case "JP":
     
    437455                            $replacement = "amazon.it";
    438456                            break;
     457                    case "ES" :
     458                            $replacement = "amazon.es";
     459                            break;
    439460            }
    440461            $new_str = str_replace( 'amazon.com', $replacement, $new_str );
     
    446467            $new_str = str_replace( 'amazon.cn', $replacement, $new_str );
    447468            $new_str = str_replace( 'amazon.it', $replacement, $new_str );
     469            $new_str = str_replace( 'amazon.es', $replacement, $new_str );
    448470            $handle   = curl_init($new_str);
    449471            if (false === $handle) {
     
    487509        } else if( strpos( $orig_str, "amazon.it" ) !== false ) {
    488510            $locale = "IT";
     511        } else if( strpos( $orig_str, "amazon.es" ) !== false ) {
     512            $locale = "ES";
    489513        }
    490514        $new_str = "";
     
    780804                    $this->associate_tags['UK'] = $_POST['AssociateTag-UK'];
    781805                }
     806                if (isset($_POST['AssociateTag-ES'])) {
     807                    $this->associate_tags['ES'] = $_POST['AssociateTag-ES'];
     808                }
    782809                update_option($this->tags_options_name, $this->associate_tags );
    783810
     
    827854                } else {
    828855                    $this->enabled_locales['IT'] = false;
     856                }
     857                if (isset($_POST['Locale-ES'])) {
     858                    $this->enabled_locales['ES'] = true;
     859                } else {
     860                    $this->enabled_locales['ES'] = false;
    829861                }
    830862                update_option($this->locales_options_name, $this->enabled_locales );
     
    9931025                            $content .= '<tr><td>' . $this->radio( "Locale", "US", (($this->options['Locale'] == "US" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_us.gif') . '" />&nbsp;<a href="https://affiliate-program.amazon.com/" target="_blank">' . __('United States', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-US', $this->associate_tags['US'] == $this->our_associate_tags['US'] ? "" : $this->associate_tags['US']) . '</td><td>' . $this->checkbox( 'Locale-US', $this->enabled_locales['US'] ) . '</td></tr>';
    9941026                            $content .= '<tr><td>' . $this->radio( "Locale", "CA", (($this->options['Locale'] == "CA" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_ca.gif') . '" />&nbsp;<a href="https://associates.amazon.ca/" target="_blank">' . __('Canada', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-CA', $this->associate_tags['CA'] == $this->our_associate_tags['CA'] ? "" : $this->associate_tags['CA']) . '</td><td>' . $this->checkbox( 'Locale-CA', $this->enabled_locales['CA'] ) . '</td></tr>';
    995                             $content .= '<tr><td></td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_cn.gif') . '" />&nbsp;<a href="https://associates.amazon.cn/" target="_blank">' . __('China', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-CN', $this->associate_tags['CN'] == $this->our_associate_tags['CN'] ? "" : $this->associate_tags['CN']) . '</td><td>' . $this->checkbox( 'Locale-CN', $this->enabled_locales['CN'] ) . '</td></tr>';
     1027                            $content .= '<tr><td>' . $this->radio( "Locale", "CN", (($this->options['Locale'] == "CN" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_cn.gif') . '" />&nbsp;<a href="https://associates.amazon.cn//" target="_blank">' . __('China', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-CN', $this->associate_tags['CN'] == $this->our_associate_tags['CN'] ? "" : $this->associate_tags['CN']) . '</td><td>' . $this->checkbox( 'Locale-CN', $this->enabled_locales['CN'] ) . '</td></tr>';
    9961028                            $content .= '<tr><td>' . $this->radio( "Locale", "DE", (($this->options['Locale'] == "DE" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_de.gif') . '" />&nbsp;<a href="https://partnernet.amazon.de/" target="_blank">' . __('Germany', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-DE', $this->associate_tags['DE'] == $this->our_associate_tags['DE'] ? "" : $this->associate_tags['DE']) . '</td><td>' . $this->checkbox( 'Locale-DE', $this->enabled_locales['DE'] ) . '</td></tr>';
     1029                            $content .= '<tr><td>' . $this->radio( "Locale", "ES", (($this->options['Locale'] == "ES" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_es.gif') . '" />&nbsp;<a href="https://afiliados.amazon.es/" target="_blank">' . __('Spain', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-ES', $this->associate_tags['ES'] == $this->our_associate_tags['ES'] ? "" : $this->associate_tags['ES']) . '</td><td>' . $this->checkbox( 'Locale-ES', $this->enabled_locales['ES'] ) . '</td></tr>';
    9971030                            $content .= '<tr><td>' . $this->radio( "Locale", "FR", (($this->options['Locale'] == "FR" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_fr.gif') . '" />&nbsp;<a href="https://partenaires.amazon.fr/" target="_blank">' . __('France', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-FR', $this->associate_tags['FR'] == $this->our_associate_tags['FR'] ? "" : $this->associate_tags['FR']) . '</td><td>' . $this->checkbox( 'Locale-FR', $this->enabled_locales['FR'] ) . '</td></tr>';
    998                             $content .= '<tr><td></td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_it.gif') . '" />&nbsp;<a href="https://programma-affiliazione.amazon.it/" target="_blank">' . __('Italy', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-IT', $this->associate_tags['IT'] == $this->our_associate_tags['IT'] ? "" : $this->associate_tags['IT']) . '</td><td>' . $this->checkbox( 'Locale-IT', $this->enabled_locales['IT'] ) . '</td></tr>';
     1031                            $content .= '<tr><td>' . $this->radio( "Locale", "IT", (($this->options['Locale'] == "IT" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_it.gif') . '" />&nbsp;<a href="https://programma-affiliazione.amazon.it/" target="_blank">' . __('Italy', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-IT', $this->associate_tags['IT'] == $this->our_associate_tags['IT'] ? "" : $this->associate_tags['IT']) . '</td><td>' . $this->checkbox( 'Locale-IT', $this->enabled_locales['IT'] ) . '</td></tr>';
    9991032                            $content .= '<tr><td>' . $this->radio( "Locale", "JP", (($this->options['Locale'] == "JP" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_jp.gif') . '" />&nbsp;<a href="https://affiliate.amazon.co.jp/" target="_blank">' . __('Japan', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-JP', $this->associate_tags['JP'] == $this->our_associate_tags['JP'] ? "" : $this->associate_tags['JP']) . '</td><td>' . $this->checkbox( 'Locale-JP', $this->enabled_locales['JP'] ) . '</td></tr>';
    10001033                            $content .= '<tr><td>' . $this->radio( "Locale", "UK", (($this->options['Locale'] == "UK" )? true: false) ) . '</td><td><img width="18" height="11" src="' . $this->getPluginPath( '/imgs/flag_uk.gif') . '" />&nbsp;<a href="https://affiliate-program.amazon.co.uk/" target="_blank">' . __('United Kingdom', 'wpaa') . '</a></td><td>' . $this->textinput( 'AssociateTag-UK', $this->associate_tags['UK'] == $this->our_associate_tags['UK'] ? "" : $this->associate_tags['UK']) . '</td><td>' . $this->checkbox( 'Locale-UK', $this->enabled_locales['UK'] ) . '</td></tr>';
     
    10201053                            $content .= '<tr><td><strong>' . __('Secret Key:','wpaa') . '</strong></td><td>' . $this->textinput("SecretKey", $this->options["SecretKey"]) . '</td></tr>';
    10211054                            $content .= '<tr><td><input class="button-primary" type="button" name="validate" value="' . __('Validate Credentials','wpaa') . ' &raquo;" onclick="validateAccess();" /></td><td><div id="accessMessage" style="display:none"></div></td></tr>';
     1055                            $content .= '<tr><td colspan="2"><div id="accessError" style="display:none"></div></td></tr>';
    10221056                            $content .= '</table>';
    10231057                            $content .= '<br/><div class="alignright"><input class="button-primary" type="submit" name="submit" value="' . __('Update Settings','wpaa') . ' &raquo;" /></div>';
     
    10921126                    if( data.IsValid == "True" ) {
    10931127                        jQuery( "#accessMessage" ).html( '<span style="color:green;" >Valid</span>' );
     1128                        jQuery( "#accessError" ).hide();
    10941129                    } else {
     1130            jQuery( "#accessError" ).html( '<p><b>Code:</b> ' + data.Errors[0].Code + '<br/><br/><b>Message:</b><br/>' + data.Errors[0].Message + '</p>' ).show();
    10951131                        jQuery( "#accessMessage" ).html( '<span style="color:red;" >InValid</span>' );
    10961132                    }
  • wordpress-amazon-associate/trunk/WPAA/CacheHandler.php

    r412894 r539584  
    144144            if( !$obj->isSuccess() && $locale != $wpaa->getLocale() ) {
    145145                return $this->getProductByAPI( $id, $wpaa->getLocale(), $type, $responseGroup );
     146            } else {
     147                return $obj;
    146148            }
    147149        }
  • wordpress-amazon-associate/trunk/WPAA/URIHandler.php

    r410533 r539584  
    5151                return "http://rcm-de.amazon.de/e/cm";
    5252                break;
     53            case "ES":
     54                return "http://rcm-es.amazon.es/e/cm";
     55                break;
    5356            case "FR":
    5457                return "http://rcm-fr.amazon.fr/e/cm";
  • wordpress-amazon-associate/trunk/readme.txt

    r425427 r539584  
    44Tags: amazon, associate, affiliate, carousel, widget, filter, search, short code, ip2nation, localization, omakase, my favorites, mp3 clips, multi-user, multi-author, product cloud
    55Requires at least: 3.0.0
    6 Tested up to: 3.2.1
     6Tested up to: 3.3.2
    77Stable tag: trunk
    88
     
    2222
    2323This plugin fully supports amazon product localization to supported markets:
    24 Canada (CA), Germany (DE), France (FR), Japan (JP), United Kingdom (GB), and
     24Canada (CA), China (CN), Germany (DE), Spain (ES), France (FR), Italy (IT), Japan (JP), United Kingdom (GB), and
    2525the Unites States (US).<br>
    26 In addition the plugin contains support for link localization of Amazon's
    27 Italy (IT) and China (CN) markets.
    2826
    2927The [WordPress Amazon Associate](http://labs.mdbitz.com/wordpress/wordpress-amazon-associate-plugin/?utm_source=wordpress&utm_medium=plugin-readme&utm_campaign=plugin)
     
    8886insert amazon product links and images through ShortCode, the content editor's
    8987tinyMCE control or the Quick Links Module.
    90 
    91 = Why can't I set Italy or China as my Primary Locale? =
    92 
    93 The WordPress Amazon Associate plugin utilizes the Amazon Product API to lookup
    94 product urls and details from Amazon. At this time both Italy and China locales
    95 are not supported by the API. Once Amazon updates the API to support these locales
    96 you will be able to select these as your primary location. Until then, only the
    97 Link Filter functions for these locales.
    9888
    9989= Does this plugin support Multi-Author websites? =
     
    187177
    188178The full project changelogs can be found at [http://labs.mdbitz.com/wordpress/wordpress-amazon-associate-plugin/changelog](http://labs.mdbitz.com/wordpress/wordpress-amazon-associate-plugin/changelog/?utm_source=wordpress&utm_medium=plugin-readme&utm_campaign=plugin)
     179
     180= 1.8.0 = 05/03/2012 =
     181* Support for Italy (IT) Locale
     182* Support for China (CN) Locale
     183* Support for Spain (ES) Locale
     184* Fix to Omakase Widget Color options
     185* Enhanced Validation to display error if validation fails to assist users with getting WPAA configured and functional
    189186
    190187= 1.7.4 - 08/18/2011 =
  • wordpress-amazon-associate/trunk/servlet/index.php

    r410533 r539584  
    4343                    $result = $api->browseNodeLookup("927726");
    4444                    break;
     45                case "CN":
     46                    $result = $api->browseNodeLookup("658390051");
     47                    break;
    4548                case "DE":
    4649                    $result = $api->browseNodeLookup("541686");
    4750                    break;
     51                case "ES":
     52                    $result = $api->browseNodeLookup("599364031");
     53                    break;
    4854                case "FR":
    4955                    $result = $api->browseNodeLookup("468256");
     56                    break;
     57                case "IT":
     58                    $result = $api->browseNodeLookup("411663031");
    5059                    break;
    5160                case "JP":
  • wordpress-amazon-associate/trunk/wordpress_amazon_associate.php

    r425427 r539584  
    55  Description: Quickly and eaily monetize your webiste through the integration of Amazon products and widgets tagged with your associate id.
    66  Author: MDBitz - Matthew John Denton
    7   Version: 1.7.4
     7  Version: 1.8.0
    88  Requires at least: 3.0.0
    99  Author URI: http://labs.mdbitz.com
     
    4444global $wpaa_version;
    4545global $wpaa_update_date;
    46 $wpaa_version = "1.7.4";
    47 $wpaa_update_date = "08-18-2011";
     46$wpaa_version = "1.8.0";
     47$wpaa_update_date = "05-03-2011";
    4848
    4949// load Admin Class
Note: See TracChangeset for help on using the changeset viewer.