Repository navigation
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()andregisterScript()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 ofclass = "...") - Added
htmlspecialchars()to imagesrcattributes - 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
- Download the package:
mod_joomlalabs_imagecomparisonslider_module_v2.0.1_j4_j5_j6.zip - In Joomla Administrator: System β Extensions β Install
- Upload the downloaded package
- Module will update automatically
π Upgrading from v2.0.0
This is a seamless upgrade with no breaking changes:
- β Direct upgrade: Simply install the new package over v2.0.0
- β Settings preserved: All module configurations remain unchanged
- β 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:
Made with β€οΈ for the Joomla! Community
β If this project helped you, please give it a star! β