Author Topic: any way to implement "image stacks"?  (Read 6665 times)

0 Members and 1 Guest are viewing this topic.

Offline bernd

  • Full Member
  • ***
  • Posts: 214
    • View Profile
any way to implement "image stacks"?
« on: July 30, 2008, 12:00:21 AM »
Hi,

ever so often I end up with a bunch of images that are almost the same - sort of belong to each other but ditching some of them won't be right either. But having a dozen images in a category is not nice for the user either. So what I'd like to have is to "stack" these images together, only showing one in the category (or the search result), giving an indication that this is actually a stack by an icon or some other visual treat. When the user then opens this stack he/she sees the image plus all other images that belong to this stack.

If you've worked with Adobe Bridge or Lightroom or Apple Aperture you know what I'm referring to. The Adobe help site has a nice visualization of what I'm trying to discribe http://livedocs.adobe.com/en_US/Bridge/2.0/help.html?content=WS0FED4788-09A5-45f5-B136-BEFE64ADE5F6.html and there is also a video on youtube http://www.youtube.com/watch?v=A-X1zDt6nkc&feature=related where a guy explains the stacks in Lightroom.

So - does anyone think that this is a possible modification? I'm trying to think myself but haven't found the "entrance" yet.

Thanks for reading,
bernd

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: any way to implement "image stacks"?
« Reply #1 on: July 30, 2008, 01:04:15 AM »
I understand your request, but without heavy modifications it would be easy to do by just creating sub categories for those images...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bernd

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: any way to implement "image stacks"?
« Reply #2 on: July 30, 2008, 01:10:22 AM »
I understand your request, but without heavy modifications it would be easy to do by just creating sub categories for those images...
hmm, yeah - no :-)
me no like sub categories for that ;)
The biggest drawback is that this won't help the search results - still all images would show up. Maybe someone else has a better idea ... or I need to find an intern to pick his brain and have him do the heavy mod :-D

cheers,
Bernd

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: any way to implement "image stacks"?
« Reply #3 on: July 30, 2008, 01:23:45 AM »
... and what about ... [MOD] Multi-Lightboxes v1.03 ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: any way to implement "image stacks"?
« Reply #4 on: July 30, 2008, 01:30:33 AM »
(I don't know how goodl is your PHP knowledge and 4images itself, so my following tip might not be very usefull to you)

I think the easiest way (easiest within the hardest ;)) to do this would be add a new field in 4images_images table. As an example lets call it image_related
In that field we'll store image id of the "main" image.
Now, when we change each database query related to IMAGES_TABLE in 4images files so it would exclude the images with not empty image_related field i.e.
Code: [Select]
$sql = " SELECT *
FROM " . IMAGES_TABLE . "
WHERE NOT image_related";
There are quiet a few places where such condition needed to be added.

And finally in details.php we query database for any related images:
Code: [Select]
$sql = " SELECT *
FROM " . IMAGES_TABLE . "
WHERE image_related=" . $image_id;

Good luck ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bernd

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: any way to implement "image stacks"?
« Reply #5 on: July 31, 2008, 01:33:03 PM »
thnx V@no - this put me in the right direction. It's not too bad to implement I think. I already have the category view limited and can show the ID of the main image in the details. So I now need to get the "related images" display in the details for the main image and have an indication in the thumbnail view that this actually is not a single image but belongs to a stack. Any idea how implement that elegantly? I was thinking to query the DB for each image
Code: [Select]
$sql = " SELECT *
FROM " . IMAGES_TABLE . "
WHERE image_related=" . $image_id;
If there is a result that'd mean that the main image has related images and I could show it with a coloured border for instance. But I am a little anxious that this would have quite an impact on the performance when I have a few dozen images in thumbnail view this'd mean a few dozen SQL queries. Does anyone have a better/different idea?

I'll keep you posted on my progress.

cheers,
bernd