Announcement

  •  » Engine
  •  » categories with no photo due to privacy levels

#1 2009-07-13 00:54:35

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

categories with no photo due to privacy levels

Hi Piwigo Community,

Now that we have privacy levels on photo to manage permissions, I use them instead of the historic group/category permission system. I find it nice (because it's so much simpler) but I think some results are not as good as expected.

For instance, I have all the photos of the my category "new baby" for "Friends" only. I have not set the category to private, I only play with the privacy level on photos. The consequence is that an anonymous visitor can see the "new baby" category in the menu. The other consequence is that the anonymous visitor can see the "new baby" category as a sub-category on index.php and read the category description and see the category representative thumbnail.

Shouldn't we automatically hide a category with no photo inside for a given user?

Offline

 

#2 2009-07-13 01:00:23

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

Re: categories with no photo due to privacy levels

Here is an illustration of my problem. As a guest, I can see sub-categories with photos inside (I can see the description and representative thumbnail) but when I go into the category, I see nothing of course).

Offline

 

#3 2009-07-13 06:49:32

rvelices
Piwigo Team
2005-12-29
1960

Re: categories with no photo due to privacy levels

two solutions for that
- just hide them in the menu bar / index page
- have them appear in the "forbidden categories"

I'm not sure which one is the "best". Which one do you prefer ?

Offline

 

#4 2009-07-13 12:35:06

rvelices
Piwigo Team
2005-12-29
1960

Re: categories with no photo due to privacy levels

at a second though this might be issue. Some people might be using the ping-pong feature or just have an empty category with a lot of text/html in the description. So showing an empty category in this case is desirable ...

Offline

 

#5 2009-07-13 14:17:48

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: categories with no photo due to privacy levels

+1


But we can link a picture to a ping-pong category as well.
For HTML, we can use Extended Descrition and in the picture name we can mark it <!--hidden-->
So there is a bypass.


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#6 2009-07-15 01:01:36

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

Re: categories with no photo due to privacy levels

I'm not yet ready to say "no content => make the category as forbidden".

As a heavy user of [extension by Piwigo Team] Extended Description, I've asked grum to give me his opinion concerning an empty category only to give a description (it's a [extension by P@t] Additional Pages job in my opinion, but when I see such a page made with [extension by Piwigo Team] Extended Description, I wonder if [extension by P@t] Additional Pages could have done it as well/simply)

My concern is also about the API. pLoader calls pwg.categories.getList, if we consider a category is invisible as long as there is no photo inside, there is a problem. If the API doesn't take this constraint into account, it's also a problem, since the API is public (you would see more categories with pwg.categories.getList than you can see by browsing HTML pages).

My current state of mind is "let's make it simple : no content, hide". And pLoader will have to change its way to retrieve the category list (this problem is minor compared to the one described in this topic).

Offline

 

#7 2009-07-15 20:28:10

grum
Former Piwigo Team
Pantin
2007-09-10
1371

Re: categories with no photo due to privacy levels

plg wrote:

I'm not yet ready to say "no content => make the category as forbidden".

As a heavy user of [extension by Piwigo Team] Extended Description, I've asked grum to give me his opinion concerning an empty category only to give a description (it's a [extension by P@t] Additional Pages job in my opinion, but when I see such a page made with [extension by Piwigo Team] Extended Description, I wonder if [extension by P@t] Additional Pages could have done it as well/simply)

My concern is also about the API. pLoader calls pwg.categories.getList, if we consider a category is invisible as long as there is no photo inside, there is a problem. If the API doesn't take this constraint into account, it's also a problem, since the API is public (you would see more categories with pwg.categories.getList than you can see by browsing HTML pages).

My current state of mind is "let's make it simple : no content, hide". And pLoader will have to change its way to retrieve the category list (this problem is minor compared to the one described in this topic).

About this page, I think I have to give some explanation.
My gallery have this structure :

--[Randonnées & vacances]
    |
   +--[#151:Patagonie]
         |
        +--[#153:buenos aires]
        +--[#152:perito moreno]
        :
        +--[#160:Sixième jour de randonnée ]


As you can see, the category #151 [Patagonie] have sub-categories.
Each sub-category have the <!--hidden--> tag in title, interpreted by [extension by Piwigo Team] Extended Description as "don't display them in the parent categorie page". As you can see on picture #2, theses sub-categories are always visible in the menu.
You can also see in the picture #1 the sub-category "Buenos Aires" inserted with the [cat=153] tag have 4 pictures.

Inside each sub-category, you have public pictures, so if you go in the sub-category, you can see them (picture #3).

So, for piwigo, all the pictures are visible (no privacy levels or no right management with the user/group permissions). The only reason why they are not visible is because [extension by Piwigo Team] Extended Description make them not visible (the plugin remove theses items from the template data before Piwigo process the template).


So now, why I don't use Additionnal Page to make this page ?
For many reasons :
- AdditionnalPage allows to add a page"outside" the gallery, but in this case I want this page inside the categories tree
- I want to make a 'travelbook' with some pictures to illustrate, and I want also direct link to all the pictures (I don't want to display all picture in the 'travelbook')


Another example on this page : http://photos.grum.fr/index.php?/category/251
I want to display some pictures ("affiche", "ticket d'entree" and all goodies) on the catgeory page on a specific place, and not with all the picture of the category.
But when I click on theses specifics pictures, I want to see them in the category with all other picture : so, I put the <!--hidden--> tag on the pictures title, [extension by Piwigo Team] Extended Description make them not visible, I add the [img=5763.251 5770.251;name] tag to tell [extension by Piwigo Team] Extended Description display them where I want, and the picture is visible with a classic URL http://photos.grum.fr/picture.php?/5763/category/251



I'm not sure my explanation are very clear ^^ but to answer the question, I think an empty category (empty because of the privacy levels or group permission or no picture) don't have to be visible and accessible by a visitor => this is not a problem to make pages similar than mine ;-)


My pictures with Piwigo, of course !
[ www.grum.fr ]

Offline

 

#8 2009-07-16 01:17:16

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

Re: categories with no photo due to privacy levels

Thank you grum (very interesting description of [extension by Piwigo Team] Extended Description by the way), I really appreciate your conclusion :-)

So as far as I see it, let's make it simple: for a given user, if a category doesn't contain any photo (with recursivity) then it should be added in the forbidden category list.

rvelices do you take care of it? (or do you prefer I implement it?) On my side, I'll prepare changes for pLoader/API considering that pLoader currently call pwg.categories.getList.

[Bugtracker] ticket 1053

Offline

 

#9 2009-07-16 06:48:51

rvelices
Piwigo Team
2005-12-29
1960

Re: categories with no photo due to privacy levels

plg wrote:

So as far as I see it, let's make it simple: for a given user, if a category doesn't contain any photo (with recursivity) then it should be added in the forbidden category list.

rvelices do you take care of it? (or do you prefer I implement it?) On my side, I'll prepare changes for pLoader/API considering that pLoader currently call pwg.categories.getList.

[Bugtracker] ticket 1053

I'll do it; it's quite easy if I remember well the code. I think it is better if we apply this feature only for non admins. Like this your pLoader will work fine and the admin will still see that some categories without images are there ...

Offline

 

#10 2009-07-20 01:29:05

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

Re: categories with no photo due to privacy levels

Thank you rvelices, I've made some tests on [Subversion] r3622, I don't see the empty categories anymore :-)

I've seen a strange behavior: if I set category as private, if a user with no permission tries to get into it (by setting the id directly in the URL), he gets a permission error and an invitation to connect. With the "empty implies forbidden" feature, if he goes to the category, he can see the name and its description, the category is just empty.

Offline

 

#11 2009-07-20 07:20:08

rvelices
Piwigo Team
2005-12-29
1960

Re: categories with no photo due to privacy levels

plg wrote:

Thank you rvelices, I've made some tests on [Subversion] r3622, I don't see the empty categories anymore :-)

I've seen a strange behavior: if I set category as private, if a user with no permission tries to get into it (by setting the id directly in the URL), he gets a permission error and an invitation to connect. With the "empty implies forbidden" feature, if he goes to the category, he can see the name and its description, the category is just empty.

it was a bug it is corrected in [Subversion] r3640 and [Subversion] r3641

Offline

 

#12 2009-07-20 23:48:49

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

Re: categories with no photo due to privacy levels

Thank you rvelices, it works really nice :-)

Offline

 

#13 2009-11-09 23:44:51

tiico
Member
2007-05-29
88

Re: categories with no photo due to privacy levels

Hi

Is it possible to manage this evolution with 1 parameter?
In my case, i need that people connected (through web site or ploader) could see all existing categories?
Thanks
Tiico

Offline

 

#14 2009-11-12 23:57:15

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

Re: categories with no photo due to privacy levels

Hi tiico,

tiico wrote:

Is it possible to manage this evolution with 1 parameter?
In my case, i need that people connected (through web site or ploader) could see all existing categories?
Thanks

I know this problem. I haven't solved it yet unfortunately. As a consequence, [extension by plg] Community + Piwigo >= 2.0.4 => when a non-admin user creates a category, it automatically disappear :-/

plg wrote:

My concern is also about the API. pLoader calls pwg.categories.getList, if we consider a category is invisible as long as there is no photo inside, there is a problem. If the API doesn't take this constraint into account, it's also a problem, since the API is public (you would see more categories with pwg.categories.getList than you can see by browsing HTML pages).

My current state of mind is "let's make it simple : no content, hide". And pLoader will have to change its way to retrieve the category list (this problem is minor compared to the one described in this topic).

Let's think about a solution. You propose to deactivate the "no content => hide category" behavior. That would be an advanced parameter, but why not.
Why don't we apply the same algorithm to users with "community access rights" than to admins? Wouldn't it be better?

Offline

 

#15 2010-02-13 00:09:13

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

Re: categories with no photo due to privacy levels

plg wrote:

I know this problem. I haven't solved it yet unfortunately. As a consequence, [extension by plg] Community + Piwigo >= 2.0.4 => when a non-admin user creates a category, it automatically disappear :-/

[Bugtracker] ticket 1431, will be fixed in Piwigo 2.0.9

Offline

 
  •  » Engine
  •  » categories with no photo due to privacy levels

Board footer

Powered by FluxBB

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