Skip to main content
[ADDON] Levertine Gallery Started by Spuds · · Read 72254 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Re: Levertine Gallery

Reply #45

Thank you Spuds! I just tested and the images are correctly resized for registered users. Is there a way to set quotas also for admins and moderators?
sorry for my bad english

 

Re: Levertine Gallery

Reply #46

Nicely done :)

One thought: if you're going to do client side resampling, it might be best to make this configurable in the case that someone wants their photo to be uploaded unchanged (e.g. photography forum, technical forum uploading a huge diagram etc.) - I originally tested this stuff with 20MB JPEG files (required 350MB RAM to resize on the server) because one of the original users wanted their paid commission art to be uploaded without changes.

Sorry you had to fix strict mode stuff... but in 2014 when this was written, strict mode wasn't a thing :(

Re: Levertine Gallery

Reply #47

Thanks for the update @Spuds‍ 

The gallery manager membergroup issue is resolved. 

Does the resize occur client side, or server side? The upload makes it appear to occur server side? 

Would it be possible to apply quotas to gallery managers as well? Managers images won't be resized as quotas do not apply to them. Or I'm doing it wrong. ;D

Re: Levertine Gallery

Reply #48

The original point was that quotas shouldn't apply to managers - they're there to manage the thing and experience suggests that admins/similarly empowered users in the right context shouldn't just have limits applied to them because it tends to be confusing.

But I may be misremembering how it was originally implemented vs whatever may have been changed in this version.

Re: Levertine Gallery

Reply #49

Quote from: radu81 – Thank you Spuds! I just tested and the images are correctly resized for registered users. Is there a way to set quotas also for admins and moderators?
Admins are basically limitless right now in terms of permissions and quotas.  I'm sure it possible to add quota to admins, I'm just not sure how much work that would be ATM. 
Moderators are really a board permissions group.  There can't be many moderators so I think you could add a new member group and simply add moderators to that as well.  Then set the quota for the moderators gallery group.  I think that would work.
Quote from: badmonkey – Does the resize occur client side, or server side? The upload makes it appear to occur server side?
Thats all server side manipulation at this time. 
Quote from: badmonkey – Would it be possible to apply quotas to gallery managers as well? Managers images won't be resized as quotas do not apply to them. Or I'm doing it wrong. ;D
I think once you are assigned as a manager you are given admin like permissions.  So this is somewhat a variation of radu81's question as well.   Bit of a trust but verify thing :D  I think it would be easier to set the quotas and permissions for that manager group instead of making them managers.  You can get almost all (maybe even all)  of the capabilities assigned that way and have your quotas.
Quote from: Arantor – Nicely done :)

One thought: if you're going to do client side resampling, it might be best to make this configurable in the case that someone wants their photo to be uploaded unchanged (e.g. photography forum, technical forum uploading a huge diagram etc.) - I originally tested this stuff with 20MB JPEG files (required 350MB RAM to resize on the server) because one of the original users wanted their paid commission art to be uploaded without changes.

Sorry you had to fix strict mode stuff... but in 2014 when this was written, strict mode wasn't a thing :(
Thanks, it was all actually a quite a bit of fun! (well maybe not the old template markup :P)   Good points on the client side resize, right now it should only change images that are over quota but I need to do more testing, especially with very large files.

Re: Levertine Gallery

Reply #50

Quote from: Arantor – The original point was that quotas shouldn't apply to managers - they're there to manage the thing and experience suggests that admins/similarly empowered users in the right context shouldn't just have limits applied to them because it tends to be confusing.

But I may be misremembering how it was originally implemented vs whatever may have been changed in this version.
That should all be the same, once in the lgal_manage group you are set free.

The only permission item/group I changed/add was allowing the selection of group "0" to allowed ownership groups.  I have not centralized that update just yet.  I added first to see how many times empty() would poke me and that change was also the cause of the error @badmonkey reported as I sorted but did not keep the keys intact  :-[

Re: Levertine Gallery

Reply #51

Updated the first post with todays updates. 

changed the admin menu icons to match the rest of elk,
changed the way bulk upload errors are displayed
prevent the upload from starting (for valid files) when an error occurred queueing a bad file
misc css tweaks

Re: Levertine Gallery

Reply #52

You're too fast Spuds, I didn't had time to test the previous version and now there is a new one :D

Don't know if it's easy to fix but I report it: on mobile the blocks on the right should go on bottom

P.S. @Spuds in the future, if you'll make chages to language files can you please warn in this topic? Thank you

Re: Levertine Gallery

Reply #53

I've been slow on doing any mobile testing, need to start looking at that.  I'll try to remember on the language tweaks/adds
Last Edit: April 12, 2021, 11:32:20 am by Spuds

Re: Levertine Gallery

Reply #54

Quote from: Spuds – The only permission item/group I changed/add was allowing the selection of group "0" to allowed ownership groups.  I have not centralized that update just yet.  I added first to see how many times empty() would poke me and that change was also the cause of the error @badmonkey reported as I sorted but did not keep the keys intact  :-[

In the original model, 0 for ownership was for 'site ownership' so that if people deleted accounts or left groups, the content wouldn't just disappear into the ether. I vaguely remember the model supporting ownership by group (not handled the same way) but it's been a very, very long time and I am probably misremembering.

I know I specifically built it to support multiple shared ownership at the account level, and/or ownership by a single group. I'm not sure what you'd need to change there unless you wanted to allow owner-by-multiple-groups and even then I think there might be easier ways to do that by expanding the block of data for album ownership rather than trying to repurpose owner id - again if memory serves. The main drama of multi ownership is the fact that multiple owners imply multiple hierarchies in which an album can live, something coped for with multiple account owners, but not group owners.

Re: Levertine Gallery

Reply #55

First post updated with a version that adds some basic media queries for better mobile support

Re: Levertine Gallery

Reply #56

Quote from: Arantor – In the original model, 0 for ownership was for 'site ownership' so that if people deleted accounts or left groups, the content wouldn't just disappear into the ether. I vaguely remember the model supporting ownership by group (not handled the same way) but it's been a very, very long time and I am probably misremembering.
At first I though site ownership would be to allow anyone to be able to read/write to that album but then realized that it was intended as you describe.  From what I've seen only gallery managers/admin can write items to a site owned album.  I did my best to verify behaviors on a test smf 2.0 site with levgal and compare the interaction with the elk version.

Quote from: Arantor – I know I specifically built it to support multiple shared ownership at the account level, and/or ownership by a single group. I'm not sure what you'd need to change there unless you wanted to allow owner-by-multiple-groups and even then I think there might be easier ways to do that by expanding the block of data for album ownership rather than trying to repurpose owner id - again if memory serves. The main drama of multi ownership is the fact that multiple owners imply multiple hierarchies in which an album can live, something coped for with multiple account owners, but not group owners.
What I did was add group 0 to the allowed owner group list,  My though was  I did not see a way to have an album that any "registered" members could read and write to.  One could add all valid members to an approved group, or if using post count groups expose those group names, but that IMO starts to get a bit overwhelming for a typical user.   Perhaps another way would be to have a simple join/request group for that.   I'm not sure one would really want an open album like group 0 membership implies.

Re: Levertine Gallery

Reply #57

Quote from: tino – The add new Album link doesn't appear to work, also the tick and cross for the GD / Imagik are a bit large ;-)

I'll look at it more later, the TinyPortal stuff will need a slight change but I can do that when I get the chance as its 01:00 here and I need sleep.

I just tried this on two installs, both on different servers and both 1.1.6 - 1.1.7 then levgal, I'm seeing exactly the same issues as you were tino.   This is with or without TP installed.  No errors in log.

From the media dropdown menu the only buttons that do anything are the "My Media" ones, all the others just return me to the forum index.  And as you mentioned, also the tick and cross for the GD / Imagik are huge when you install it.

Re: Levertine Gallery

Reply #58

Quote from: Spuds – You can have sub albums.  What you need to do is add a few albums under a user or group or ownership level.

Then when you view the albums of that user or group you will see on the side an arrange albums option, choose that.  You are now in a drop and drag interface like in the manage boards area of the APC.  Simply drag an album towards the right and drop in on the album you want it to be a child of.  You can have many levels as well.

The album order shown here is maintained, so its up to you to sort them however you want and that is how they will be displayed.

ETA:  that D&D is not ajax, so arrange it like you want and click save !
Not very intuitive...  :-\ and I get an error if I try to view and album with 2 sub-albums.
Screenshot_2021-04-13 Viewing album.png
in Elkarte error log:
    Tipo di errore: Generale
    Warning: Invalid argument supplied for foreach()
    /index.php?action=media;sa=album;item=7
    File: /themes/default/levgal_tpl/LevGal-Album.template.php
    Line: 45
I am using the latest version of Levgal
sorry for my bad english

Re: Levertine Gallery

Reply #59

Quote from: lurkalot –
Quote from: tino – The add new Album link doesn't appear to work, also the tick and cross for the GD / Imagik are a bit large ;-)

I'll look at it more later, the TinyPortal stuff will need a slight change but I can do that when I get the chance as its 01:00 here and I need sleep.

I just tried this on two installs, both on different servers and both 1.1.6 - 1.1.7 then levgal, I'm seeing exactly the same issues as you were tino.   This is with or without TP installed.  No errors in log.

From the media dropdown menu the only buttons that do anything are the "My Media" ones, all the others just return me to the forum index.  And as you mentioned, also the tick and cross for the GD / Imagik are huge when you install it.

I had to install the latest 1.1.7 patch then install levertine for it to work. I never worked out why it failed initially as is just worked then.

Check to make sure the permissions on the directories are ok. I think the css issue was due to the minify css not being refreshed.