Announcement

#1 2014-09-11 11:25:29

mrija
Member
2014-08-12
19

Search by image ID

Hello,

I can ask you if is possible search image/photo by ID (image_id). Quick search or standart search don't find anything if I searching e.g. 74 as ID (from piwigo_images table) of my photo, and I can't find search query in sourcecode.

Thank you for your help or tip how add id atributte to search query

Mira

Piwigo version:  2.6.3
PHP version: 5.4.4
MySQL version: 5.5.37
Piwigo URL: localhost develop

Offline

 

#2 2014-09-11 11:30:49

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

Re: Search by image ID

Hello mrija,

That could be a good option for the new search filter in Batch Manager (Piwigo 2.7). id:123..145.

rvelices, do you agree?

Offline

 

#3 2014-09-11 11:38:15

mrija
Member
2014-08-12
19

Re: Search by image ID

Hello, thank you for your replay, but I would like using search by id as standart user in quick search.
I am using Piwigo as an archive for my photos and each photo is displayed with ID parameter for better clarity and I need to by id was also searched by standart method as tags or name.

Offline

 

#4 2014-09-11 11:41:36

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

Re: Search by image ID

mrija wrote:

Hello, thank you for your replay, but I would like using search by id as standart user in quick search.
I am using Piwigo as an archive for my photos and each photo is displayed with ID parameter for better clarity and I need to by id was also searched by standart method as tags or name.

The syntax for search filter in Batch Manager and the quicksearch is the same.

Offline

 

#5 2014-09-11 11:47:13

mrija
Member
2014-08-12
19

Re: Search by image ID

Thanks for information, Iam looking forward to the new version.

Well done Piwigo Team!

Offline

 

#6 2014-09-11 12:10:38

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Search by image ID

Ok to add id: as a search scope. An easy change:

Code:

in function get_quick_search_results_no_cache:
$scopes[] = new QNumericRangeScope('id', array());

in function qsearch_get_images:
     case 'id':
        $clauses[] = $token->scope->get_sql($scope_id, $token);
        break;

Last edited by rvelices (2014-09-11 12:10:57)

Offline

 

#7 2014-09-11 12:42:28

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

Re: Search by image ID

Offline

 

#8 2014-09-11 14:06:15

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Search by image ID

Maybe also update the help file launched from tje batch manager :)

Offline

 

#9 2014-09-11 14:51:53

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

Re: Search by image ID

rvelices wrote:

Maybe also update the help file launched from tje batch manager :)

[Subversion] r29485

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact