[XB] Attachment Constraints Permissions

[XB] Attachment Constraints Permissions 2.0.3

No permission to buy ($10.00)
Compatible XF 2.x versions
  1. 2.2
  2. 2.3
License
Single Use License (may be used on one website)
Updates duration
1 year
Visible branding
No
banner.webp


Set XenForo upload limits for attachments, avatars, and profile banners through user group and forum permissions.

Give different groups their own file size and image dimension limits, control attachment counts, and override post attachment limits in individual forums. Upload hints help members see the limits that apply to them.


Features:​

  • 📎 Attachment Limits: Set maximum file size, image width and height, and the number of attachments per message.
  • 🔒 Forum Permissions: Configure post attachment limits for individual forums, with optional fallback to general permissions.
  • 🎬 Video and Audio Size Limits: Set a separate maximum file size for video and audio attachments when these uploads are enabled in XenForo options.
  • 👤 Avatar Limits: Define maximum avatar file size, width, and height through permissions.
  • 🎨 Profile Banner Limits: Define maximum profile banner file size, width, and height through permissions.
  • 📐 Oversized Image Handling: Choose whether images exceeding the allowed dimensions are rejected instead of resized to fit.
  • 🖼 Permission-Based Browser Resizing: Optionally resize attachment images before upload using the effective user group and forum limits instead of global dimensions.
  • 💡 Upload Hints: Show attachment file size and image dimension limits near the upload controls, plus a separate video size limit when it differs. Avatar and profile banner forms also display file size hints.

Configuration:​

Configure the add-on's numeric permissions for user groups and, for post attachments, forum permissions. File sizes are entered in KB; image dimensions are entered in pixels.

The following settings are available under Options > Attachments:

  • 🔒 Fallback to general permissions: Enabled by default. When a forum-specific attachment limit is not set, use the corresponding general permission. Disable this option to fall back to XenForo attachment options instead.
  • 📐 Reject attachment uploads exceeding maximum attachment image dimensions: Disabled by default. Enable this to reject oversized images instead of resizing them to fit the configured dimensions. This applies to attachment, avatar, and profile banner uploads only; uploads handled by other add-ons are resized as usual.
  • 👤 Check dimensions of directly supplied avatars and profile banners: Disabled by default. Enable this to apply dimension limits to new images supplied outside upload forms, such as connected-account avatars. File size checks still apply when this option is disabled.
  • 🖥️ Use the server upload limit when no size limit is set: Disabled by default. Enable this to use the maximum upload size allowed by the server as the effective limit, and show it in upload hints, when no file size limit is configured.
  • Resize images in the browser using permission limits: Disabled by default. Enable this to resize attachment images using the effective dimensions for the current user and forum. If oversized image rejection is enabled, browser resizing is disabled so the server can check the original dimensions. This setting does not affect avatar or profile banner uploads.
Upload forms always apply the configured file size and dimension limits. Existing avatars and profile banners are excluded from these upload-limit checks when XenForo reloads them for recropping or optimization.

Unset attachment limits fall back to XenForo options, subject to the forum fallback setting above. Unset avatar and profile banner limits are not restricted, as in XenForo. An unlimited permission value does not bypass the corresponding XenForo limit.


Browser-side image resizing notice:​

By default, XenForo may resize images to global dimensions before upload, regardless of group or forum limits. The add-on checks the resized file, so larger allowances cannot preserve original dimensions, and oversized originals may pass rejection checks.

Enable Resize images in the browser using permission limits to use the effective attachment dimensions instead. Images keep their proportions and are not enlarged. Formats skipped by XenForo's browser resizing, such as GIF and WebP in XenForo 2.3, are handled by the server. Server-side validation remains active, and resizing does not guarantee that a file meets its file size limit.


Requirements:​

  • 🔧 XenForo 2.2.0 or later.

Useful for:​

  • 👥 Membership Tiers: Offer larger attachment allowances to selected user groups.
  • 📂 Dedicated Upload Forums: Allow larger images or more attachments in forums intended for galleries, support, or project discussions.
  • 🎨 Profile Image Policies: Set avatar and profile banner limits appropriate for your community.

Screenshots:​

Options​

admin_options.webp
Configure permission fallback and image upload handling.​

Permissions​

permissions.webp
Configure upload limits through XenForo permissions.​

Attachment Uploads​

pub_quick_reply_max_size.webp
The attachment uploader displays the effective file size limit.​
pub_quick_reply_max_dimensions.webp
Oversized images are rejected when dimension rejection is enabled.​
error_min_attachments.webp
Attachment count limits are enforced when submitting content.​

Avatar Uploads​

pub_avatar_upload.webp
The avatar upload form displays the maximum file size.​
pub_avatar_upload_error.webp
Avatars are checked against the configured upload limits.​

Profile Banner Uploads​

profile_banner_upload.webp
The profile banner upload form displays the maximum file size.​
Author
Painbaker
Views
3,554
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Painbaker

Latest updates

  1. 2.0.3

    Added an optional dimension check for avatars and profile banners supplied outside standard...
  2. 2.0.2 Patch Level 1

    Fixed template modification apply on XF 2.3.10
  3. 2.0.2

    Feature: show max image dimensions and hide max video size if it's same as max attachment size
Back
Top Bottom