Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 03:35 pm EDT

Geeklog Forums

Media Gallery - Anonymous Access


Status: offline

Mina

Forum User
Junior
Registered: 10/02/05
Posts: 34
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
Text Formatted Code
if ( $total_media == 0 )
 
or
Text Formatted Code
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?
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
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
 Quote

Status: offline

Mina

Forum User
Junior
Registered: 10/02/05
Posts: 34
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!!
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
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
 Quote

All times are EDT. The time is now 03:35 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content