Member
Member
ventesites   2015-08-16, 09:22
#1

Hello
I am news to this program, this is really the best gallery software i used.
I just do not understand how to use related_items.
I activated the plugin but how does it work?

I would like to be able to display images in my news pages when the name of this image is mentionned, can it be done wit this extension and how?
Thanks

Pat

Administrator
Administrator
acrylian   2015-08-16, 10:31
#2

Documentation of the plugin is found here:
http://www.zenphoto.org/documentation/plugins/_zp-extensions---related_items.php.html

You have to modify your theme and place the function printRelatedItems() where you want the related items to show. Set the parameters as you need them. As described the plugin prints a list of related items based on the tags assigned to them and the current item.

Quote:I would like to be able to display images in my news pages when the name of this image is mentionned, can it be done wit this extension and how?
No.

Member
Member
ventesites   2015-08-16, 12:27
#3

But how is defined the relationship? beetween what and what?

Administrator
Administrator
acrylian   2015-08-16, 14:00
#4

Quote:As described the plugin prints a list of related items based on the tags assigned to them and the current item.

Member
Member
ventesites   2015-08-16, 17:05
#5

Ok, i still don't get it.... let say i have an image with tag "sunshine" and a news article with same tag.

I see on my news page tags: sunshine

when i click on it brings me to the search page with the picture BUT i would much prefer to have pictures displayed on my news page as thumbnails

On the news page I have :

I tried to replace 'news' by 'images' and it does nothing....

In fact i still don't have any idea what this code is supposed to do... Is there a working example somewhere?

Thanks

Pat

Administrator
Administrator
acrylian   2015-08-16, 17:18
#6

You have not paid attention to the the parameters:
printRelatedItems( 5, 'images', null, null, true, false ); would give you thumbs of images. Take a look here maybe: http://www.zenphoto.org/news/how-to-read-the-zenphoto-functions-guide

The function interally uses a search to get the items. So search must have "tags" and images results enabled. (Options > Search)

A working example although a bit customized you see on our site below every article.

Member
Member
ventesites   2015-08-16, 17:32
#7

Using the code you provide nothing happens, when i look under options->search, there is a menu with boxes to check, mine are :

Description, tags, title

but i see nothing coming close to "images results enabled"....

Member
Member
ventesites   2015-08-16, 17:36
#8

BTW I use zpbase template and I can't find the function "printRelatedItems" in functions.php, should be there, no?

Administrator
Administrator
acrylian   2015-08-16, 18:22
#9

On Options > Search right below the checkboxes you noted there are some radioboxes followed by four checkboxes "Do not return XXX matches". The one for images should not be checked, otherwise you will not get any results on related items.

Quote:BTW I use zpbase template and I can't find the function "printRelatedItems" in functions.php, should be there, no?
Of course not, it is a function of the related_items plugin.

Member
Member
ventesites   2015-08-16, 18:25
#10

None of the 4 options are checked....

Administrator
Administrator
acrylian   2015-08-16, 18:46
#11

Check if your images are published and that you put the function call in the right file. Please see the theming tutorial for the basics: http://www.zenphoto.org/news/theming-tutorial

Member
Member
ventesites   2015-08-16, 19:39
#12

I am using zpbase and i didn't add or remove the code, it was there on news.php

do you think i should had something to the file news.php located in the Zenpage folder?

Member
Member
ventesites   2015-08-16, 19:50
#13

Is it normal behavior that the search page opens when i click on a tag link in the news.php?

Administrator
Administrator
acrylian   2015-08-16, 21:13
#14

Sorry, zpBase is not an official theme so I am not familiar with it.

Yes, clicking on a tag link will get search results.

Member
Member
Ralf   2015-08-22, 15:56
#15

Hi,
as far as i know it is just normal that the search pages opens.
But it should not be opened empty.

If you click on a tag that is named for example *animals' the search page should open and show all results containing the tag 'animals'.

Cheers
Ralf

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