View Full Version : last image in category
01-24-2008, 12:04 PM
I want to personalize my pixelpost based site.
I want to put thumbnails of categories, and the thumbnail to show the last image added to that category. Any ideas how to do that?
01-24-2008, 12:10 PM
Something like http://www.pixelpost.org/extend/addons/browse-by-category/
Where the thumbnails are listed under their respective categories?
01-24-2008, 12:19 PM
No, like on
only that on that site the category is linked to a static image. i want that the category image to be the last image added to a category.
01-24-2008, 12:42 PM
I see. As far as I know, there is no such addon.
01-24-2008, 12:52 PM
and without an addon, do you know the command line to show last image from a category? I will buid it. Now, on home i see showimage #142. But i don't understand how is the image number updated when i post a new image.
01-24-2008, 01:02 PM
I cannot give you a specific query as I don't have the time but if you can build an addon you should have no problems building the queries yourself.
You will have to query the pixelpost table for the image ID's then you will have to query the catassoc table to match the image ID to a category ID. Once you have a category ID you can query the categories table to get the Category name.
That may be backwards, it all depends on how you want to make the relation. Play around until you get the expected results.
That is how you would do it if you wanted a standalone page.
If you wanted to show the latest thumb from a cat on the images page, you can use the $image_id var which is already set with the currently viewed image ID.
01-25-2008, 04:03 PM
no one else can help me?
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.