aboutsummaryrefslogtreecommitdiffstats
path: root/search.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-04-02 22:26:19 +0000
committerplegall <plg@piwigo.org>2006-04-02 22:26:19 +0000
commit42abf4c57664d2596872d437f70b95193f9a5d18 (patch)
treea1262b8601d5ac5b04b5b2e71af52c453712b9df /search.php
parent68ed2ea617ede199a0e2f15fdd4886095ae600cb (diff)
improvement: tags replace keywords. Better data model, less
limitations. Each image can be associated to as many tag as needed. Tags can contain non ASCII characters. Oriented navigation with tags by association. git-svn-id: http://piwigo.org/svn/trunk@1119 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'search.php')
-rw-r--r--search.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/search.php b/search.php
index 09131320e..2d6ce0c8f 100644
--- a/search.php
+++ b/search.php
@@ -65,6 +65,14 @@ if (isset($_POST['submit']))
);
}
+ if (isset($_POST['tags']))
+ {
+ $search['fields']['tags'] = array(
+ 'words' => $_POST['tags'],
+ 'mode' => $_POST['tag_mode'],
+ );
+ }
+
if ($_POST['search_author'])
{
$search['fields']['author'] = array(
@@ -200,6 +208,16 @@ $template->assign_vars(array(
'S_SEARCH_ACTION' => 'search.php',
'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=search',
'U_HOME' => make_index_url(),
+
+ 'TAG_SELECTION' => get_html_tag_selection(
+ get_available_tags(
+ isset($user['forbidden_categories'])
+ ? explode(',', $user['forbidden_categories'])
+ : null
+ ),
+ 'tags',
+ isset($_POST['tags']) ? $_POST['tags'] : array()
+ ),
)
);