From 42abf4c57664d2596872d437f70b95193f9a5d18 Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 2 Apr 2006 22:26:19 +0000 Subject: 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 --- search.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'search.php') 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() + ), ) ); -- cgit v1.2.3