From 1c545c601beeeaafacd367d7af2077742c0fcce6 Mon Sep 17 00:00:00 2001 From: plegall Date: Sat, 6 Mar 2010 22:10:23 +0000 Subject: feature 724: improved "add tags" form. Instead of a big list of checkboxes, displays a dynamic list of tags with jQuery, with suggestions based on existing tags and the ability to create new tags on the fly. The change was applied only on admin/picture_modify.php for test purpose. Note : FCBKcomplete 2.7 had a bug on "remote tag" click, and the bug was fixed on 2.7.1. But the suggestions were not working with 2.7.1. So I took the 2.7 and applied the tiny change to make the "remove tag" click work. git-svn-id: http://piwigo.org/svn/trunk@5067 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'admin.php') diff --git a/admin.php b/admin.php index bc69f7321..d2ed70747 100644 --- a/admin.php +++ b/admin.php @@ -34,6 +34,31 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php'); // +-----------------------------------------------------------------------+ check_status(ACCESS_ADMINISTRATOR); +// tags +if (isset($_GET['fckb_tags'])) +{ + $query = ' +SELECT + id, + name + FROM '.TAGS_TABLE.' +;'; + $result = pwg_query($query); + $taglist = array(); + while ($row = pwg_db_fetch_assoc($result)) + { + array_push( + $taglist, + array( + 'caption' => $row['name'], + 'value' => '~~'.$row['id'].'~~', + ) + ); + } + echo json_encode($taglist); + exit(); +} + // +-----------------------------------------------------------------------+ // | synchronize user informations | // +-----------------------------------------------------------------------+ -- cgit v1.2.3