[OzzModz] Attachment Constraints Permissions

[OzzModz] Attachment Constraints Permissions [Paid] 2.0.0

No permission to buy ($15.00)
I don't think so, or at least I haven't been unable to find attachment file size limits per user group. It's a shame, I think this was built into vb if I remember correctly.
It was built into VB as a setting. You could give a user group a certain max allowed Attachment size and also set a maximum allowed disk space for attachments that a user group could have. I have different levels of paid subscriptions and the higher the level, the more attachment space you could have (the top level being no limit). If someone exceeded their max allowed attachment space, they would need to go into their settings and delete some attachments before they could upload additional attachments.
 
Hello,

I installed the addon, but I get the error "Oops, an error has occurred" when I save the limits. I have nothing in the error log in admincp.
Thanks for your help.
 

Attachments

  • Capture d’écran 2021-05-02 à 17.30.59.webp
    Capture d’écran 2021-05-02 à 17.30.59.webp
    60.7 KB · Views: 14
Hi,

It would be great to have more flexibility for different usergroups. Both in image size (KB) and size in Pixel.

Plus the ability to restrict per usergroup how many images they are allowed to upload or embed per week.

I have different levels of paid subscriptions and the higher the level, the more attachment size you could have.

But at the same time I need restrictions on a weekly basis, because some users are throwing hundreds of images at a forum and other's images do not get enough attention.

Restrictions on disk space do not help here, because these people will just shrink their KB per image and continue as before.
 
@Ozzy47

I have a problem to understand the hierarchy for the permissions available in this addon. I just bought and installed it and found out, that there are 4 different areas within ACP to enter limitations:

1. The usual attachment settings of XF

XF_ACP_attachment_limitations.webp


2. In ACP/addons/options

OzzModz_attachement_contraints_permissions_options_addons.webp


3. In ACP/usergroup permissions for each usergroup individually (thanks to this addon)

OzzModz_attachement_contraints_permissions_usergroup_settings.webp


4. In ACP/forums/nodes/usergroup (thanks to this addon)

OzzModz_attachement_contraints_permissions_subforum_settings.webp



A. Where do I have to put what kind of limitations that it is not in conflict with each other?

B. Do the settings in #1 need to be the highest, because otherwise the usergroup settings of #3 and #4 do not work?

C. What does the text in #2 mean? I do not have only node-focused options. I do also have the general options for each usergroup in #3, without differentiating between the different nodes. Is the text not up to date or do I misunderstand here something?
 
Last edited:
And the suggestion to add the option to restrict on a weekly basis the number of uploads, because some users are throwing hundreds of images at a forum. Due to this other's images do not get enough attention.

Restrictions on disk space or per message do not help here, because these people will just shrink their KB per image and continue as before with several messages. It is the attention to other's images I want to rescue by not showing too many images of one user only at the same time period.
 
@Ozzy47

I tested this with one usergroup, but the addon settings seem not to work properly.

The group "registered users" has in their usergroup settings (setting #3 above) max. 500KB and 1600x1600 pixel.

In the general attachment settings in ACP (settings #1 above) no video uploads are allowed.


But when a test user wants to upload an image, this is shown:

OzzModz_attachement_contraints_permissions_wrong_video_settings.webp

Where can I disable this video upload option? I would have thought, that the general settings in ACP forbid this as the "master rule"?

Additionally, you see the 500KB file size in the screenshot above as the max allowed file size for that usergroup in ACP. But when a user of that usergroup uploads an image with i.e. 750KB, it still gets uploaded successfully. Even a 3.5MB file with over 3500 pixel is uploaded successfully. This should not be the case. How can I correct this?

PS: I just found out, that there is a second possibility within the usergroup permissions to enter limitations. In the subsection "forum permissions". So ACP/usergroup permissions/registered users/ scroll down to "forum permissions". But my changes there did not change anythig. The same bug as before.

OzzModz_attachement_contraints_permissions_usergroup_settings2.webp
 
Last edited:
XF 2.2.15

@Ozzy47

I have a problem to understand the hierarchy for the permissions available in this addon. I just bought and installed it and found out, that there are 4 different areas within ACP to enter limitations:

1. The usual attachment settings of XF

View attachment 301750


2. In ACP/addons/options

View attachment 301749


3. In ACP/usergroup permissions for each usergroup individually (thanks to this addon)

View attachment 301751


4. In ACP/forums/nodes/usergroup (thanks to this addon)

View attachment 301752



A. Where do I have to put what kind of limitations that it is not in conflict with each other?

B. Do the settings in #1 need to be the highest, because otherwise the usergroup settings of #3 and #4 do not work?

C. What does the text in #2 mean? I do not have only node-focused options. I do also have the general options for each usergroup in #3, without differentiating between the different nodes. Is the text not up to date or do I misunderstand here something?

And the suggestion to add the option to restrict on a weekly basis the number of uploads, because some users are throwing hundreds of images at a forum. Due to this other's images do not get enough attention.

Restrictions on disk space or per message do not help here, because these people will just shrink their KB per image and continue as before with several messages. It is the attention to other's images I want to rescue by not showing too many images of one user only at the same time period.

@Ozzy47

I tested this with one usergroup, but the addon settings seem not to work properly.

The group "registered users" has in their usergroup settings (setting #3 above) max. 500KB and 1600x1600 pixel.

In the general attachment settings in ACP (settings #1 above) no video uploads are allowed.


But when a test user wants to upload an image, this is shown:

View attachment 301753

Where can I disable this video upload option? I would have thought, that the general settings in ACP forbid this as the "master rule"?

Additionally, you see the 500KB file size in the screenshot above as the max allowed file size for that usergroup in ACP. But when a user of that usergroup uploads an image with i.e. 750KB, it still gets uploaded successfully. Even a 3.5MB file with over 3500 pixel is uploaded successfully. This should not be the case. How can I correct this?

PS: I just found out, that there is a second possibility within the usergroup permissions to enter limitations. In the subsection "forum permissions". So ACP/usergroup permissions/registered users/ scroll down to "forum permissions". But my changes there did not change anythig. The same bug as before.

View attachment 301754

@Painbaker will answer you as soon as possible.
 
A. Where do I have to put what kind of limitations that it is not in conflict with each other?
B. Do the settings in #1 need to be the highest, because otherwise the usergroup settings of #3 and #4 do not work?
You should set the maximum values in the ACP options, as it's possible incompatible addons will listen to them rather than the addon permissions
XF option values also be a fallback for those permissions where you set "Unlimited"

C. What does the text in #2 mean? I do not have only node-focused options. I do also have the general options for each usergroup in #3, without differentiating between the different nodes. Is the text not up to date or do I misunderstand here something?
This is a specific option that allows you to disable the fallback to "General permissions" and return a value from the options if the content-dependent permission is not set.

Example: You haven't set or set to 0 "Maximum attachment file size (KB)" forum permission (not "general" permission)
If this option is enabled (by default), this will return the value of "Maximum attachment file size (KB)" permission value from "general" permissions.
If off, returns the value from the XF options


In the general attachment settings in ACP (settings #1 above) no video uploads are allowed.
This is a bug, will be fixed in a coming update

Additionally, you see the 500KB file size in the screenshot above as the max allowed file size for that usergroup in ACP. But when a user of that usergroup uploads an image with i.e. 750KB, it still gets uploaded successfully. Even a 3.5MB file with over 3500 pixel is uploaded successfully. This should not be the case. How can I correct this?

PS: I just found out, that there is a second possibility within the usergroup permissions to enter limitations. In the subsection "forum permissions". So ACP/usergroup permissions/registered users/ scroll down to "forum permissions". But my changes there did not change anythig. The same bug as before.

Make sure the group actually has this limit using permission analyze tool:
/admin.php?permissions/analyze

Also make sure that the uploaded file actually has a weight and resolution greater than allowed - the image could probably have been resized or optimised by XF or third party add-ons
 
Make sure the group actually has this limit using permission analyze tool:
/admin.php?permissions/analyze

I just checked. Settings for that usergroup are correct. 1600x1600, max 500KB.

You should set the maximum values in the ACP options, as it's possible incompatible addons will listen to them rather than the addon permissions
XF option values also be a fallback for those permissions where you set "Unlimited"

  • I have the attachment settings in XF ACP as shown in the first screenshot in my earlier posting (#32) to 1600 pixel width, no restriction for the height and max 4MB. Videos not allowed.
  • In ACP/Usergroup/General Permissions and Forum Permissions I have the same values for your addon: 1600x1600 and max 500KB, no videos. See screenshot above in my earlier postings.
  • In ACP/addons/options, I have checked the box for "permission based limits behaviour" as shown in the screenshot in my earlier posting.

Looking at these 3 settings, the addon should not allow that usergroup to upload bigger images in size (Pixel) than 1600x1600 and 500KB max.

Also make sure that the uploaded file actually has a weight and resolution greater than allowed - the image could probably have been resized or optimised by XF or third party add-ons
@Painbaker

This part I do not understand. Your addon should avoid any kind of XF automatism and changes to that image. I do not want XF to resize something. This is the whole point to buy your addon.

The limitation-check needs to apply before XF starts changing something on the file. The whole purpose of these limitations is that I do not want to allow that usergroup to use a file bigger than the addon limitation settings for that usergroup.

This is also shown to the user with the 500KB hint next to the upload field (the pixel size is missing there by the way)

OzzModz_attachement_contraints_permissions_next_to_upload_button.webp

If your addon first allows everything, then sees what XF makes out of that file and eventually allows it at the end although the file was originally too big, but XF shrinked it strong enough, than the users will never feel the need to shrink the file themselves beforehand and will neither be motivated to become a premium member with more privileges.

Additionally the image quality will suffer, because XF will never be able to achieve the same image quality while shrinking than a professional photo editing software, which is not good for the overall impression.
 
Last edited:
Top Bottom