Direct linking to displayimage.php of private album Direct linking to displayimage.php of private album
 

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

Direct linking to displayimage.php of private album

Started by dimitry_clover, August 12, 2008, 02:27:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dimitry_clover

Sorry if this is more like a feature request.

I would like to ask, if there is a way to modify displayimage.php, such that if the referenced permanent id resides in a password protected album (not restricted by user group, just set a password in album properties), it would display the password box and direct to the preview page when the correct pw is entered? (Instead of just displaying "The selected album/file does not exist!", which looks like an error on my part.)

The best compromise I can do is to include a thumbnail in my blog, and set the href of that thumbnail to the relevent thumbnails.php.

FYI, I am using CoppermineSC (http://www.rueplumet.com/plugins/copperminesc/) for wordpress to integrate thumbnails to my blog posts.

Joachim Müller

The plugin you're refering to goes unsupported from our side, as we don't know it.

dimitry_clover

Then forget about the plugin I mentioned. It's not really related to my question. All it does is taking the thumbnail filename from the database, and convert it to a direct link to displayimage.php with reference to a permanent id then place it on the blog. (something like http://hsot/coppermine/displayimage.php?pos=-xxx)

The question remain the same.

dimitry_clover

Let me clear up my question a bit.

Suppose I have a direct link somewhere on my blog, that links to http://hsot/coppermine/displayimage.php?pos=-xxx

If -xxx resides in an album that is password protected, and no authorizing cookie is detected, then coppermine simply displays an error message "The selected album/file does not exist!"
If the password has been entered in the same session before (by linking to the said album with thumbnail.php), the link to displayimage.php will successfully show the preview of the image.

My question is that is there any way to modify displayimage.php, so that a password box will show if -xxx resides in a password protected album instead of just displaying an error message?

So far the only way I can reasonably link to password protected images on my frontpage, is to direct them to thumbnail.php, which shows the entire album. I would like to be able to link to individual images in said albums.

Joachim Müller

This can surely be accomplished code-wise, but hasn't been done yet, so basically, the answer to your question is "yes, it's possible", but on the other hand it's "no, it hasn't been done yet". Sorry. Since it's not trivial to accompish what you're up to, it's not very likely that someone will look into your issue and code the needed changes for you. I strongly suggest another different approach: the password-protected albums are a workaround anyway. The real recommended way to do what you're up to is doing this groups.permissions wise. In the first place, the difference might not appera to be big, but permissions based on groups is what really makes coppermine tick, permissions-wise. This being said, I suggest you ask yourself the question if you can't skip the password protected albums and use groups membership instead: promote the users you trust and supply with a password now to a group instead that enables them to see the album in question. This sounds more reliable to me.

dimitry_clover