Changeset 2723793
- Timestamp:
- 05/14/2022 04:54:22 PM (4 years ago)
- Location:
- widgets-for-amazon/trunk
- Files:
-
- 7 edited
-
. (modified) (1 prop)
-
CHANGELOG.md (modified) (1 diff)
-
README.md (modified) (1 diff)
-
css/amazon-search.css (modified) (2 diffs)
-
includes/Plugin.php (modified) (3 diffs)
-
js/amazon-search.js (modified) (8 diffs)
-
widgets-for-amazon.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
widgets-for-amazon/trunk
- Property svn:ignore
-
old new 7 7 TODO.txt 8 8 *.zip 9 OldAmazonWidgets
-
- Property svn:ignore
-
widgets-for-amazon/trunk/CHANGELOG.md
r2723425 r2723793 1 1 # Changelog 2 3 #### 1.0.7 - 2022-05-14 4 5 - Added mandatory Amazon note. 2 6 3 7 #### 1.0.5 - 2022-05-13 -
widgets-for-amazon/trunk/README.md
r2723425 r2723793 6 6 Requires PHP: 7.0 7 7 Tested up to: 5.9 8 Stable tag: 1.0. 58 Stable tag: 1.0.7 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html -
widgets-for-amazon/trunk/css/amazon-search.css
r2722456 r2723793 6 6 border-top-right-radius: 4px; 7 7 overflow: hidden; 8 margin-bottom: 0; 8 9 } 9 10 … … 155 156 overflow: hidden; 156 157 } 158 159 .amazon-search .footer 160 { 161 font-size: 8pt; 162 font-family: Arial, sans-serif; 163 color: gray; 164 text-align: center; 165 padding-top: 0; 166 } -
widgets-for-amazon/trunk/includes/Plugin.php
r2723425 r2723793 146 146 $base_url = $base_url_europe_west_1; 147 147 148 $url = $base_url . '? Version=' . $plugin_version . '&Tag=' . $affiliateTag;148 $url = $base_url . '?Source=WP&Version=' . $plugin_version . '&Tag=' . $affiliateTag; 149 149 if ($domain_code) 150 150 $url .= '&DomainCode=' . $domain_code; … … 154 154 $url .= '&Category=' . $category; 155 155 156 /** @noinspection SpellCheckingInspection */ 157 $footerMessage = $language == 'de' 158 ? 'Als Amazon-Partner verdienen wir an qualifizierten Verkäufen.' 159 : 'As an Amazon Associate we earn from qualifying purchases.'; 160 156 161 //Tools::log_debug('URL: ' . $url); 157 162 158 $output = 'eggnstone_widgets_fill_amazon_search_box("__INDEX__", "__URL__", "__KEYWORDS__" );' . "\n";163 $output = 'eggnstone_widgets_fill_amazon_search_box("__INDEX__", "__URL__", "__KEYWORDS__", "' . $footerMessage . '");' . "\n"; 159 164 160 165 $output = str_replace('__URL__', $url, $output); … … 185 190 { 186 191 // Add common CSS 187 wp_enqueue_style('WidgetsForAmazonFontAwesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');188 192 wp_enqueue_style('WidgetsForAmazonSB', 189 193 plugin_dir_url(__DIR__) . 'css/amazon-search.css', -
widgets-for-amazon/trunk/js/amazon-search.js
r2723425 r2723793 1 function eggnstone_widgets_fill_amazon_search_box_for_search_forms(index, url, keywords )1 function eggnstone_widgets_fill_amazon_search_box_for_search_forms(index, url, keywords, footerMessage) 2 2 { 3 3 const element = document.getElementById("amazon-search-" + index); … … 6 6 return; 7 7 8 eggnstone_widgets_fill_amazon_search_box(index, url, keywords );8 eggnstone_widgets_fill_amazon_search_box(index, url, keywords, footerMessage); 9 9 } 10 10 11 function eggnstone_widgets_fill_amazon_search_box(index, url, keywords )11 function eggnstone_widgets_fill_amazon_search_box(index, url, keywords, footerMessage) 12 12 { 13 13 const element = document.getElementById("amazon-search-" + index); … … 25 25 const items = parsedJson["Items"]; 26 26 if (!items || items.length === 0) 27 element.innerHTML = eggnstone_widgets_create_search_box_table_with_message(index, url, keywords, "Nothing found." );27 element.innerHTML = eggnstone_widgets_create_search_box_table_with_message(index, url, keywords, "Nothing found.", footerMessage); 28 28 else 29 element.innerHTML = eggnstone_widgets_create_search_box_table_with_result(index, url, keywords, items, maxTitleWidth );29 element.innerHTML = eggnstone_widgets_create_search_box_table_with_result(index, url, keywords, items, maxTitleWidth, footerMessage); 30 30 } 31 31 else 32 element.innerHTML = eggnstone_widgets_create_search_box_table_with_message(index, url, keywords, "Nothing found." );32 element.innerHTML = eggnstone_widgets_create_search_box_table_with_message(index, url, keywords, "Nothing found.", footerMessage); 33 33 }); 34 34 35 element.innerHTML = eggnstone_widgets_create_search_box_table_with_message(index, url, keywords, "Loading ..." );35 element.innerHTML = eggnstone_widgets_create_search_box_table_with_message(index, url, keywords, "Loading ...", footerMessage); 36 36 37 37 req.send(null); … … 55 55 } 56 56 57 function eggnstone_widgets_create_search_box_table_with_message(index, url, keywords, message )57 function eggnstone_widgets_create_search_box_table_with_message(index, url, keywords, message, footerMessage) 58 58 { 59 59 let html = eggnstone_widgets_create_search_box_table_start(index, url, keywords); … … 68 68 "</tr>"; 69 69 70 html += eggnstone_widgets_create_search_box_table_end( );70 html += eggnstone_widgets_create_search_box_table_end(footerMessage); 71 71 72 72 return html; 73 73 } 74 74 75 function eggnstone_widgets_create_search_box_table_with_result(index, url, keywords, items, maxTitleWidth )75 function eggnstone_widgets_create_search_box_table_with_result(index, url, keywords, items, maxTitleWidth, footerMessage) 76 76 { 77 77 let html = eggnstone_widgets_create_search_box_table_start(index, url, keywords); … … 120 120 } 121 121 122 html += eggnstone_widgets_create_search_box_table_end( );122 html += eggnstone_widgets_create_search_box_table_end(footerMessage); 123 123 124 124 return html; … … 140 140 " <td class='right-cell'>" + 141 141 " <button onclick='eggnstone_widgets_on_search_button_click(" + index + ", \"" + url + "\");'/>" + 142 " < i class='fa fa-search'></i>" +142 " <svg width='12' height='12' http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z' style='fill:#ffffff'/></svg>" + 143 143 " </button>" + 144 144 " </td>" + … … 149 149 } 150 150 151 function eggnstone_widgets_create_search_box_table_end( )151 function eggnstone_widgets_create_search_box_table_end(footerMessage) 152 152 { 153 return "</table>"; 153 return "</table>" + '<div class="footer">' + footerMessage + "</div>"; 154 154 155 } 155 156 -
widgets-for-amazon/trunk/widgets-for-amazon.php
r2723425 r2723793 3 3 /** 4 4 * Plugin Name: Widgets for Amazon 5 * Plugin URI: https:// eggnstone.dev/wordpress/plugins/widgets-for-amazon5 * Plugin URI: https://blog.eggnstone.com/wordpress/widgets-for-amazon-for-wordpress 6 6 * Description: Widgets for Amazon by eggnstone 7 * Version: 1.0. 57 * Version: 1.0.7 8 8 * Author: eggnstone 9 * Author URI: https://eggnstone. dev9 * Author URI: https://eggnstone.com 10 10 */ 11 11
Note: See TracChangeset
for help on using the changeset viewer.