[Closed]: public & private Images [Closed]: public & private Images
 

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

[Closed]: public & private Images

Started by Tempy111, April 12, 2010, 06:20:36 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Tempy111

Okay, i think this is the right place (Oh, famous words)

I know at the moment, it is not possible to make an image public or private, but only a folder with images, but i'm wondering, well, why? I've looked at the album keywords trick (which doesn't seam to work) and via Keywords or such, i can't see it being that hard to make a plug-in or such which can check a single image for details on if it is private or public.

When you are viewing a public folder, it must check to see if an image is from a private or public folder. When from private, it won't display it.. So there must be something there that checks.. In which case, half of the work is surely done and a simple thing that removes that would work, but then, would mess up everything else.. BUT if it only removed that bit IF the album keyword (or a special 'public' keyword) was there. In theory, i can't understand what's wrong or why this would be sooo hard but in pratice.. well.. I'm far from being a PHP expert.

What i'm wondering is more, if anyone knows the right varibles to look for and check, OR (which is probebly better due to my lack of skill, but doesn't matter) if anyone is in the mood to make a quick plug-in to do the job?

phill104

Welcome to the coppermine forums. First little thing, in future please always post a link to your gallery as per the board rules. There are many reasons why which have been explained countless times.

What you are asking could be achieved but you would probably have to code it yourself. A more granular permissions system has been requested numerous times. Some users struggle with the current system and I fear adding more options would only complicate things further.
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

Quote from: Tempy111 on April 12, 2010, 06:20:36 PM
Okay, i think this is the right place (Oh, famous words)
No, it's not. You're requesting a custom plugin to be coded, so you should have started your thread on the plugin sub-board. Anyway, the request is pretty invalid, so it doesn't matter much where it is posted anyway.

Quote from: Tempy111 on April 12, 2010, 06:20:36 PMI know at the moment, it is not possible to make an image public or private, but only a folder with images, but i'm wondering, well, why?
Basically because nobody ever requested permissions on a per-file base. managing permissions per file would make the database get bloated and would make managing the gallery a nightmare.

Quote from: Tempy111 on April 12, 2010, 06:20:36 PMI've looked at the album keywords trick (which doesn't seam to work)
What trick?

Quote from: Tempy111 on April 12, 2010, 06:20:36 PMand via Keywords or such
very vague...

Quote from: Tempy111 on April 12, 2010, 06:20:36 PMi can't see it being that hard to make a plug-in or such which can check a single image for details on if it is private or public.
Fine. Then go ahead and code it - we're looking forward to your contribution.

Quote from: Tempy111 on April 12, 2010, 06:20:36 PMWhen you are viewing a public folder, it must check to see if an image is from a private or public folder. When from private, it won't display it.
Where does it store that secret data? How do you edit that data? Far from trivial.

Quote from: Tempy111 on April 12, 2010, 06:20:36 PMWhat i'm wondering is more, if anyone knows the right varibles to look for and check, OR (which is probebly better due to my lack of skill, but doesn't matter) if anyone is in the mood to make a quick plug-in to do the job?
If this is so dead-easy and quick as you propose, then code that super plugin, but don't expect others to do your work for free - that's far beyond from what you could expect from free support. I suggest you start using the terms that are being used througout the documentation and on this board: a folder is a container on file system level. An album is a container on logical level inside the database and as well in the way coppermine is grouping and organizing things. You mustn't mix those two terms "folder" and "album".
There is no place in the database or on file system level that stores permissions of a folder - all permissions are handled and stored based on album level, which is (as I said) a logical construct. I'm not saying that it would be impossible to come up with a code that allows per-file permissions. But it would be an awfull lot of work (some weeks), and I can't see the reason why anybody would need that.

Additionally, you failed to do as suggested per board rules, which makes it even less likely that someone will code your miracle plugin for you.

Tempy111

ah damn.. broken rules already... very sorry, and this isn't a good start...
My site/gallery is at http://www.tempy.man-ma.de The rule was sitting right above me.... oh and sorry, you kinda need to be 18+ to go there.

The bit about a custom made one was more a side bit, i'm more intrested in toying around myself which was what i was more asking for. Sorry for not making myself that plain..

The trick i was talking about was trying to create a public folder and giving it a key word, and then putting the keyword on some images in other folders so that it would still display them images from the private folder, in the public folder. However, when viewing the public folder as a normal guest, it wouldn't display the stuff i need to log in to see. There fore, i guess, it must check to see if it the image is in a private folder or not. logged in, i was able to view the content of the public folder, as i should, so i even more took that to be the truth.

I didn't quite think it would need to bloat out the database much because the one idea i gave was using a 'safe-word' so that it would just create a small slow down in loading the image, because it checks with a key word that only needs to be stored in one place in the database, with keywords which are already set up.

Also, when not logged in and follow a direct link to a image page (displayed by displayimage.php) it won't display it if it is in a private folder, which also seams to follow the idea it checks for the album's permission status. So i figured, it must store that status someplace after all. All that i can see would be needed is just to check if one of the keywords match the 'safe-word' and display it if it's in a private album or not.

I'm very sorry i messed up so early on and i didn't really want anyone else to code this, more i wanted to code it myself, it's just i couldn't find where the data i'm looking for is stored.. in fact, as far as i got is the $CURRENT_ALBUM_DATA array but that wouldn't work anyway.. cause i would need to know the current album and then refence it..

again, very sorry i messed up. Oh, and i don't expect people to work for free (like i said, i more wanted to do the code myself but i put in what i thought was an off-hand comment for anyone that thought it was a good idea and would want to try it themselves). Well... i guess helping me with the varible names i'm looking for would be work for free.. unless anyone wanted an image request in trade...

phill104

Firstly you are running a very out of date install - <!--Coppermine Photo Gallery 1.4.14 (stable)--> - Before you go any further please update to the latest release as we cannot provide any support for outdated versions. They have been updated to protect you from known security problems and to fix known bugs. To not update is madness and to do any coding on an old version more so.

Why would a UK customer use a .de domain?
It is a mistake to think you can solve any major problems just with potatoes.

Tempy111

okay, i'll look into updating

and why? Cause a german friend of mine is hosting. For sites like mine, there aren't too many webhosts that would bend over to host for you.. he offered that if i want a site, he'll host it for me, and i said 'sure'.

Joachim Müller

Quote from: Tempy111 on April 12, 2010, 07:31:16 PM
The trick i was talking about was trying to create a public folder and giving it a key word, and then putting the keyword on some images in other folders so that it would still display them images from the private folder, in the public folder. However, when viewing the public folder as a normal guest, it wouldn't display the stuff i need to log in to see. There fore, i guess, it must check to see if it the image is in a private folder or not. logged in, i was able to view the content of the public folder, as i should, so i even more took that to be the truth.
You did it again. Let me repeat:
Quote from: Joachim Müller on April 12, 2010, 06:49:51 PMI suggest you start using the terms that are being used througout the documentation and on this board: a folder is a container on file system level. An album is a container on logical level inside the database and as well in the way coppermine is grouping and organizing things. You mustn't mix those two terms "folder" and "album".
There is no spoon folder.

Joachim

P.S. Your gallery is broken. All I get is a fatal error. Start a new thread about that if you need help on this issue (respecting board rules).

Tempy111

sorry, and i know the problem with the gallery being down right now. There was a problem with the upgrade which i need to talk to the server host to deal with. No big problem just annoying it will take a couple of hours

Joachim Müller

Don't expect the webhost to do your job. The webhost will answer "your issue is with a third party software (Coppermine) that we do not provide support for. Ask the people who support Coppermine", and they are of course right to say so. Do as I suggested instead:
Quote from: Joachim Müller on April 13, 2010, 07:21:13 AMStart a new thread about that if you need help on this issue (respecting board rules).
Really, do it. I mean what I say.

Locking

Joachim