Skip to content

Joomla!LABS Image Comparison Slider Module 2.0.1

Latest

Choose a tag to compare

@Razzo1987 Razzo1987 released this 24 Dec 18:06
· 2 commits to master since this release
3ede883

Joomla!LABS Image Comparison Slider Module Version 2.0.1

πŸ› Bug Fixes & Improvements

This is a maintenance release that fixes asset loading issues and improves code quality.

✨ What's New

πŸ› Critical Fixes

  • βœ… Asset Loading Fixed - CSS and JavaScript now load correctly in frontend
    • Resolved Web Asset Manager registration issues
    • Fixed missing parameters in registerStyle() and registerScript() methods
    • Corrected ES6 module type attribute

🎨 Code Quality Improvements

  • Optimized Template Structure - Cleaner, more maintainable HTML

    • Improved indentation and formatting
    • Alternative PHP syntax for better readability
    • Removed unnecessary whitespace
  • Enhanced CSS - Better slider handle display

    • Fixed icon centering with flexbox
    • Removed duplicate declarations
    • Consolidated styles

πŸ”’ Security Enhancements

  • XSS Protection - Added htmlspecialchars() to all image URL attributes for consistent security

πŸ”§ Changes in Detail

Asset Loading Fix

Problem: CSS and JavaScript files were not loading in frontend due to incomplete Web Asset Manager registration.

Solution: Updated registration methods with proper parameter signatures:

// Before (missing parameters)
$wa->registerStyle('imagecomparisonslider.style', 'media/.../css/imagecomparisonslider.css');

// After (complete parameters)
$wa->registerStyle('imagecomparisonslider.style', 'media/.../css/imagecomparisonslider.css', [], []);
$wa->registerScript('imagecomparisonslider.script', 'media/.../js/imagecomparisonslider.js', [], ['type' => 'module'], []);

Template Improvements

Changes:

  • Cleaner HTML with proper indentation
  • Alternative PHP syntax (if: / endif;) for conditionals
  • Removed spaces around = in attributes (class="..." instead of class = "...")
  • Added htmlspecialchars() to image src attributes
  • Consistent use of loading="lazy" for images

CSS Optimization

Fixed: Icon not centered in handle button

Solution: Proper flexbox implementation with consolidated properties


πŸ“‹ Requirements

Software Version
Joomla! 4.x, 5.x, 6.0+
PHP 8.1+
Browser Modern browsers (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+)

πŸ“₯ Installation

  1. Download the package: mod_joomlalabs_imagecomparisonslider_module_v2.0.1_j4_j5_j6.zip
  2. In Joomla Administrator: System β†’ Extensions β†’ Install
  3. Upload the downloaded package
  4. Module will update automatically

πŸ†™ Upgrading from v2.0.0

This is a seamless upgrade with no breaking changes:

  1. βœ… Direct upgrade: Simply install the new package over v2.0.0
  2. βœ… Settings preserved: All module configurations remain unchanged
  3. βœ… No manual steps: Fully automated update process

πŸ“ Full Changelog

Full Changelog: v2.0.0...v2.0.1


πŸ™ Credits

Original concept by CodyHouse
Modernized for Joomla 6+ by Joomla!LABS


πŸ’ Support This Project

If you find this module useful, consider supporting its development:

Sponsor on GitHub Buy me a beer Donate via PayPal


Made with ❀️ for the Joomla! Community

⭐ If this project helped you, please give it a star! ⭐