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
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.
But how is defined the relationship? beetween what and what?
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
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.
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"....
BTW I use zpbase template and I can't find the function "printRelatedItems" in functions.php, should be there, no?
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.
None of the 4 options are checked....
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
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?
Is it normal behavior that the search page opens when i click on a tag link in the news.php?