Where do I find the following so I can change it:
1. The text that says "Search the Gallery".
2. The Search fields. I want to remove "Custom Fields" from the advanced search page.
Thanks!
Gallery version = 2.0 core 1.0.0
PHP version = 4.3.10 cgi
Webserver = Apache/1.3.33 (Unix)
Database = mysql 4.0.25-standard-log
Toolkits = ArchiveUpload, NetPBM, SquareThumb, Thumbnail, Gd
Operating system = Linux infong 2.4 #1 SMP Mon Aug 9 10:21:08 CEST 2004 i686 unknown
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Posts: 565
1. /modules/search/templates/blocks/SearchBlock.tpl
2. unload the Custom Fields module
Posts: 24
Cheers.
I don't want to remove custom fields, I just don't want them searchable.
Posts: 16503
For the custom fields I don't know exactly, but you'll probably need to edit module.inc so it doesn't register itself with the search functionality. I don't know if you'll just need to clear the db and template cache or uninstall and reinstall the module. If you do the uninstall/reinstall you'll lose all of your current custom field data.
For module.inc I was referring to this /modules/customfield/module.inc
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 565
Picky aren't you yolise;~) You didn't say that initially. That solution was the simplest answer to your question.
File: /modules/customfield/classes/CustomFieldSearch.class
You could comment out this area, doesn't show onscreen but doesn't save any search cpu cycles.
/*
$info = array('name' => $module->translate('Custom Fields'),
'description' => $module->translate('Custom Fields Module'),
'options' => array(
'customfield' => array(
'description' => $module->translate('custom '),
'enabled' => 1)));
*/
POSTEDIT: scrub this workaround attempt, I thought I had it working but it's now causing an error.
Posts: 24
I did say 'I want to remove "Custom Fields" from the advanced search page.' which I thought was fairly clear. Apologies if it was not.
Posts: 565
Was nearly right the first time...;~)
File: /modules/customfield/classes/CustomFieldSearch.class
//==========================================================================
// amendment to remove the repetitive word 'search' from the custom box
// and/or spread out the words and/or stop the custom stuff appearing
//==========================================================================
/*
$info = array('name' => $module->translate('Custom Fields'),
'description' => $module->translate('Custom Fields Module'),
'options' => array(
'customfield' => array(
'description' => $module->translate('custom '),
'enabled' => 1)));
*/
return array(GalleryStatus::success(), $info);
}
This workaround works. It's not terribly ergonomic probably but I don't even pretend to be a coder (I'm a photographer).
Posts: 5
Hey there,
I was looking for the answer to this same question myself and I tried the solution above and for some reason it didn't work for me. The page just stayed blank.
So I played with the code and this ended up working for me:
in file:/modules/customfield/classes/CustomFieldSearch.class
find:
And change it to:
That seems to work for me. Hope it does for anyone else out there too.
Wes