Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Hiding Individual Pictures  (Read 5904 times)

0 Members and 1 Guest are viewing this topic.

Drinyth

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Hiding Individual Pictures
« on: June 05, 2004, 03:41:18 pm »

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.
Logged

jayse

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Hiding Individual Pictures
« Reply #1 on: June 21, 2004, 07:34:00 am »

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

:-)

// jayse
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Hiding Individual Pictures
« Reply #2 on: June 21, 2004, 09:28:17 am »

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
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: Hiding Individual Pictures
« Reply #3 on: February 19, 2005, 07:54:33 pm »

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.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Hiding Individual Pictures
« Reply #4 on: February 19, 2005, 08:00:55 pm »

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.
Logged

jon_miner

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Hiding Individual Pictures
« Reply #5 on: February 23, 2005, 06:51:18 pm »

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

jon
Logged

michelfontaine

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Hiding Individual Pictures
« Reply #6 on: April 16, 2005, 10:16:13 pm »

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.
Logged

krkeegan

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 53
  • ahh the life...
    • Kevin's Photos
Re: Hiding Individual Pictures
« Reply #7 on: April 18, 2005, 04:23:01 am »

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
Logged
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

krkeegan

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 53
  • ahh the life...
    • Kevin's Photos
Re: Hiding Individual Pictures
« Reply #8 on: April 18, 2005, 05:12:50 am »

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
Logged
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

krkeegan

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 53
  • ahh the life...
    • Kevin's Photos
Re: Hiding Individual Pictures
« Reply #9 on: April 18, 2005, 06:20:23 am »

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?
Logged
There are no stupid questions, only stupid people. -Mr. Mackey, South Park
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 21 queries.