Changeset 539584
- Timestamp:
- 05/03/2012 07:09:20 PM (14 years ago)
- Location:
- wordpress-amazon-associate/trunk
- Files:
-
- 1 added
- 14 edited
-
APaPi/AmazonProduct/Iterator.php (modified) (1 diff)
-
APaPi/AmazonProduct/Locale.php (modified) (5 diffs)
-
APaPi/AmazonProduct/Request.php (modified) (5 diffs)
-
APaPi/AmazonProduct/Result.php (modified) (1 diff)
-
APaPi/changelog.htm (modified) (1 diff)
-
AmazonProduct.php (modified) (1 diff)
-
AmazonWidget/Abstract.php (modified) (1 diff)
-
AmazonWidget/Omakase.php (modified) (1 diff)
-
WPAA.php (modified) (14 diffs)
-
WPAA/CacheHandler.php (modified) (1 diff)
-
WPAA/URIHandler.php (modified) (1 diff)
-
imgs/flag_es.gif (added)
-
readme.txt (modified) (4 diffs)
-
servlet/index.php (modified) (1 diff)
-
wordpress_amazon_associate.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-amazon-associate/trunk/APaPi/AmazonProduct/Iterator.php
r309850 r539584 63 63 public function __construct( $result ) { 64 64 $this->_request = $result->request; // init request object 65 if( is_int( $result->TotalResults) ) {65 if( is_int( intval( $result->TotalResults ) ) ) { 66 66 $this->_total_results = intval($result->TotalResults); // set total item results 67 67 $item_index = ( intval($this->_request->ItemPage) - 1 ) * 10 + 1; -
wordpress-amazon-associate/trunk/APaPi/AmazonProduct/Locale.php
r313769 r539584 39 39 */ 40 40 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" ); 47 50 48 51 /** … … 56 59 57 60 /** 61 * CN 62 */ 63 const CN = "CN"; 64 65 /** 66 * CN 67 */ 68 const CHINA = "CN"; 69 70 /** 58 71 * DE 59 72 */ … … 65 78 66 79 /** 80 * ES 81 */ 82 const ES = "ES"; 83 84 /** 85 * Spain 86 */ 87 const SPAIN = "ES"; 88 89 /** 67 90 * FR 68 91 */ … … 72 95 */ 73 96 const FRANCE = "FR"; 97 98 /** 99 * IT 100 */ 101 const IT = "IT"; 102 103 /** 104 * IT 105 */ 106 const ITALY = "IT"; 74 107 75 108 /** … … 120 153 $locales = array(); 121 154 $locales[self::CA] = "Canada"; 155 $locales[self::CN] = "China"; 122 156 $locales[self::FR] = "France"; 157 $loacles[self::IT] = "Italy"; 123 158 $locales[self::DE] = "Germany"; 124 159 $locales[self::JP] = "Japan"; 160 $locales[self::ES] = "Spain"; 125 161 $locales[self::UK] = "United Kingdom"; 126 162 $locales[self::US] = "United States"; -
wordpress-amazon-associate/trunk/APaPi/AmazonProduct/Request.php
r315217 r539584 1 1 <?php 2 2 /* 3 * copyright (c) 201 0MDBitz - Matthew John Denton - mdbitz.com3 * copyright (c) 2011 MDBitz - Matthew John Denton - mdbitz.com 4 4 * 5 5 * This file is part of AmazonProductAPI. … … 46 46 47 47 /** 48 * host49 */50 private $_host = "ecs.amazonaws.";51 52 /**53 48 * uri 54 49 */ … … 75 70 */ 76 71 public function __construct( ) { 77 $this->set( "Version", "201 0-09-01" );72 $this->set( "Version", "2011-08-01" ); 78 73 $this->set( "Service", "AWSECommerceService" ); 79 74 $this->set( "ItemPage", 1 ); … … 156 151 157 152 // 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; 159 154 $signature = base64_encode(hash_hmac("sha256", $signing_string, $this->_secret_key, True) ); 160 155 $signature = str_replace("%7E", "~", rawurlencode($signature)); … … 169 164 * 170 165 */ 171 public function execute() {166 public function execute( $time = null) { 172 167 // 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 }*/ 175 173 // execute request 176 174 $ch = $this->generateCURL( $this->getUrl( ) ); 177 175 $data = curl_exec( $ch ); 178 176 $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); 180 226 } 181 227 -
wordpress-amazon-associate/trunk/APaPi/AmazonProduct/Result.php
r406922 r539584 149 149 $xmlDoc->loadXML($xml); 150 150 $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 { 152 155 $this->set( "IsValid", "False" ); 153 156 foreach( $x->childNodes as $node ) { -
wordpress-amazon-associate/trunk/APaPi/changelog.htm
r313769 r539584 2 2 <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> 3 3 <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> 4 16 <div class="entry"> 5 17 <h2>Version: <b>1.0.1</b> Released 11-19-2010</h2> -
wordpress-amazon-associate/trunk/AmazonProduct.php
r412894 r539584 113 113 break; 114 114 } 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 } 128 130 } 129 131 $output_str = ''; -
wordpress-amazon-associate/trunk/AmazonWidget/Abstract.php
r353979 r539584 255 255 case "CA": 256 256 case "DE": 257 case "ES": 257 258 case "FR": 258 259 case "JP": -
wordpress-amazon-associate/trunk/AmazonWidget/Omakase.php
r410533 r539584 188 188 "ad_price" => "all", 189 189 "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", 196 196 "locale" => "" 197 197 ); -
wordpress-amazon-associate/trunk/WPAA.php
r421932 r539584 107 107 "FR" => "wp-amazon-associate08-21", 108 108 "IT" => "wp-amazon-associate04-21", 109 "JP" => "wp-amazon-associate-22" 109 "JP" => "wp-amazon-associate-22", 110 "ES" => "wp-amazon-associate07-21" 110 111 ); 111 112 … … 130 131 "UK" => true, 131 132 "CA" => true, 133 "CN" => true, 132 134 "DE" => true, 133 135 "FR" => true, 134 "JP" => true 136 "JP" => true, 137 "IT" => true, 138 "ES" => true 135 139 ); 136 140 … … 147 151 "FR" => 8, 148 152 "IT" => 29, 149 "JP" => 9 153 "JP" => 9, 154 "ES" => 7 // TODO need locale 150 155 ); 151 156 … … 183 188 "AccessKey" => null, 184 189 "SecretKey" => null, 185 "AssociateSupport" => " 0",190 "AssociateSupport" => "1", 186 191 "AdminSupport" => "0", 187 192 "ProductPreview" => false, … … 337 342 */ 338 343 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 } 352 361 } 353 362 } … … 386 395 $result = $api->browseNodeLookup("927726"); 387 396 break; 397 case "CN": 398 $result = $api->browseNodeLookup("658390051"); 399 break; 388 400 case "DE": 389 401 $result = $api->browseNodeLookup("541686"); 390 402 break; 403 case "ES": 404 $result = $api->browseNodeLookup("599364031"); 405 break; 391 406 case "FR": 392 407 $result = $api->browseNodeLookup("468256"); 408 break; 409 case "IT": 410 $result = $api->browseNodeLookup("411663031"); 393 411 break; 394 412 case "JP": … … 437 455 $replacement = "amazon.it"; 438 456 break; 457 case "ES" : 458 $replacement = "amazon.es"; 459 break; 439 460 } 440 461 $new_str = str_replace( 'amazon.com', $replacement, $new_str ); … … 446 467 $new_str = str_replace( 'amazon.cn', $replacement, $new_str ); 447 468 $new_str = str_replace( 'amazon.it', $replacement, $new_str ); 469 $new_str = str_replace( 'amazon.es', $replacement, $new_str ); 448 470 $handle = curl_init($new_str); 449 471 if (false === $handle) { … … 487 509 } else if( strpos( $orig_str, "amazon.it" ) !== false ) { 488 510 $locale = "IT"; 511 } else if( strpos( $orig_str, "amazon.es" ) !== false ) { 512 $locale = "ES"; 489 513 } 490 514 $new_str = ""; … … 780 804 $this->associate_tags['UK'] = $_POST['AssociateTag-UK']; 781 805 } 806 if (isset($_POST['AssociateTag-ES'])) { 807 $this->associate_tags['ES'] = $_POST['AssociateTag-ES']; 808 } 782 809 update_option($this->tags_options_name, $this->associate_tags ); 783 810 … … 827 854 } else { 828 855 $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; 829 861 } 830 862 update_option($this->locales_options_name, $this->enabled_locales ); … … 993 1025 $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') . '" /> <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>'; 994 1026 $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') . '" /> <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') . '" /> <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') . '" /> <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>'; 996 1028 $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') . '" /> <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') . '" /> <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>'; 997 1030 $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') . '" /> <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') . '" /> <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') . '" /> <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>'; 999 1032 $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') . '" /> <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>'; 1000 1033 $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') . '" /> <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>'; … … 1020 1053 $content .= '<tr><td><strong>' . __('Secret Key:','wpaa') . '</strong></td><td>' . $this->textinput("SecretKey", $this->options["SecretKey"]) . '</td></tr>'; 1021 1054 $content .= '<tr><td><input class="button-primary" type="button" name="validate" value="' . __('Validate Credentials','wpaa') . ' »" 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>'; 1022 1056 $content .= '</table>'; 1023 1057 $content .= '<br/><div class="alignright"><input class="button-primary" type="submit" name="submit" value="' . __('Update Settings','wpaa') . ' »" /></div>'; … … 1092 1126 if( data.IsValid == "True" ) { 1093 1127 jQuery( "#accessMessage" ).html( '<span style="color:green;" >Valid</span>' ); 1128 jQuery( "#accessError" ).hide(); 1094 1129 } 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(); 1095 1131 jQuery( "#accessMessage" ).html( '<span style="color:red;" >InValid</span>' ); 1096 1132 } -
wordpress-amazon-associate/trunk/WPAA/CacheHandler.php
r412894 r539584 144 144 if( !$obj->isSuccess() && $locale != $wpaa->getLocale() ) { 145 145 return $this->getProductByAPI( $id, $wpaa->getLocale(), $type, $responseGroup ); 146 } else { 147 return $obj; 146 148 } 147 149 } -
wordpress-amazon-associate/trunk/WPAA/URIHandler.php
r410533 r539584 51 51 return "http://rcm-de.amazon.de/e/cm"; 52 52 break; 53 case "ES": 54 return "http://rcm-es.amazon.es/e/cm"; 55 break; 53 56 case "FR": 54 57 return "http://rcm-fr.amazon.fr/e/cm"; -
wordpress-amazon-associate/trunk/readme.txt
r425427 r539584 4 4 Tags: amazon, associate, affiliate, carousel, widget, filter, search, short code, ip2nation, localization, omakase, my favorites, mp3 clips, multi-user, multi-author, product cloud 5 5 Requires at least: 3.0.0 6 Tested up to: 3. 2.16 Tested up to: 3.3.2 7 7 Stable tag: trunk 8 8 … … 22 22 23 23 This plugin fully supports amazon product localization to supported markets: 24 Canada (CA), Germany (DE), France (FR), Japan (JP), United Kingdom (GB), and24 Canada (CA), China (CN), Germany (DE), Spain (ES), France (FR), Italy (IT), Japan (JP), United Kingdom (GB), and 25 25 the Unites States (US).<br> 26 In addition the plugin contains support for link localization of Amazon's27 Italy (IT) and China (CN) markets.28 26 29 27 The [WordPress Amazon Associate](http://labs.mdbitz.com/wordpress/wordpress-amazon-associate-plugin/?utm_source=wordpress&utm_medium=plugin-readme&utm_campaign=plugin) … … 88 86 insert amazon product links and images through ShortCode, the content editor's 89 87 tinyMCE 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 lookup94 product urls and details from Amazon. At this time both Italy and China locales95 are not supported by the API. Once Amazon updates the API to support these locales96 you will be able to select these as your primary location. Until then, only the97 Link Filter functions for these locales.98 88 99 89 = Does this plugin support Multi-Author websites? = … … 187 177 188 178 The 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 189 186 190 187 = 1.7.4 - 08/18/2011 = -
wordpress-amazon-associate/trunk/servlet/index.php
r410533 r539584 43 43 $result = $api->browseNodeLookup("927726"); 44 44 break; 45 case "CN": 46 $result = $api->browseNodeLookup("658390051"); 47 break; 45 48 case "DE": 46 49 $result = $api->browseNodeLookup("541686"); 47 50 break; 51 case "ES": 52 $result = $api->browseNodeLookup("599364031"); 53 break; 48 54 case "FR": 49 55 $result = $api->browseNodeLookup("468256"); 56 break; 57 case "IT": 58 $result = $api->browseNodeLookup("411663031"); 50 59 break; 51 60 case "JP": -
wordpress-amazon-associate/trunk/wordpress_amazon_associate.php
r425427 r539584 5 5 Description: Quickly and eaily monetize your webiste through the integration of Amazon products and widgets tagged with your associate id. 6 6 Author: MDBitz - Matthew John Denton 7 Version: 1. 7.47 Version: 1.8.0 8 8 Requires at least: 3.0.0 9 9 Author URI: http://labs.mdbitz.com … … 44 44 global $wpaa_version; 45 45 global $wpaa_update_date; 46 $wpaa_version = "1. 7.4";47 $wpaa_update_date = "0 8-18-2011";46 $wpaa_version = "1.8.0"; 47 $wpaa_update_date = "05-03-2011"; 48 48 49 49 // load Admin Class
Note: See TracChangeset
for help on using the changeset viewer.