•  » Engine
  •  » Replace FCBKcomplete

#1 2011-05-14 00:32:38

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Replace FCBKcomplete

It turns out that this jQuery plugin is very buggy, hence the idea to look for another

here are the ones I found, having similar functions:
http://code.drewwilson.com/entry/autosu … ery-plugin
http://wharsojo.wordpress.com/2008/02/1 … ocomplete/
http://loopj.com/jquery-tokeninput/

all only work on "input text",so we need to replace all "select" boxes

I began to see how to use AutoSuggest, very easy to use, set up in 5 minutes on page picture_modify except taht ..... it does not allow to add new values​​: (
I left a comment on the site but I'm afraid to wait long before the dev adds the function

and I will test more tomorrow ^ ^

Last edited by mistic100 (2011-05-14 00:33:15)

Offline

 

#2 2011-05-14 00:39:27

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14045

Re: Replace FCBKcomplete

I would start with jquery-tokeninput : it is the most recent and probably the most "up to date".

In fact concerning replacing FCBKcomplete, I would like to have a better ergonomy, like what I've described on [Forum, post 112013 by plg in topic 15260] Improving the "add tags to photo" form, but replacing FCBKcomplete has a bigger priority because as you said, it is currently buggy.

Offline

 

#3 2011-05-14 18:42:50

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Replace FCBKcomplete

With Tokeninput the search is not done by the client but by the server, so we must modify the function that returns tags
not hard but it must be said ^^

edit : I've made this request in order to have tags sorted by relevance

Code:

SELECT
    id AS tag_id,
    name AS tag_name
  FROM '.TAGS_TABLE.'
  WHERE name LIKE "%'.$s.'%"
  ORDER BY
    (
      CASE WHEN name = "'.$s.'" THEN 1 ELSE 0 END + 
      CASE WHEN name LIKE "'.$s.'%" THEN 1 ELSE 0 END
    ) DESC,
    name ASC
;

but don't know if it works on pgsql, pdo-sqlite or sqlite

Last edited by mistic100 (2011-05-14 19:14:05)

Offline

 

#4 2011-05-14 21:26:12

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Replace FCBKcomplete

damn ! the stable version of Tokeninput neither allows to create new tags

but one of the forks does https://github.com/gr2m/jquery-tokeninput

Last edited by mistic100 (2011-05-14 21:27:54)

Offline

 

#5 2011-05-14 22:15:44

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14045

Re: Replace FCBKcomplete

mistic100 wrote:

With Tokeninput the search is not done by the client but by the server, so we must modify the function that returns tags

that's a bad news :-/ it means a new client -> server (many SQL requests) -> client cycle for each new key your press on the keyboard :-/

mistic100 wrote:

but don't know if it works on pgsql, pdo-sqlite or sqlite

I'm 94.6% sure it won't work "as is" for PostgreSQL/SQLite :-/

Offline

 

#6 2011-05-14 23:33:39

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14045

Re: Replace FCBKcomplete

I you find that and if it works without bugs encountered with FCBKComplete it would be a very good workaround before implementing a better user interface for filling tags.

Offline

 

#7 2011-05-14 23:59:08

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Replace FCBKcomplete

plg wrote:

mistic100 wrote:

With Tokeninput the search is not done by the client but by the server, so we must modify the function that returns tags

that's a bad news :-/ it means a new client -> server (many SQL requests) -> client cycle for each new key your press on the keyboard :-/

I made a mistake here, we CAN do a local search, but the json array must be included in the html page
bad for galleries with many tags

Offline

 

#8 2011-05-15 00:17:46

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Replace FCBKcomplete

Bypassed using the getJSON function of jQuery and give the result as parameter for TokenInput

Offline

 

#9 2011-05-15 00:57:10

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Replace FCBKcomplete

it's endless....

TokenInput prefill the input with a json object, not with the content of the input
not a problem on pages with a single input but on batch_manager_unit I don't knox hox to proceed

Offline

 

#10 2011-05-25 11:15:43

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14045

Re: Replace FCBKcomplete

We have made some tests on trunk with P@t. We have seen a very long time to load the page, because TokenInput was waiting for the list of tags, loaded from an Ajax request.

Considering that the Ajax request is always performed, there was no need to make it as an Ajax request (which was generating much more SQL queries on Piwigo side) and P@t as embedded the list of tags in the page source code instead. Now it's much faster.

Offline

 

#11 2011-05-28 19:39:56

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Replace FCBKcomplete

That was a very good idea to remove FCBK, my antivir always spot it as a malware, certainly a false-positive but that proves that there is a problem ^^

Offline

 
  •  » Engine
  •  » Replace FCBKcomplete

Board footer

Powered by FluxBB

github linkedin newsletter Piwigo.org © 2002-2026 · Contact