Announcement

#1 2017-10-28 12:57:54

bonhommedeneige
Member
France
2013-05-03
29

[Plugin] Share Album

Hi everyone,

I've released version 0.1 of the Share Album plugin, which gives the capacity to simply share a private album to others, for my usage, a killing feature for our much appreciated Piwigo platform. I previously used Event Cats for such a feature, but as it seems not maintained anymore I proposed to start again from scratch for a new and simpler to use version.
It is in its early days from now but is functional.

Here is a complete description.
From each private album, there's a new "Share" sub menu displayed on the category (album) page.
From this menu, you can share this album.
One shared, you are provided with a unique http(s) link giving access to this album.

Behind the scene :
* A unique Piwigo user is created with a random password assigned. By default, user type is set to 'generic'
* This user is granted to browse the selected (and only) category album. When logging with the specific link, the user is logged in and redirected

Requirements to share an album :
- The share function can only be managed by Administrator users
- The share function is only available for private albums

My todo list / Upcoming features
* Event handler on user deletion to remove the associated album share (in case of deletion of a auto generated user by an administrator)
* Cleanup code, better error handling
* An decent administration / configuration interface
    * List of the currently shared albums and associated actions (regenerate link, cancel share)
    * Option to remove the menus from user interface, especially to hide Identification menu
* Option to share an album for n days instead of forever
* A sanity check function which checks that shared albums, associated users, users granted visibility, etc... are coherent

I encourage you to test (including security tests) and give feedback, corrections or enhancements suggestions ! Thanks in advance for any feedback.

Arnaud

Piwigo version: 2.9
Plugin URL: http://piwigo.org/ext/extension_view.php?eid=865

Last edited by bonhommedeneige (2017-10-28 14:09:03)

Offline

 

#2 2017-10-28 14:39:00

ceinmart
Member
2017-08-17
14

Re: [Plugin] Share Album

Hi Arnaud ,

Today I was looking exactly for that!!! :)
Just in time!

I did install the plugin at my Piwigo , but when I try to activate it give the error below :

Fatal error: Uncaught Error: Class 'extension_865_maintain' not found in /home/imartins/public_html/fotos/admin/include/plugins.class.php:96 Stack trace: #0 /home/imartins/public_html/fotos/admin/include/plugins.class.php(128): plugins::build_maintain_class('extension_865') #1 /home/imartins/public_html/fotos/admin/plugins_installed.php(73): plugins->perform_action('activate', 'extension_865') #2 /home/imartins/public_html/fotos/admin/plugins.php(46): include('/home/imartins/...') #3 /home/imartins/public_html/fotos/admin.php(311): include('/home/imartins/...') #4 {main} thrown in /home/imartins/public_html/fotos/admin/include/plugins.class.php on line 96

Any tips ?

Piwigo 2.9.2
Operating system: Linux
PHP: 7.1.10 (Show info) [2017-10-28 10:37:24]
MySQL: 5.6.36-cll-lve [2017-10-28 10:37:24]
Graphics Library: ImageMagick 6.9.4-10

Offline

 

#3 2017-10-29 00:47:49

bonhommedeneige
Member
France
2013-05-03
29

Re: [Plugin] Share Album

Hi ceinmart,

The plugin is badly packaged, it installs in the plugins/extension_865 directory.
Simply rename the extension_865 into ShareAlbum and it will install properly.
I now have fixed the package with version 0.2, happy testing !
Arnaud

Last edited by bonhommedeneige (2017-10-29 00:56:01)

Offline

 

#4 2017-10-30 00:16:32

ceinmart
Member
2017-08-17
14

Re: [Plugin] Share Album

bonhommedeneige wrote:

Hi ceinmart,

The plugin is badly packaged, it installs in the plugins/extension_865 directory.
Simply rename the extension_865 into ShareAlbum and it will install properly.
I now have fixed the package with version 0.2, happy testing !
Arnaud

Thanks! works!
Now it is activated, let test!!

About this issue , is piwigo issue ?
Should I report to piwigo guys ?

Offline

 

#5 2017-10-30 06:42:01

bonhommedeneige
Member
France
2013-05-03
29

Re: [Plugin] Share Album

No, nothing to report, it was my bad.
Arnaud

Offline

 

#6 2017-11-28 23:19:15

bonhommedeneige
Member
France
2013-05-03
29

Re: [Plugin] Share Album

Hi all,

Plugin was enhanced quite a lot. It is now completely functional and contains an upgraded admin interface as well that lists shared albums and number of visits for each.
I wish you happy usage !
Arnaud (bonhommedeneige)

Offline

 

#7 2017-12-13 15:17:31

deheme
Member
IDF
2014-12-12
89

Re: [Plugin] Share Album

Bonjour Mr Bonhomme de neige,

I've got a little issue, temporary error messages before my shared album is loaded.

See here : http://galerie.deheme.com/?xauth=ouznvaytqoDu and sreenshot below.

Thank you and sorry for my frenglish, I guess Arnaud will get it!

Enjoy!
DéHème



    Piwigo 2.9.2
    Système d'exploitation: Linux
    PHP: 7.0.26 (Montrer les informations) [2017-12-13 14:50:40]
    MySQL: 5.5.5-10.0.33-MariaDB [2017-12-13 14:50:40]
    Bibliothèque graphique: External ImageMagick 6.7.2-7
    Darkroom


Uploaded Images

Last edited by deheme (2017-12-13 15:50:38)

Offline

 

#8 2017-12-13 22:12:58

bonhommedeneige
Member
France
2013-05-03
29

Re: [Plugin] Share Album

Hi / Salut !

Did you go through an upgrade of a previous version or did you install ShareAlbum from scratch ?

Merci
Arnaud

Offline

 

#9 2017-12-13 22:29:17

deheme
Member
IDF
2014-12-12
89

Re: [Plugin] Share Album

bonhommedeneige wrote:

Did you go through an upgrade of a previous version or did you install ShareAlbum from scratch ?

As far as I remember it is an upgrade of the very first version.

Enjoy!
DéHème

Offline

 

#10 2017-12-13 22:33:17

bonhommedeneige
Member
France
2013-05-03
29

Re: [Plugin] Share Album

Ok ! If possible, could you uninstall it completely, re download and install (you will then loose your existing shares)
Thanks for the feedback
Arnaud

Offline

 

#11 2017-12-13 23:23:06

deheme
Member
IDF
2014-12-12
89

Re: [Plugin] Share Album

It did the trick, thank you : http://galerie.deheme.com/?xauth=tGuotqjxsbhe

As a side effect, the existing shares disappeared, but not the share-users.

By the way, could you create a group for the shared users?
In addition it would be nice to get the active links in the plugin administration in the active shares list and be able to renew or suppress the links from there.

Regards.

Enjoy!
DéHème

Offline

 

#12 2017-12-13 23:57:35

bonhommedeneige
Member
France
2013-05-03
29

Re: [Plugin] Share Album

deheme wrote:

As a side effect, the existing shares disappeared, but not the share-users.

The version you had did not have the deletion of users, it's now a feature.

deheme wrote:

By the way, could you create a group for the shared users?

Good idea, I logged a feature on Github not to forget it in future enhancements ([Github] piwigo-ShareAlbum issue #29)

deheme wrote:

In addition it would be nice to get the active links in the plugin administration in the active shares list and be able to renew or suppress the links from there.

It was already in the plans for a future version, you have just convinced me.

By the way, congratulations for your photos, I had a tour on your pictures and am simply impressed ! Beautiful, you're talented !

Good that it works !

Offline

 

#13 2017-12-19 17:29:26

deheme
Member
IDF
2014-12-12
89

Re: [Plugin] Share Album

Hello Mr bonhommedeneige,

May I ask the question of album/sub-albums sharing? I made some tries and I do not understand well. What is the current / future expected behaviour.
As far as I understood, in Piwigo, when an album is authorised to a user, the "father" is also automatically authorised for this user, this is not apparently the case within share album.

Thanks a lot for the clarification.

By the way, it should be nice, when an album is shared that the link is ipso-facto copied in the clipboard.

Regards.

Enjoy!
DéHème

Offline

 

#14 2018-04-23 15:37:10

deheme
Member
IDF
2014-12-12
89

Re: [Plugin] Share Album

Hello Mr Bonhommedeneige, did you come back from skiing?
Regards...

Enjoy!
DéHème

Offline

 

#15 2018-04-23 16:22:06

bonhommedeneige
Member
France
2013-05-03
29

Re: [Plugin] Share Album

Hi,

Sure and sorry for the late reply, I read your initial post and forgot to reply....
For albums/sub-albums subject, the implemented behavior is to share the one and only album (aka category), not the whole tree. The objective of the plugin is to share a unique 'instant' / album, not a whole directly (which would then be more practical defining a declared user with a password ans appropriate rights).

Good point for the auto copy to clipboard. I tried to implement it but there is a security restriction within the library which prevents the link to be automatically copied. Choux blanc :)

Cheers

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact