Member
Member
fuzzi   12-05-2015, 15:15
#1

Hi,

i would like to implement a "similar images" feature on my site which works like this:

For each tag of the current picture on image.php, images (number configurable) with the same tag (or the tags name in the filename) are listed below the current image.

Is such a functionality possible with builtin zenphoto functions?

The only workaround which comes into my mind is taking the search.php, passing the tag i want to search for to the $searchwords variable and strip all extra html out of the customized search.php. Afterwards i include the customized search.php on my image.php - and thats it.

I know thats a quite shitty solution - but its a solution

Or can you help me out on how to do that with the functions zenphoto already offers?

Thanks a lot for your help!

Fuzzi

Administrator
Administrator
acrylian   12-05-2015, 16:45
#2

You can also create search queries programmatically ;-) The included related_items plugin does what you describe. You will need to modify your theme to use it.

Member
Member
fuzzi   13-05-2015, 09:33
#3

thanks acrylian, ill try it

Member
Member
fuzzi   14-05-2015, 13:09
#4

ok i got it working, thanks for your help!

it does not exactly what i imagined - i thought of a feature where i can search for one specific tag and just get results for that tag.

If a pic has 5 tags for example, i could display 5 pictures for every tag (25 in total) so if the tags are

blue, red, animal, dog, ship

i could display 5 ship picutures, 5 dog pictures etc - you get the picture.

because i dont know what my user is searching for specifically, i could show them pics for each tag and the user can refine his search this way.

is there a easy way to modify your plugin in a way to do so?

thanks!

Administrator
Administrator
acrylian   14-05-2015, 14:03
#5

The related_items plugin takes the tags of the current item and searches for items with similar tags.

You can of course do a search for a specific tag as well. If it is easy for you to customize the plugin I cannot answer ;-)

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