Changeset 5067 for trunk/admin.php


Ignore:
Timestamp:
Mar 6, 2010, 11:10:23 PM (14 years ago)
Author:
plg
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r5014 r5067  
    3434// +-----------------------------------------------------------------------+
    3535check_status(ACCESS_ADMINISTRATOR);
     36
     37// tags
     38if (isset($_GET['fckb_tags']))
     39{
     40  $query = '
     41SELECT
     42    id,
     43    name
     44  FROM '.TAGS_TABLE.'
     45;';
     46  $result = pwg_query($query);
     47  $taglist = array();
     48  while ($row = pwg_db_fetch_assoc($result))
     49  {
     50    array_push(
     51      $taglist,
     52      array(
     53        'caption' => $row['name'],
     54        'value' => '~~'.$row['id'].'~~',
     55        )
     56      );
     57  }
     58  echo json_encode($taglist);
     59  exit();
     60}
    3661
    3762// +-----------------------------------------------------------------------+
Note: See TracChangeset for help on using the changeset viewer.