Hiding Individual Pictures Hiding Individual Pictures
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Hiding Individual Pictures

Started by Drinyth, June 05, 2004, 03:41:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Drinyth

Another feature request. :)

It would be nice to be able to hide individual pictures already in an album.  Sometimes I like to upload an entire batch of pictures and then make a custom view for people with all the icky or redundant photos taken out.  I could just delete the pictures, but it's nice to have them on there in case I want them for whatever reason later.

I could do the same I guess by moving those pictures into another album not viewable by anyone, but the idea of keeping them in the same album but hidden seems better to me for organization reasons?

Just a thought.

jayse

Definitely want this - also - hide photos for non members - show them for members

:-)

// jayse

Joachim Müller

currently, you could set the approval status of the pics in the database to "NO". This would hide them for everyone. Someone with a bit PHP knowledge should easily be able to make this into a mod (applying checkboxes to each pic when in admin mode to toggle approval status).

GauGau

lordprodigy

Has anyone done something for this? I would like this mod too.

I think it will be a great idea to have a checkbox where you can click or unclick HIDE function or permission function for each photo. It will be lovely for example non registered people to only see certain photos in a given album, and registered people to see them all. Can this be done?

Thanks in advance.

donnoman

why not just make an album that only admins have view permissions of, and move the pics you don't want to that album.

When you want them, move them back.

jon_miner

Search for "Private Pictures", I just sent a diff to add private picture support to 1.3.2.

jon

michelfontaine

This feature would be great!
Why should I create a second 'holiday' album only for only one private picture eg. 'me naked at the beach'? This is the same holiday but not for the same people to look at.

Mic.

krkeegan

I think this would be helpful too, let me tinker with it for a while and see if there would be an easy solution.

Kevin
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

krkeegan

I looked at this a bit.

I think that GauGau suggestion is probably the easiest. However I would like to both display a thumbnail that says it is a blocked file as well as have a select group of users allowed to see it rather than only the admin.

That said, I think that the easiest way to do the more complex version is to use the user defined fields to allow the admin to select groups of users that are allowed to see the images.

This design however will require way more work at first glance. This is because thumbnails are displayed all over the site and not just on one page. Give me some more time and I will see what I can do.

Kevin
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

krkeegan

Okay here is what I have determined from looking at this for a while.

If you wanted to say replace certain thumbnails with an image, such as "Private Please Register", or whatever you can do this with not to much work. However these images would still show up in all of the meta albums, so you could end up with 2-3 random photos on page 1 that all say private. This is the glitch I am stuck on right now. But here is what I have thought of so far.

First: Upload the private image of your choice.
Put this file in an album somewhere where the permissions allow everyone to see it.

Now go and view this photo and get the display url from the photos information section. The URL should look something like:
http://gallery.krkeegan.com/displayimage.php?pos=-64

Make sure that the pos value is NEGATIVE. If not then you are looking at the wrong url.

MODIFY functions.inc.php

display_thumbnail() function

near the end where it is building the thumb_list array you need to add a conditional statement that checks to see if the user has permission to view the photo (such as what I discussed earlier with the user defined field) and if it does not then you need to alter the pid value to the negative pos value you got from the url above as well as change the image url.

Now this is only an initial markup of an idea. It does have a few problems such as:

As I mentioned earlier this will still keep these photos in meta albums which is a bit unnecessary and ugly.
If the user follows the link they will leave the album they are in and enter the album that the private photo is stored in. Now this is okay except that the breadcrumb will be wrong. If the user uses the back button they will be okay.

There are other ways to get solve some of these problems. Such as we can eliminate the link altogether from the thumbnail. But this would be more difficult as the link is actually created in the themes file.

Anyone have any thoughts on this? Maybe there is a simpler method I am missing?
There are no stupid questions, only stupid people. -Mr. Mackey, South Park