Announcement

  •  » Extensions
  •  » Plugin to show private ablum thumbnail (request comment)

#1 2012-06-27 03:39:11

fatman
Translation Team
2012-03-16
20

Plugin to show private ablum thumbnail (request comment)

This is the first time I try to write a Piwigo Plugin.

Actually, what I want to do is same as Plugin "Protected Albums", a password protected album but shown on album listing.  However, after I tried "Protected Albums", I found that the photo still able to view by Search, tag, flat....etc,  I think that maybe impractical to implement another security without support by the piwigo core.

I think it is better to use the Piwigo user security,  and write a plugin to display the pirate album thumbnail to public, so it will ask for login after clicking on it.

What I am doing is add_event_handler at loc_begin_index_category_thumbnails, reset the array $categories to display the private album thumbnail.  It is working now, I may try to add an admin page to select which private album to show.

Then, I want to ask, is it a good way to implement the plugin? Or there is another plugin/built-in function to accomplish this?

Offline

 

#2 2012-06-27 16:59:01

flop25
Piwigo Team
2006-07-06
7037

Re: Plugin to show private ablum thumbnail (request comment)

that seems good
so the album is private, and the plugin displays the representative thumbnail : it's the own chosen by piwigo or a specific picture ?
great work, it sounds interesting !


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2012-06-27 22:31:41

fatman
Translation Team
2012-03-16
20

Re: Plugin to show private ablum thumbnail (request comment)

flop25 wrote:

so the album is private, and the plugin displays the representative thumbnail : it's the own chosen by piwigo or a specific picture ?

I am just using the same logic as Piwigo for representative thumbnail.

One of the problem if the representative thumbnail is not set, maybe the random photo is inappropriate for public (a reason I want to protect the album is contain nude photo).  But I will set the a  representative thumbnail to private album if I want to list it to public.

Offline

 

#4 2012-06-27 22:36:11

flop25
Piwigo Team
2006-07-06
7037

Re: Plugin to show private ablum thumbnail (request comment)

in 2.4 we introduce a new image by default : http://piwigo.org/dev/browser/trunk/the … nknown.png or you can use a generic image, representing a picture http://www.iconarchive.com/search?q=picture


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2012-06-28 18:08:20

fatman
Translation Team
2012-03-16
20

Re: Plugin to show private ablum thumbnail (request comment)

flop25 wrote:

in 2.4 we introduce a new image by default : http://piwigo.org/dev/browser/trunk/the … nknown.png or you can use a generic image, representing a picture http://www.iconarchive.com/search?q=picture

I want to keep a preset thumbnail from album photo, that seem a little bit awful when a lock icon appear on album listing suddenly.

BTW, though I can get all info in a query(ie, nb_images, date_last, max_date_last, count_images....), it maybe a heavy loading sql.  So I want to keep the info similar as the user_cache_categories, but I feel lost on trace where is piwigo update the table user_cache_categories? such as number of photo change, number of category change..... etc

Last edited by fatman (2012-06-28 18:23:05)

Offline

 
  •  » Extensions
  •  » Plugin to show private ablum thumbnail (request comment)

Board footer

Powered by FluxBB

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