aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-06 22:10:23 +0000
committerplegall <plg@piwigo.org>2010-03-06 22:10:23 +0000
commit1c545c601beeeaafacd367d7af2077742c0fcce6 (patch)
tree95ac1513741ea80c6bed3afd6869a1fdd3ec0bed /admin.php
parent97a8ddcfe7c8d3f50b3e577c0915c551e7af12fa (diff)
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
Diffstat (limited to 'admin.php')
-rw-r--r--admin.php25
1 files changed, 25 insertions, 0 deletions
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 |
// +-----------------------------------------------------------------------+