Announcement

#1 2010-05-15 21:33:48

karan
Guest

how to hide folders and picture

Hello,
I would like to know how can i hide folders and pictures in them. so only admin and register users can have access to it only not just anyone, can access my family pictures. or i mean lock the files and folders. I have the latest version installed released on 05-11-2010. if someone can please help me out.

thanks a lot

 

#2 2010-05-15 22:29:30

Limbo
Guest

Re: how to hide folders and picture

If you go to the Categories section, and then click on properties, you can specify which Categories/folders are hidden. Good luck!

 

#3 2010-05-16 00:07:28

karan
Guest

Re: how to hide folders and picture

Hi thanks for your help.

now i followed the instructions. the folders are hidden now. but no one can see the folder
either everyone can see or no one can see. i want users to login then i can set priority who can view the pictures, since this is fmily site. i want to keep private. I don't what i doing wrong any help would appreciated..


also when i logged in. i am getting controller windows pops up it's really annoying anyone knows how to deactivate it.

thanks

 

#4 2010-05-16 07:58:54

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: how to hide folders and picture

You can read this page in Wiki


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#5 2010-07-27 11:51:52

Pleuris
Member
2010-05-30
14

Re: how to hide folders and picture

I tried a lot of settings (following the wiki page), but I can't get it to work as it should.

The idea is that only people who have registred can look at all the pictures on my piwigo page. When they are logged in the should me able to look at all the pictures. But when I set a category as private (like in the wikipreview) nobody can see it. Not even I logged in as admin.

It makes no difference if set it to show all categories yes or no

I have got 11 categories on my piwigo, only 1 should be open for everybody. Only people who register should be able to look at the 11. Now I have to choose, 11 for everybody, or only 1.

Offline

 

#6 2010-07-27 13:05:14

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: how to hide folders and picture

Here is my recommendation, the simplest solution in my opinion.

Forget about permission at category level, it is an advanced solution and I don't think you need such a powerful feature. Use permissions at photo level.

1) make all your categories public on [Administration > Categories > Properties > Public / Private]

2) change the "who can see this photo?" setting to "Admins, Family, Friends, Contacts" for the photos you want to hide to unregistered visitors. You can change this setting on photos one by one, or use the "bulk manager" on  a given category or on the [Administration > Photos > Caddie]. You can ask for details if you don't know how to use the "bulk manager".

3) install + activate the LocalFiles Editor plugin.

4) open [Administration > Plugins > LocalFiles Editor > Personal plugin] and paste:

Code:

<?php
/*
Plugin Name: Personal Plugin
Version: 1.0
Description: Personal Plugin
Plugin URI: http://piwigo.org
Author:
Author URI:
*/

add_event_handler('register_user', 'set_default_privacy_level');
function set_default_privacy_level($user)
{
  $query = '
UPDATE '.USER_INFOS_TABLE.'
  SET level = 1
  WHERE user_id = '.$user['id'].'
;';
  pwg_query($query);
}

?>

Now, when visitors browse your gallery:
1) if he's not registered he only sees the photos visible by "Everybody"
2) when he registers, he automatically get the "Contacts" privacy level

Sorry for the little piece of "coding". It would be better to have an option "default privacy level for registered user".

Offline

 

#7 2010-07-27 13:35:40

Pleuris
Member
2010-05-30
14

Re: how to hide folders and picture

thanks for your reply. But sadly I must have done something wrong. At this time my piwigo page doesn't work no more. I'm only getting a blank page. So I will first take a backup of all the pictures and start all over again.

Offline

 

#8 2010-07-27 13:39:42

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: how to hide folders and picture

Pleuris wrote:

thanks for your reply. But sadly I must have done something wrong. At this time my piwigo page doesn't work no more. I'm only getting a blank page. So I will first take a backup of all the pictures and start all over again.

No, it must be a problem in your personal plugin, open your FTP connection and remove the "plugins/PersonalPlugin" directory.

Offline

 

#9 2010-07-27 13:52:37

Pleuris
Member
2010-05-30
14

Re: how to hide folders and picture

sorry, doesn't work. Even with all plugins removed. No real problem to start over once more.

It just takes alot of time

Offline

 

#10 2010-07-27 18:00:43

Pleuris
Member
2010-05-30
14

Re: how to hide folders and picture

Just reinstalled it. Trying to get the basic setup right. So 4 photo's to start. 1 for everybody and the 3 other for registerd users. After a lot of swearing it seems to work.

The biggest problem is that newly registrerd users don't automaticaly get the contact privileges. Also when all almost 20.000 photo's are being used I hope I get to give them all the right properties at once.

Big thanks for all your help so far.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact