sickprodigy 07d181c078
Publish release / publish (push) Successful in 5s
Release Avatar Gallery 1.0.3
Fix schema-safe gallery avatar saves and add immediate or queued bulk avatar repair and randomization through MyBB tasks.\n\nCloses #2
2026-10-02 00:15:33 +00:00
2026-10-02 00:15:33 +00:00
2026-10-02 00:15:33 +00:00
2026-10-02 00:15:33 +00:00
2026-10-02 00:15:33 +00:00

Avatar Gallery for MyBB

Adds a selectable, categorized avatar gallery to MyBB's User Control Panel. Images are discovered recursively from images/avatars; subdirectories become collections.

Features

  • Discovers GIF, JPEG, JPE, BMP, PNG, and optional WebP images.
  • Validates selections server-side and rejects traversal and escaping symlinks.
  • Works independently of upload and remote-avatar permissions.
  • Configurable filesystem directory, public path, extensions, and default collection.
  • Optionally assigns each newly registered user a random gallery avatar.
  • Repairs broken gallery assignments after gallery files or folders are renamed.

Installation

  1. Copy the contents of Upload/ into the root of a MyBB 1.8 installation.
  2. Add images to images/avatars (subdirectories become collections).
  3. Install and activate Avatar Gallery in ACP → Configuration → Plugins.
  4. Optionally edit ACP → Configuration → Settings → Avatar Gallery.

Users select an image at User CP → Change Avatar.

Enable Random avatar on registration in the Avatar Gallery settings to replace the normal default avatar with a random validated gallery image for new registrations. Existing users and registrations that already provide a custom avatar are left unchanged.

Use Admin CP → Tools & Maintenance → Avatar Gallery Repair for three separate actions: repair saved local or gallery paths whose files went missing after a rename or removal, give users with no avatar a random gallery choice, or replace users sharing an exact saved default/specified avatar value. Operations affecting 500 users or fewer run immediately. Larger operations are queued automatically and processed by MyBB’s task system in batches of 500, with progress shown in Admin CP. External URLs are only changed when entered as an exact match.

The gallery directory is the filesystem path MyBB scans for image files. The gallery URL path is the public browser path used to display those same images; both commonly use images/avatars, but they can differ on custom deployments.

Development

php -l Upload/inc/plugins/default_avatars.php
php -l Upload/inc/languages/english/default_avatars.lang.php
php -l Upload/inc/languages/english/admin/default_avatars.lang.php
php tests/default_avatars_test.php

Tagged releases package Upload, README.md, LICENSE, and CHANGELOG.md into a mybb-avatar-gallery-{version}.zip archive.

Created for Space Cadet issue #36.

License

Copyright (C) 2026 SickProdigy. Licensed under GPL-3.0-only.

S
Description
No description provided
Readme GPL-3.0
97 KiB
2026-10-01 20:15:46 -04:00
Languages
PHP 100%