Limiting the number of search results

I created a dynamic album to show all the latest additions to the gallery. For now this means this album contains all 1500 images. How can I limit the number of this dynamic album to about fifty images? Is there a way to do this by changing something in:
words=jpg&searchfields=8

Comments

  • acrylian Administrator, Developer
    I don't think it is possible to limit the results without extra coding.
  • Then I hope this option will make it into the code ;), because at the moment I don't see any other way to show my latest additions to the gallery.
  • acrylian Administrator, Developer
    Free free to open a ticket then we might consider it sometime.

    You know about the image_album_statistics plugin? Of course not the same as an dynamic album...
  • dear acrylian, I'm now exploring and still deciding giving it a try to zenphoto against another mature evolved gallery. I must say I like what I see here, but a friend of mine argues on some key features he isn't able to point to in zenphoto. Nice to notice the dynamic albums, this was one of his base arguments in his favor.
    I personally think dynamics deserve an important stress in zenphoto's development, especially SEO wise (note that I'm not a SEO expert, just trying to figure it out).
    Here's a question I have: why would I need ".alb" suffix for dynamic albums? If possible point me a little more to where it could be dropped if optional.
    I would be interested in developing a module in regards to dynamic (albums, images, etc.) but yet I don't fully understand what in implies.
    Worth mentioning: you guys, all involved, have made a tremendous and nice work, thanks for it.
  • Why do you care about the suffix? You can change the title to whatever you want. (In fact, the title will not have the .alb in it by default.) Anyway, remember that Zenphoto is file system based, so it scans the file system for objects it knows how to handle. For images this is ones with the typical image suffix (.jpg, .png, etc.) for albums it is .alb.
  • jackdaw:

    You are free to make a theme that does not show all the images in an album (or search) if you wish. Seems a peculiar thing to do to me, though. Why have you set your search to return so many images in the first place?
  • acrylian Administrator, Developer
    Recommended read about how Zenphoto works regarding images and albums (the diagram especially) :http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#22

    To be specific. the ' .alb' is needed to tell the difference between a "real" album and a dynamic one.
  • sbillard:

    You ask me 'Why have you set your search to return so many images in the first place?'
    How can I set my search to return less than all images? That would solve my problem!
    Do I have to add a specific parameter to the function printSearchForm('')?

    As I said before, I'm trying to make a dynamic album that shows all my latest additions. The only way to do this, as far as I know, is to perform a search on the letters 'jpg'.
  • acrylian Administrator, Developer
    You could of course manually check the loop and stop it. But I don't think there is a parameter.

    Again, would be the lastest images function enough? You could even make a separate page using this. Of course that is not a real album and there is now pagination.

    Additionally you could use Zenpage and use the CombiNews mode with latest images. Also not really the same as an album but maybe alternatives.
  • I don't know. How do you determine which are the "latest additions"? If you search for filenames containging "jpg" you will, of course, get your whole gallery in no particular order.
  • sbillard:

    I can change the order afterwards, after the dynamic album has been created through the search for 'jpg'.

    acrylian:

    I'm sorry, but I don't know how to use the printLatestImages function on a seperate/new page. I tried to make a 'latest.php' page and link to that directly, but that gives me all kind of php warnings. Could you give me some directions?
  • acrylian Administrator, Developer
    Using it is quite easy. Create a custom theme page named`latest.php` as you did, enable the plugin and put `printLatestImages` where you want it.

    You can access the custom page by `zenphoto/page/latest`. That's all on our theming tutorial...;-)

    You could also use the function within a zenpage page's codeblock (the theme pages.php needs support for the codeblock).
  • OK, thanks for the explanation :)

    This could work for me, except that the thumbs would link to the larger image inside the actual album. From there visitors can not use the next en previous images to browse through those latest additions because they are within 'another' album.

    Ik will try this anyhow. Thanks again.
  • acrylian Administrator, Developer
    You could use our object orientated framework to call a dynamic album directly on such a custom page and limit the display there.
  • 'object oriented framework'...

    Nice try ;) but I'm just a very moderate 'coder', if any at all...

    I managed to get the looks of my albums using the printLatestImages function on a custom page. Works good for me: http://www.spoenk.nl/beeldend/page/latest. It now shows 24 images instead of the 1500 images before ;)
  • acrylian Administrator, Developer
    Sorry..:-) But looks good.
Sign In or Register to comment.