Last uploaded/random pictures still shows in main, even if album is protected Last uploaded/random pictures still shows in main, even if album is protected
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Last uploaded/random pictures still shows in main, even if album is protected

Started by trex_daemon, May 31, 2006, 10:12:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

trex_daemon

I have a problem, and i don't know how to solve it.

I am running cpg1.4.6. (latest release so far) and i have set up a few albums. Some of them are public, some of them are password protected.
The problem is, if i pasword protect an album, the thumbnails are still shown in main for last uploaded pic, or random pic.  It's true, when i click on it, it asks for password, so the normal image can't be viewed. But is there a possibility to show on the main page only the thumbnails of the last modified pictures/random pictures etc. for the unprotected albums only ??


Tranz

I was unable to replicate. I created a password protected album and uploaded a file. While logged in as admin, I saw the thumb and was not asked for the password when I clicked on it.

When logged out, I did not see the thumb under Last Uploaded. I can't confirm Random because I have too many files for that one thumb to randomly show up.

trex_daemon

It's quite interesting.
I've created the album as root, and password protected it. I've uploaded a few pictures (batch upload) and then i've logged out.
Now, being unlogged, there is a public album, that is visible to all users, the other albums (including the one created above) are all private and password protected. However, in the "Last Addtions" tab, i can see the new thumbnails of the newly uploaded pictures to the private album. When i click on the thumbnail, it gives me an error message: "The selected album/file does not exist !".
But it's still showing the thumbnail.

Tranz

I tried again, using batch upload, and I still can't replicate. :-\

Could you post a link to your gallery and point out/describe the problem thumbs?

trex_daemon


trex_daemon


Joachim Müller

Quote from: trex_daemon on May 31, 2006, 10:00:14 PM
Unfortunatly, currently it's not up between  00:00 (GMT+2) and 09:00 (GMT+2)
Get decent webspace - it's cheap. I won't look into issues that can only be observed on a webserver that is only available at random times.

trex_daemon

It's a webserver for a small company, and it's under developement. When all the services will be available, then  the server will be up 24h/24h.
It's not available at random times, it's not available  between 00:00 (GMT+2) and 09:00 (GMT+2).
And i don't think that availability time affects the functionality of Coppermine Photo Gallery.
I've observed an issue, and i thought it's a  good idea  to announce to the developement team, to help improve your product.
Anyways, thank you for your reply. I'll wait then for a bigger "company" to discover this issue, and maybe then it will be fixed in future releases.





Paver

There's no reason to get personal.  You explained your situation and I think it's reasonable.  There are other supporters in the community if some are unwilling to address certain issues.  Remember, we are all individuals here - even when we are working as a community, we each still have individual personalities that define us as persons instead of an automated support system.  We all want to investigate possible problems and help support issues users are having.

Please don't delete your posts.  If something changes, make a note in a further post.  If something is confusing in a past post, go ahead and edit it with a note at the end of the modified post saying what was changed - that way posts below make sense to people reading later.  All threads & posts are kept for historical reasons to help others who might run into the same issues.  Please respect this by using care in modifying past posts.

That being said, please post a link to your site again.  It's difficult for supporters to help if we cannot replicate the problem on our testbeds. 

Shazilk

First I would like to say hi and thanks for a brilliant script  ;)

I have tried several other photo progs, one I even purchased a licence for. Non compete with this, the install and help hints everywhere are excellent.... keep up the great work.

However I do have a small problem similar to what I think is being described above. I have just installed 1.4.6
I have both private and non private albums. When I am logged out and look at the random files I can see some thumbnails that are from within the private album, when clicked upon I get error: The selected album/file does not exist !

Any Suggestions please??
If only i could!!


Shazilk

If only i could!!

Nibbler

Please don't post adult sites without warning.

This is a bug, but only appears when the private icon option is enabled.

Nibbler

Paver, please could you look into any possible side effects of http://forum.coppermine-gallery.net/index.php?topic=30894.0 in relation to this apparently  new bug ?

Paver

Yikes, I was wondering what may be the cause of this new series of bug reports.  The possibility that it was my commit is embarrassing and even more so that it was for fixing a notice message.  I thought I had tested the fix thoroughly, but right now, I'm not so sure.  I'll take a look at it tonight or at the latest this weekend.

I'm thinking for the future that notice fixes should only be committed to devel.  Sorry about that.

Shazilk

Quote from: Nibbler on June 02, 2006, 10:34:11 PM
Please don't post adult sites without warning.

My Apologies, I wish no one any offence and certainly will not be offended if you remove that link.

So from current response I assume this is a bug and not something I have done  :-[

I will watch here carefully for any further response or advice.





If only i could!!

Nibbler

For now you can reverse the code change mentioned in the bug thread I linked to above. Adult links are fine so long as you post a warning.

Paver

Ok.  As far as I can tell, this bug is due to a mis-used $cpg_show_private_album in the function I modified here.  This variable is set in index.php:
$cpg_show_private_album = ($CONFIG['allow_private_albums'])?($CONFIG['show_private']):(true);

It's meant to allow private albums to show up in the index list but not be accessible any further.  So it should not be used as a bypass in setting $META_ALBUM_SET which is used by the last-uploaded and random blocks.

So, replace this line in function get_meta_album_set() in functions.inc.php:
if (($cpg_show_private_album || $USER_DATA['can_see_all_albums']) && $cat == 0) {
with this line:
if ($USER_DATA['can_see_all_albums'] && $cat == 0) {

Although not necessary functionally (but will be done in the commit), you can also remove $cpg_show_private_album from the global line in the same function to restore it to what it was before my misguided fix, as shown:
global $USER_DATA, $FORBIDDEN_SET_DATA, $CONFIG;

So, before the misguided fix, $cpg_show_private_album was not available to get_meta_album_set() function and that was a good thing because it should not have been there.

For those who have this problem, please try the 2-line fix and report your results.

Shazilk

Excellent..... you are a star sir  :)

I changed the 2 lines as you stated and it looks good to me.

Thank You both Nibbler & Paver
If only i could!!

Paver

A star after being a goat - I guess that's better than never being a star . . .  :-X