From 19772dfd2ebdd22c83db20b35eeb4d346ece1c04 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 5 Jul 2007 22:22:36 +0000 Subject: [PATCH] updated usage instructions, and hide secret key --- tantan/wordpress-s3/admin-options.html | 12 +++++++++--- tantan/wordpress-s3/class-plugin.php | 6 ++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tantan/wordpress-s3/admin-options.html b/tantan/wordpress-s3/admin-options.html index df8ba3a..a94897f 100644 --- a/tantan/wordpress-s3/admin-options.html +++ b/tantan/wordpress-s3/admin-options.html @@ -41,11 +41,16 @@ if (is_object($TanTanVersionCheck)):?>

-This plugin allows you to easily use objects stored on Amazon's S3 web service. +This plugin allows you to easily retrieve and link to files stored on Amazon's S3 web service from within WordPress.

-

Installation and Usage: Just follow the onscreen prompts to link this plugin to your Amazon S3 account. +

Amazon S3 Setup: If you don't have an Amazon S3 account yet, here's a quick video tutorial that'll show +you how to set one up. Sign up for Amazon S3 > +

+ +

Plugin Installation and Usage: Just follow the onscreen prompts to link this plugin to your Amazon S3 account. Once your account is linked, you will see an "Amazon S3" tag in your edit screen.

+
If you find this plugin helpful, please consider donating a few dollars to support this plugin. Thanks! @@ -89,7 +94,8 @@ You can check the following pages for the latest updates to this plugin, along w Secret Key: - +
+Login to Amazon.com to retrieve your Secret Key > diff --git a/tantan/wordpress-s3/class-plugin.php b/tantan/wordpress-s3/class-plugin.php index 64971cc..3205725 100644 --- a/tantan/wordpress-s3/class-plugin.php +++ b/tantan/wordpress-s3/class-plugin.php @@ -47,9 +47,15 @@ class TanTanWordPressS3Plugin { function admin() { if ($_POST['action'] == 'save') { if (!is_array($_POST['options'])) $_POST['options'] = array(); + $options = get_option('tantan_wordpress_s3'); + $_POST['options']['key'] = trim($_POST['options']['key']); $_POST['options']['secret'] = trim($_POST['options']['secret']); + if (ereg('not shown', $_POST['options']['secret'])) { + $_POST['options']['secret'] = $options['secret']; + } + update_option('tantan_wordpress_s3', $_POST['options']); if ($_POST['options']['bucket']) {