Better Gallery - About

Started by admin, Aug 10, 2026, 08:19 PM

Previous topic - Next topic

admin

Better Gallery is a full media, gallery, download, resource, and portfolio system for SMF 2.1.7.

What began as Better Gallery grew into something much broader: a flexible media platform that can handle images, video, restricted content, reactions, comments, favorites, and member-owned albums while remaining fully integrated with SMF permissions and administration.

The goal is simple:

Give SMF a proper media system instead of forcing everything through forum attachments.

  • Main Features
  • Image galleries
  • Video galleries
  • Album categories
  • Portfolio Mode
  • Secure protected storage
  • Album search and filtering
  • Album sorting and pagination
  • Album covers
  • Multiple album access modes
  • Separate discovery and access controls
  • Request Access workflow
  • Member storage quotas
  • Image thumbnails
  • Camera/EXIF orientation correction
  • Video poster generation
  • FFmpeg/ffprobe support
  • Protected video streaming with byte ranges
  • Album ZIP downloads
  • Favorites
  • Album likes
  • Media likes
  • Media comments
  • Reporting and moderation tools
  • Unique view counts
  • Download counts
  • Bulk media operations
  • Maintenance and cleanup tools
  • Optional Better Reactions integration
  • Custom navigation identity
  • Theme-safe template and language fallback
  • Upgrade-safe settings and permissions
  • Safe non-destructive uninstall
  • More Than a Gallery

Better Media is not limited to photographs.

Administrators can choose how the system should behave using built-in Content Profiles.

Gallery

Designed primarily for:

  • Images
  • Video
Downloads

Designed for:

  • ZIP
  • RAR
  • 7Z
  • Documents
Resources

Designed for:

  • Images
  • Documents
  • Archives
Media Hub

Enables the complete built-in safe catalog.

Custom

Allows the administrator to explicitly select which supported file extensions should be accepted.

This means the same MOD can be used as a traditional photo gallery, a software download area, a resource library, a media center, or a combination of all of them.

Safe File Catalog

Better Media includes a controlled safe catalog of supported file types.

Images
  • JPG
  • JPEG
  • PNG
  • GIF
  • WebP
Video
  • MP4
  • WebM
  • MOV
  • MKV
Audio
  • MP3
  • WAV
  • OGG
  • FLAC
Documents
  • PDF
  • TXT
Markdown
  • CSV
  • JSON
  • XML
  • DOC / DOCX
  • XLS / XLSX
  • PPT / PPTX
Archives
  • ZIP
  • RAR
  • 7Z

Executable and script types are intentionally excluded from the built-in catalog.

The server validates both the extension and detected MIME type rather than trusting the filename alone.

Albums and Categories

Members with permission can create and manage their own albums.

Albums can contain:

  • Title
  • Description
  • Category
  • Cover image
  • Media items
  • Access rules
  • Discovery rules
  • Comments
  • Likes
  • Download controls

Administrators can create and manage gallery categories from the Better Media administration area.

Discovery and Access Are Separate

One of the core design ideas behind Better Media is that being able to see that an album exists does not automatically mean being able to open its contents.

Albums can be:

  • Publicly discoverable
  • Discoverable but restricted
  • Hidden

A restricted album may still appear in search or browsing while the actual media remains protected.

Hidden albums remain hidden.

This allows forums to advertise restricted resources or private collections without exposing their contents.

Album Access Modes

Better Media supports several access models:

  • Public
  • Logged-in members
  • Approved members
  • Password protected
  • Approved member OR password
  • Invitation only

Album passwords use PHP's secure password hashing functions.

Plaintext album passwords are never stored.

Request Access

Restricted albums can optionally support a Request Access workflow.

Members may submit an access request along with an optional message.

The album owner or a gallery moderator can then:

  • Approve the request
  • Deny the request

Approved requests create a persistent access grant for that member.

Protected Media Storage

Better Media uses its own media tables and storage system rather than pretending gallery items are forum post attachments.

Files are stored in protected directories and served through permission-aware Better Media endpoints.

This means direct file URLs do not bypass album permissions.

Protected storage includes areas for:

  • Original images
  • Thumbnails
  • Videos
  • Poster images
  • Generic files
  • Temporary album download ZIPs
  • Image Uploads

Better Media supports multi-file image uploads.

Images are validated server-side for:

  • File type
  • MIME type
  • File size
  • Image dimensions

JPEG camera orientation metadata is also normalized so phone photos do not appear sideways or upside down after upload.

Automatic Thumbnails

Images receive proportional thumbnails automatically.

Administrators can configure:

  • Thumbnail width
  • Thumbnail height
  • Maximum image size

The original image remains protected while the gallery can display optimized derivatives.

Video Support

Better Media supports browser-native:

  • MP4
  • WebM

When FFmpeg and ffprobe are available, Better Media can also handle:

  • MOV
  • MKV

These formats can be normalized into browser-friendly H.264/AAC MP4.

FFmpeg can also generate poster-frame images for uploaded videos.

Video Streaming

Videos are served through Better Media's protected media endpoint.

HTTP byte-range support allows normal browser video behavior such as:

  • Seeking
  • Scrubbing
  • Partial loading
  • Streaming

This keeps the video protected without sacrificing normal playback controls.

General File Downloads

Documents, archives, and audio files are stored separately from image/video derivatives and are presented as file cards rather than broken image placeholders.

Downloads still respect:

  • Album permissions
  • Album access rules
  • Allow Downloads setting
  • Upload Queue

Better Media includes a dedicated uploader with configurable queue behavior.

Administrators can choose between:

  • Compact overall progress
  • Per-file progress

The uploader includes:

  • Queue count
  • Upload progress
  • Clear Queue
  • File validation
  • File-size checks
  • Extension checks

Files are uploaded sequentially, which also avoids depending on PHP's max_file_uploads value for one huge multipart request.

Member Storage Quotas

Administrators can optionally set a per-member storage quota.

A quota of 0 means unlimited storage.

Before accepting uploads, Better Media checks the member's existing usage against the configured allowance.

Media Management

Album owners and moderators can manage individual media items.

Available actions include:

  • Edit title
  • Edit description
  • Delete media
  • Set as album cover
  • Move selected media
  • Delete selected media

Bulk moves preserve associated data such as:

  • Comments
  • Likes
  • Favorites
  • Reports
  • Tags
  • Views
  • Downloads
  • Thumbnails
  • Posters

Only the album ownership relationship changes.

Album Covers

Any suitable image can be selected as an album cover.

If media is moved out of an album and it was being used as the cover, the source album's cover reference is cleared safely.

If a destination album does not already have a cover, Better Media can automatically adopt an appropriate moved image.

Favorites

Members can maintain personal favorites for:

  • Individual media items
  • Albums

Favorites are bookmarks and remain separate from public Likes or Reactions.

A dedicated My Favorites area gives members quick access to saved items.

Likes

Better Media includes native Like support for:

  • Media
  • Albums

Album and media Likes remain available even when Better Reactions is not installed.

Better Reactions Integration

When Better Reactions is installed, Better Media can hand reaction presentation over to it.

This provides richer reactions for:

  • Media items
  • Comments
  • Albums

Better Media's native thumbs-up Like remains the fallback when Better Reactions is unavailable.

Custom reactions and native Likes are handled so they do not create conflicting duplicate states.

Who Reacted

Reaction-enabled surfaces support professional reactor popovers displaying:

  • Reaction icon
  • Reaction name
  • Member
  • Profile link

These overlays are designed to remain usable inside the media viewer and album pages without being clipped by nested containers.

Comments

Media items can have comments when enabled globally and for the album.

The lightbox viewer includes a dedicated comment area so discussion can happen directly around the media rather than requiring a separate forum topic.

Comments can also participate in Better Reactions when that MOD is installed.

Reporting

Members can report gallery content.

Better Media includes a moderator report queue for handling reported:

  • Media
  • Comments

Moderators can review and resolve reports from the gallery system.

Media Viewer

Images and videos open in a dedicated Better Media viewer.

The viewer provides controls for things such as:

  • Full Size
  • Download
  • Favorite
  • Like / Reactions
  • Report
  • Comments

The viewer uses a deliberate dark presentation so images and video remain the visual focus.

Recent development also hardened these surfaces against active-theme CSS rules that might otherwise turn dark reaction trays, result chips, popovers, or the viewer itself white.

Media Statistics

Media cards can display useful statistics such as:

  • Views
  • Downloads
  • Likes
  • Comments

The presentation uses compact inline icons rather than long text labels.

Video duration, image dimensions, and file size are shown separately from engagement statistics.

Album Likes

Albums themselves can also be liked independently from media items.

With Better Reactions installed, album reaction results can appear directly alongside album controls.

Album ZIP Downloads

Albums that permit downloading can optionally be downloaded as ZIP archives when PHP's ZipArchive extension is available.

Large albums can be split into configurable archive parts.

This avoids trying to build one enormous ZIP file in memory or storage.

Download counters are updated only after the archive has been created successfully.

Search

Better Media includes permission-aware album discovery and search.

Search can match information such as:

  • Album title
  • Description
  • Owner name
  • Category

Users can also filter by category.

A dedicated option can limit results to albums the member can currently access.

Restricted discoverable albums may still appear while keeping their media locked.

Album Sorting

Album lists can be sorted by:

  • Featured / Recently Updated
  • Newest to Oldest
  • Oldest to Newest
  • Title A to Z
  • Title Z to A

Search, category, access filtering, sort order, and pagination are preserved together while browsing.

Pagination

Better Media includes pagination for both album lists and media lists.

Administrators can configure how many media items should appear per page.

Album lists also paginate to avoid extremely long gallery landing pages.

My Media Dashboard

Members have a personal media dashboard containing information such as:

  • Albums
  • Media
  • Storage usage
  • Likes received
  • Comments received
  • Favorites received

This gives creators a useful overview of their activity within Better Media.

Portfolio Mode

Better Media can also operate as a single-creator portfolio.

Administrators can select one SMF member as the portfolio owner and provide:

  • Portfolio title
  • Portfolio introduction
  • Portfolio owner

When enabled, public gallery discovery focuses on that member's albums while existing albums belonging to other members remain preserved.

This makes Better Media suitable for:

  • Photography portfolios
  • Art portfolios
  • Project showcases
  • Product galleries
  • Personal media sites

without needing a separate gallery package.

Custom Navigation Identity

Administrators can change the public Better Media navigation label.

Examples:

  • Media
  • Gallery
  • Downloads
  • Resources
  • Portfolio

A matching SVG menu icon can also be selected from built-in choices such as:

  • Gallery
  • Download
  • Package
  • Folder
  • Portfolio
  • Resource

The chosen identity is used consistently throughout public Better Media navigation and breadcrumbs.

Permissions

Better Media registers dedicated SMF membergroup permissions for:

  • View Better Media
  • Create and manage own albums
  • Upload media
  • Request album access
  • Moderate Better Media

This allows gallery access to follow normal SMF membergroup administration.

Better Media Administration

A dedicated Better Media administration area includes:

Dashboard

Displays environment and schema information.

Categories

Create, edit, organize, enable, and delete Better Media categories.

Settings

Controls options such as:

  • Upload limits
  • Image size limits
  • Video size limits
  • General file limits
  • Thumbnail dimensions
  • Comments
  • Likes
  • Album ZIP size
  • Media per page
  • Member storage quota
  • Navigation label
  • Navigation icon
  • Content profile
  • Allowed extensions
  • Portfolio Mode
  • Maintenance

Provides scan-first diagnostic and cleanup tools.

Maintenance & Cleanup

Better Media does not blindly delete anything it thinks looks wrong.

Maintenance first scans and separates findings into categories such as:

  • Safe cleanup
  • Repairable warnings
  • Items requiring administrator attention

Checks include:

  • Orphaned stored files
  • Missing original media
  • Missing thumbnails
  • Missing video posters
  • Stale generated ZIPs
  • Orphaned tags
  • Orphaned comments
  • Orphaned likes
  • Orphaned favorites
  • Orphaned access records
  • Orphaned reports
  • Invalid counts and references

Missing original media is reported for review and is not automatically deleted.

Recent physical files are also ignored during orphan cleanup to avoid racing active uploads or derivative generation.

Theme Compatibility

Better Media keeps one canonical copy of its:

  • Template
  • CSS
  • JavaScript
  • English language file

inside SMF's default theme.

This avoids an old copied template or language file inside a custom theme silently overriding a newer Better Media package.

Custom translations are still respected first.

Missing language strings are filled from the canonical default-theme language file.

This is particularly useful with Theme Lab and other custom SMF themes.

Upgrade Safety

Better Media's installer is deliberately upgrade-safe.

Existing administrator settings are preserved.

Only missing settings receive defaults.

Default Better Media permissions are created only during a true first install and are not recreated or reset during upgrades.

The stable package supports direct upgrades from the full development series through:

0.1.0-dev51m

Uninstall & Data Retention

Better Media follows the Better SMF uninstall standard.

  • Normal uninstall
  • Detaches Better Media hooks
  • Removes package files
  • Preserves Better Media settings
  • Preserves permissions
  • Preserves database tables
  • Preserves uploaded media

This allows Better Media to be removed and reinstalled without automatically destroying the gallery.

Uninstall with "Remove all data associated with this modification" checked

SMF's native Package Manager option performs the destructive cleanup.

This removes:

  • Better Media database tables
  • Better Media settings
  • Better Media permissions
  • Better Media-owned stored files

Custom storage roots receive additional protection.

Better Media does not recursively wipe an arbitrary custom directory. Only its known storage subdirectories and scaffold files are removed.

Compatibility

Better Media: 1.0.0
SMF: 2.1.7

Release Status

Better Media 1.0.0 is the first stable release and is promoted directly from the live-tested 0.1.0-dev51m code line.

No feature logic was changed simply to call it stable.

The release promotion finalized:

  • Stable version metadata
  • Direct dev51m upgrade support
  • Public release README
  • Stable asset cache markers

The gallery, media upload pipelines, access control, downloads, reactions, comments, portfolio system, maintenance tools, theme compatibility, upgrade behavior, and uninstall architecture all remain on the proven development baseline.
Having trouble? Please contact me through Help & Support Board.