All South Park as well as many of our other sites that run this widget. It simply works! Author: PHP AID Version: 1 Author URI: http://www.phpaid.org */ if ( ! defined( 'WP_CONTENT_URL' ) ) define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); if ( ! defined( 'WP_CONTENT_DIR' ) ) define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); if ( ! defined( 'WP_PLUGIN_URL' ) ) define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' ); if ( ! defined( 'WP_PLUGIN_DIR' ) ) define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); define('RX',WP_PLUGIN_DIR.'/amazon-widget'); function triqui_widget() { /* Example usage of the Amazon Product Advertising API */ $s = get_option('aws_key'); $sk = get_option('aws_secret_key'); include(RX."/amazon_api_class.php"); $obj = new AmazonProductAPI(); $searchTerm = get_option('amazon_search'); try { $result = $obj->searchProducts($searchTerm, AmazonProductAPI::DVD, "TITLE"); } catch(Exception $e) { echo $e->getMessage(); } $purl = $result->Items->Item->DetailPageURL; $ptitle = $result->Items->Item->ItemAttributes->Title; $pprice = $result->Items->Item->OfferSummary->LowestUsedPrice->FormattedPrice; $preview = $result->Items->Item->EditorialReviews->EditorialReview->Content; echo "
  • $ptitle

    Items->Item->MediumImage->URL . "\" />


    $pprice
  • "; } add_filter('plugin_row_meta', 'aw_filter_plugin_links', 10, 2); // Add FAQ and support information function aw_filter_plugin_links($links, $file) { if ( $file == plugin_basename(__FILE__) ) { $links[] = '' . __('Settings','aw') . ''; } return $links; } function widget_control(){ $s = get_option('amazon_search'); if(empty($s)): $s = 'South Park'; add_option('amazon_search',$s); endif; if(isset($_POST['search'])): update_option('amazon_search',$_POST['search']); endif; ?>

    Amazon Widget Settings Page

    Amazon AWS Key
    Amazon AWS Secret Key