Hi everyone!
What I'm trying to do is create more fields which displays information about the album and so people can search a specific thing. For example, Colour, Size, Height.
What I'm doing is trying to make a clone of the pre-existing "Location" field because I want these other fields (colour, size, etc) to work in exactly the same manner.
I've edited a few of the files:
album.php (where I want my text to feature) - I've got this part correct.
admin-functions.php
admin-edit.php
template-functions.php
class-search.php
However, I'm getting the error when I try and insert the decription in gallery/zp-core/admin-edit.php:
Fatal error: Call to undefined method Album::getColourOption() in /home/abc/public_html/gallery/zp-core/admin-functions.php on line 1352
Line 1352 is:
<?php print_language_string_list($album->getColourOption(''), $prefix."colour_option", true, NULL, 'hint','100%'); ?>
Not sure if I need to provide more information than that? If so, just let me know.
Any advice welcome.
Thanks!
Comments
`getColourOption()` is not a an existing class method or function so naturally you get that error.
The built in search is a one field one as generally and you can set via the search options what fields it should cover.
Thanks for getting back to me. Fair enough, I'll try and do it a different way... probably via a plugin. My PHP knowledge is fairly limited though.
So, I've tried to do a bit of reading about this. Will the filter-custom_data plugin do what I'm wanting to do?
Really what I want is different aspects of the photo to be displayed using text, which I'd input myself.
But, I want to do it when I'm in admin-edit.php. So, I'll have:
Colour: *Red*
Size: *Large*
Where the starred words are fields I'd input into. I also want these to be searchable, similar to if you input a name into the "Location" field, you can search for it. None of what I want to input is metadata.
Hopefully that makes sense. I'd like to edit something existing if possible.
Thanks again!