To be able to compute values of filter "added_by" by only taking into account
results of other filters, we need to distinct results filter by filter. So
instead of generating a single complex SQL query, we use one (or maybe more)
SQL query for each filter in action.
First commit for this new way to perform a regular search. To be improved
(many duplication of codes for now)
add ratings, ratios, filesize, width and height widgets
- in functions_search add clauses according to each new filter
- in ws_functions add new api parameters
- in index.php add queries to get data for filters
- in admin.lang add missing translations for filters
- in css add basic style to work for modus newspaper
- in js add script for new filters
- in tpl combine script + CSS for double slider & jquery Ui. Add slider conf, template for new widgets
TODO
- adapt css to different themes and skins
Introduce an additional SQL query to find image_ids associated to matching tags instead of using directly the list of matching tags.
Same for matching albums.
Also, change the displayed list of matching tags/albums: do not take into account the OR/AND on the search by word. Do as if the search was always OR.
* remove temporary functions ws_gallery_getSearch and ws_gallery_updateSearch
* split get_search_array into sub-functions to use them in web API
* use search_uuid as search_id instead of the numeric search.id : better privacy
* only the creator of the search can update it
* if a visitors tries to open the search of another user, it (the search) gets forked into a new search
* only load list of authors if this filter is active (same for tags, added_by...)
* if the search_rules include album 123 but this album is not available to current user, remove it from search_rules before sending it to template
* First implementation of the new multi-criteria search. It replaces the old search.php form.
* Displays live search criteria above search results. Each change reloads the list of results (displayed as thumbnails).
* New API method pwg.images.filteredSearch.update called in AJAX to live change the filters.
* New kind of filter: added_by
* use configuration setting quick_search_include_sub_albums (default=false) to activate this feature.
* the list of sub-albums is not displayed in the list of album results (to avoid too long lists).
I basically duplicated qsearch_get_tags as qsearch_get_categories and replaced
"tag" by "cat" + obvious changes like table name to query. I also used the
resulting $qsr->cat_iids for merging with other results.
we "simulate" a search by tag, but we still perform a "search by words" AND "search by tags", which lead to different result compared to "word on title OR file OR description OR tags"