Skip to content

ModernStats v1.1.0

Latest

Choose a tag to compare

@illusion035 illusion035 released this 20 Jan 13:45
· 2 commits to main since this release

πŸ“Š Modern Statistics v1.1.0 Release Notes

πŸ“… Release Date: 2026-01-20
πŸ‘€ Author: Illusion
🧷 Compatibility: phpBB 3.2.0+


✨ New Features

🚫 Group Exclusion for Most Active User

  • Exclude specific user groups from the "Most Active User" (Top Poster) statistic
  • Perfect for excluding Administrators, Moderators, or Bot accounts
  • Multi-select interface in ACP settings
  • Hold Ctrl to select multiple groups

🎨 Theme Selection

  • Choose between Light and Dark themes
  • Configurable from ACP β†’ Extensions β†’ Modern Statistics β†’ Settings
  • Improved text readability in Light theme

⚑ Performance Improvements

πŸš€ Optimized Database Queries

Reduced 5 database queries by using phpBB's built-in config values:

Before (Custom Query) After (phpBB Config)
COUNT(*) FROM users $config['num_users']
COUNT(*) FROM topics $config['num_topics']
COUNT(*) FROM posts $config['num_posts']
SELECT username ORDER BY regdate $config['newest_username']
MIN(post_time) FROM posts $config['board_startdate']

Result: ~50-75ms faster page load


πŸ› Bug Fixes

  • Fixed: Blue bar remaining visible when all features are disabled
    • S_MODERNSTATS_ENABLED now properly checks if any feature is enabled
  • Fixed: PHP warnings "Trying to access array offset on bool" when no top poster exists
    • Added null checks for $top_poster and $newest_user
  • Fixed: Avatar display issues
    • Now using phpBB's native phpbb_get_avatar() function with proper key mapping
  • Fixed: Undefined constant errors in namespaced code
    • Using global namespace prefix (\) for all phpBB constants

πŸ“ Code Quality (phpBB Validation Compliance)

  • βœ… Removed unused listener.php file
  • βœ… Removed custom phpBB constant redefinitions (USERS_TABLE, etc.)
  • βœ… Moved phpbb_get_user_avatar() function to class method get_user_avatar()
  • βœ… Fixed HTML formatting in templates (no more multi-line tag attributes)
  • βœ… Using {L_COLON} instead of hardcoded : colons
  • βœ… Following phpBB coding guidelines (tabs for indentation, brackets on new lines)

πŸ”„ Upgrade Instructions

  1. Disable the extension in ACP β†’ Customise β†’ Manage extensions
  2. Replace the files in ext/illusion/modernstats/ with the new version
  3. Enable the extension again
  4. The new migration will run automatically
  5. Configure the new settings:
    • Theme: ACP β†’ Extensions β†’ Modern Statistics β†’ Theme
    • Exclude Groups: ACP β†’ Extensions β†’ Modern Statistics β†’ Exclude groups from Most Active User

πŸ“ Changed Files

event/main_listener.php      - Major refactoring, optimizations, bug fixes
event/listener.php           - DELETED (unused)
acp/main_module.php          - Added group exclusion functionality
acp/main_info.php            - Code formatting
adm/style/acp_modernstats_body.html - Added group selection, {L_COLON} usage
styles/all/template/modern_stats.html - HTML formatting fixes
styles/all/template/event/overall_header_head_append.html - HTML formatting
styles/all/theme/modernstats.css - Improved light theme text colors
language/en/mods/modernstats_acp.php - Added new language keys
language/bg/mods/modernstats_acp.php - Added new language keys
migrations/add_excluded_groups.php - NEW: Migration for group exclusion

πŸ› οΈ Support

Discord illusion034 for bugs / issues / suggestions.

πŸ–ΌοΈ Screenshots

Dark Light Screenshot_1