diff --git a/tantan/wordpress-s3/admin-tab-head.html b/tantan/wordpress-s3/admin-tab-head.html
index a171064..8cee77b 100644
--- a/tantan/wordpress-s3/admin-tab-head.html
+++ b/tantan/wordpress-s3/admin-tab-head.html
@@ -9,4 +9,7 @@ addLoadEvent(function () {
}
}
});
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/tantan/wordpress-s3/admin-tab.html b/tantan/wordpress-s3/admin-tab.html
index 809d1a9..b734ed6 100644
--- a/tantan/wordpress-s3/admin-tab.html
+++ b/tantan/wordpress-s3/admin-tab.html
@@ -2,9 +2,9 @@
function print_keys($keys, $level=0) {
echo "
\n";
foreach ($keys as $key => $obj) if ($key{0} != '_') {
- echo '- '.$key."\n";
+ echo '
'.$key."
\n";
- print_keys($obj, $level++);
+ print_keys($obj, $level+1);
echo " \n";
}
@@ -16,16 +16,33 @@ function print_keys($keys, $level=0) {
}
?>
-
-
+
+?>
+
+
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/tantan/wordpress-s3/class-plugin.php b/tantan/wordpress-s3/class-plugin.php
index b82ef3b..cad3e6d 100644
--- a/tantan/wordpress-s3/class-plugin.php
+++ b/tantan/wordpress-s3/class-plugin.php
@@ -112,11 +112,16 @@ class TanTanWordPressS3Plugin {
if (!$this->options['key'] || !$this->options['secret']) {
return;
}
+ $bucket = $this->options['bucket'];
require_once(dirname(__FILE__).'/lib.s3.php');
$s3 = new TanTanS3($this->options['key'], $this->options['secret']);
- $ret = $s3->listKeys($this->options['bucket'], false, urlencode('s3/'), '/');//, false, 's3/', '/');
- print_r($ret);
+
+ $prefix = $_GET['prefix'] ? $_GET['prefix'] : '';
+ //echo urlencode($prefix);
+
+ $ret = $s3->listKeys($bucket, false, urlencode($prefix), '/');//, false, 's3/', '/');
+ //print_r($ret);
$keysList = $ret['keys'];
$prefixes = $ret['prefixes'];
//print_r($keysList);
diff --git a/tantan/wordpress-s3/styles.css b/tantan/wordpress-s3/styles.css
new file mode 100644
index 0000000..e3b14e2
--- /dev/null
+++ b/tantan/wordpress-s3/styles.css
@@ -0,0 +1,58 @@
+.path {
+ padding:5px 0 0 0;
+ margin:0 0 5px 0;
+ font-size:0.9em;
+ background:#eee;
+}
+.path a {
+ border:0;
+ color:black;
+ text-decoration:none;
+}
+.path a:hover {
+ text-decoration:underline;
+}
+.folders ul {
+ list-style:none;
+ margin:0;
+ padding:0;
+
+}
+.folders li {
+ float:left;
+ background:url(folder.gif) no-repeat;
+ padding:0 0 0 20px;
+ margin-right:10px;
+ font-size:0.9em;
+
+}
+.folders li a {
+ color:#555;
+ border:0;
+ text-decoration:none;
+}
+.folders li a:hover {
+ background:#eee;
+}
+
+.files {
+ clear:both;
+}
+.files ul {
+ list-style:none;
+ margin:0;
+ padding:0;
+}
+.files ul li {
+ float:left;
+ width:30%;
+ font-size:0.9em;
+}
+.files ul li a {
+ border:0;
+ text-decoration:underline;
+
+}
+.files ul li a:hover {
+ background:#eee;
+}
\ No newline at end of file