From ccff9ce8d8a2818699ce4e20a310986fc95ea022 Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Sun, 18 Mar 2012 14:08:31 +0100 Subject: Added a way of classifying images in folders. --- tpl/general/inc_form.php | 8 ++++++++ tpl/image/folder.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ tpl/image/index.php | 26 +++++++++++++++++++----- 3 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 tpl/image/folder.php (limited to 'tpl') diff --git a/tpl/general/inc_form.php b/tpl/general/inc_form.php index 8cd2ad5..24e4a49 100644 --- a/tpl/general/inc_form.php +++ b/tpl/general/inc_form.php @@ -13,6 +13,14 @@ foreach($fields as $f) { if (isset($f['type']) && $f['type'] == 'textarea') { echo '
'; echo '
'; + } else if (isset($f['type']) && $f['type'] == 'select') { + echo ''; + echo '
'; } else { ?> diff --git a/tpl/image/folder.php b/tpl/image/folder.php new file mode 100644 index 0000000..5d5e57b --- /dev/null +++ b/tpl/image/folder.php @@ -0,0 +1,52 @@ +edit folder info | '; + echo 'delete folder'; +} + +echo $fld['comment_html']; + +if (count($images) == 0) { + echo '
This folder has no images.
'; +} else { + echo ''; + echo ''; + foreach ($images as $img) { + $min = $baseurl . $img['id'] . "-min." . $img['extension']; + $imgf = $baseurl . $img['id'] . "." . $img['extension']; + echo ''; + echo ''; + echo ''; + } + echo '
PreviewInfoDate
' . $img['name'] . ''; + echo '
' . $img['comment_html'] . '
'; + /*echo 'Miniature: ' . $min . '
'; + echo 'Image: ' . $imgf . '
'; */ + echo '
' . $img['upl_date'] . '
'; + if ($can_edit) echo '
delete'; + if ($can_edit) echo '
edit info'; + echo '
'; +} + +echo '
'; +if ($is_owner) { + echo '

Your folders

'; +} else { + echo '

' . $fld["ownername"] . "'s folders

"; +} +echo ''; + +require("tpl/general/bottom.php"); diff --git a/tpl/image/index.php b/tpl/image/index.php index 4f9db8e..a89d024 100644 --- a/tpl/image/index.php +++ b/tpl/image/index.php @@ -11,13 +11,18 @@ if (count($images) == 0) { $min = $baseurl . $img['id'] . "-min." . $img['extension']; $imgf = $baseurl . $img['id'] . "." . $img['extension']; echo ''; - echo '' . $img['name'] . '

'; - echo 'Miniature: ' . $min . '
'; - echo 'Image: ' . $imgf . '
'; - echo 'Markdown: !['.$img['name'].']('.$imgf.')'; + echo '' . $img['name'] . ''; + if ($img['folder_id'] != 0) { + echo ' (in folder: ' . $img['folder_name'] . ')'; + } + echo '
MD: !['.$img['name'].']('.$imgf.')'; + echo '
' . $img['comment_html'] . '
'; + /*echo 'Miniature: ' . $min . '
'; + echo 'Image: ' . $imgf . '
'; */ + echo ''; echo '' . $img['upl_date'] . '
'; if ($can_delete) echo '
delete'; - if ($can_rename) echo '
rename'; + if ($can_rename) echo '
edit info'; echo ''; } echo ''; @@ -33,6 +38,17 @@ A px preview will be created.

Title :

+ +

+

Your folders

+