updated usage instructions, and hide secret key

This commit is contained in:
Kenneth Reitz
2007-07-05 22:22:36 +00:00
parent 6b461a8733
commit 19772dfd2e
2 changed files with 15 additions and 3 deletions
+9 -3
View File
@@ -41,11 +41,16 @@ if (is_object($TanTanVersionCheck)):?>
<?php endif;?>
<p>
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.
</p>
<p><strong>Installation and Usage:</strong> Just follow the onscreen prompts to link this plugin to your Amazon S3 account.
<p><strong>Amazon S3 Setup:</strong> If you don't have an Amazon S3 account yet, here's a <a href="http://www.brightcove.com/title.jsp?title=769277068&channel=770166766">quick video tutorial</a> that'll show
you how to set one up. <a href="http://www.amazon.com/s3/">Sign up for Amazon S3 &gt;</a>
</p>
<p><strong>Plugin Installation and Usage:</strong> 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. </p>
<div style="float:right;width:250px;background:#eee;padding:10px;font-size:0.9em;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
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
</tr>
<tr valign="top">
<th width="33%" scope="row">Secret Key:</th>
<td><input type="text" name="options[secret]" value="<?php echo $options['secret'];?>" size="50" /></td>
<td><input type="text" name="options[secret]" value="<?php echo ($options['secret'] ? '-- not shown --' : '');?>" size="50" /><br />
<small><a href="http://aws-portal.amazon.com/gp/aws/developer/account/index.html/?ie=UTF8&action=access-key">Login to Amazon.com to retrieve your Secret Key &gt;</a></small></td>
</tr>
<?php if (!$buckets):?>
<tr valign="top">
+6
View File
@@ -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']) {