Member
Member
SierraBravoFour   2013-07-17, 20:11
#1

I would like to add the Credit field as a searchable element. At first I tried passing a custom array to the printSearchForm function, but that did not have any effect.Ex:
`

$query_fields = array("desc","custom_data","tags","credit");

printSearchForm(NULL,'search',NULL,NULL,NULL,$query_fields,NULL,false);

`

Next, I tried adding it directly to the search_fields option in the DB. No luck there either.

Eventually, I was able to get it to work by adding credit to the search_fields option in the DB and also modifying the search engine construct of the core class-search.php file with the following:
$this->search_structure['credit'] = gettext('Credit');

So my question is, is there a way to add Credit to the list of fields to search without modifying the core search file?

Zenphoto 1.4.4.8
PHP 5.3.15
MySQL 5.1.47
custom theme based on zp_bootstrap

Administrator
Administrator
acrylian   2013-07-17, 20:17
#2

You can enable/disable all fields on Options > Search.

Member
Member
SierraBravoFour   2013-07-17, 21:50
#3

Credit does not appear as a choice in the Fields List under Options > Search.

I see the following: Country, Custom Data, Description, Location/Place, State, Tags, City, Copyright, Date, File/Folder name, Owner, Title

Member
Member
sbillard   2013-07-17, 23:05
#4

What you did is the correct fix. Probably should create an issue so that this gets added to the mainstream. Any other fields you notice missing?

Member
Member
SierraBravoFour   2013-07-18, 14:49
#5

That's the only one I am interested in at the moment. I'll add a post to the feature request forum.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.