Posted on: 01/06/06 09:54pm
By: Mina
I do not wish the anonymous users to access one of the albums I created. So, I went to "Edit Album" and unchecked "Anonymous" R.
I tested out and it displays "The Album is Empty". I was hoping to display a different message such as "You do not have access to this page. Only logged in users are allow to view this page". I looked at the code little quick, it appears that the message is generated based on the following conditions
if ( $total_media == 0 )
or
if ( $total_media > 0 ) {} else {//display The Album is Empty message}
. When "Anonymouse" access is disabled, is '$total_media' considered as "0" ????? I stopped looking at this problem. Can you please help?
Media Gallery - Anonymous Access
Posted on: 01/06/06 10:38pm
By: mevans
Mina,
You have found a bug! I'm putting together v0.98 tonight and plan to release it tomorrow. It will contain a fix for this problem.
But, there is a way to make Media Gallery do what you want and this little bug won't come into play.
In the Media Gallery Configuration screen, Set Login Required to Yes and no anonymous access will be allowed.
thanks!
Mark
Media Gallery - Anonymous Access
Posted on: 01/07/06 01:41am
By: Mina
Thank you Mark!!
In the Media Gallery Configuration screen, Set Login Required to Yes and no anonymous access will be allowed.
Actually I already thought about your suggestion. If I do that, this rule will be applied to all albums I created (correct me if I am wrong). I only wanted to certain album to offer a limited access and that is why I tried to set this option at the album level.
Guess what? I found my own way to work around this problem. It may sound stupid but I just went ahead and changed text "The Album is Empty" to "You do not have access to this page". I figured that I won't have albums without any pictures, therefore, users will never see that "empty" message anyways. This will work for me for now... :-)
Have a good night!!
Media Gallery - Anonymous Access
Posted on: 01/07/06 01:46am
By: mevans
Mina,
You are correct, setting the config option will be global for all albums.
I'm not sure changing the text will actually solve the problem. When I went into the code to look at what was wrong, I simply do not check the album permissions, so if there are images in there, they will be shown. I had completely rewritten that section in v0.96/0.97 to fix a resource utilization problem and I just missed putting the check back in place.
I'm doing the final tests on v0.98 right now and will have it available for download tomorrow morning sometime. I'll post here when it is ready. And, it will have the exclude from random block addition you wanted too!
Thanks!
Mark