how to use?

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

Comments

  • acrylian Administrator, Developer
    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.
    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?
  • acrylian Administrator, Developer
    As described the plugin prints a list of related items based on the tags assigned to them and the current item.

  • 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 :
    <?php if (function_exists('printRelatedItems')) { ?><div class="block"><?php printRelatedItems(5,'news',null,null,'news'); ?></div>

    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
  • acrylian Administrator, Developer
    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?
  • acrylian Administrator, Developer
    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.
    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....
  • acrylian Administrator, Developer
    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?
  • acrylian Administrator, Developer
    Sorry, zpBase is not an official theme so I am not familiar with it.

    Yes, clicking on a tag link will get search results.
  • Ralf Member
    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
Sign In or Register to comment.