Content Restriction Popup
DownloadIntroduction
Content Restriction Popup is a powerful Joomla module that allows you to restrict content access by displaying a customizable popup to non-logged-in users. The popup can display login forms, registration forms, or any other module, providing a professional way to encourage user registration and login.
Key Highlights
- Full Joomla 4, 5 & 6 Compatibility
- Automatic Popup Display with Customizable Timing
- Customizable Dimensions and Opacity
- Module Integration (Login, Registration, or Custom)
- Smart User Detection
- Professional Lightbox Integration
- Advanced Customization Options
- Performance Optimized
- Security Enhanced
- Fully Responsive Design
Perfect For:
- Membership websites
- Premium content sites
- E-commerce sites
- Community sites
- News sites with premium articles
- Educational sites
- Corporate intranets
- Any site wanting to encourage registration
Installation
Downloading the Extension
After purchasing the extension, you will receive a download link for the module package.
Installing the Module
- Log in to your Joomla backend
- Navigate to Extensions > Manage > Install
- Click on the "Upload Package File" tab
- Select the module installation file (
mod_content_restriction_X.x.zip) - Click "Upload and Install"
- Navigate to Extensions > Modules
- Click "New" and select "Content Restriction Popup"
- Configure and publish the module
A success message will be displayed once the installation is complete.
System Requirements
- Joomla 4.x, 5.x, or 6.x
- PHP 7.4 or higher
- jQuery (included with Joomla)
- A login module (mod_login) for popup display
Module Settings
Access module settings by navigating to Extensions > Modules, create or edit a "Content Restriction Popup" module.
Auto Popup Open Timer
- Default: Popup opens immediately when page loads (default)
- Assign Value: Popup opens after a specified delay
Popup Automatically Opens After
- Delay time in milliseconds (default:
1000ms = 1 second) - Range: 0 to 60000 milliseconds (0 to 60 seconds)
- Only shown when "Auto Popup Open Timer" is set to "Assign Value"
- Useful for giving users time to see the page before popup appears
Height of Popup Box
- Height in pixels (default:
300px) - Range: 100 to 2000 pixels
- Adjust based on content size
Width of Popup Box
- Width in pixels (default:
500px) - Range: 100 to 2000 pixels
- Responsive on mobile devices
Select Login Module
- Choose a login module from the dropdown
- Only published login modules (mod_login) are shown
- This module will be displayed inside the popup
- You can also use registration or custom modules
Opacity
- Overlay opacity value (default:
0.5) - Range: 0.0 (fully transparent) to 1.0 (fully opaque)
- Controls background overlay transparency
- Lower values = more transparent, Higher values = more opaque
Advanced Settings
- Module Class Suffix: Add custom CSS class suffix for styling
Configuration Guide
Step-by-Step Configuration
Step 1: Create Module Instance
- Navigate to Extensions > Modules
- Click "New" button
- Select "Content Restriction Popup" from the list
Step 2: Configure Popup Timing
- Set "Auto Popup Open Timer" to "Default" for immediate popup
- Or set to "Assign Value" and specify delay time in milliseconds
- Recommended delay: 1000-3000ms (1-3 seconds) for better UX
Step 3: Set Popup Dimensions
- Set "Width of Popup Box" (recommended: 400-600px)
- Set "Height of Popup Box" (recommended: 300-500px)
- Adjust based on your login module size
Step 4: Select Module to Display
- Choose a login module from "Select Login Module" dropdown
- Ensure the login module is published
- Only mod_login modules are shown in the list
Step 5: Configure Opacity
- Set opacity value (recommended: 0.5-0.8)
- Lower values = more subtle overlay
- Higher values = more prominent overlay
Step 6: Assign Module Position
- Select a module position (can be any position, popup appears globally)
- Set menu assignment (usually "All" pages)
- Set access level if needed
Step 7: Publish
- Set status to "Published"
- Save the module
- Test on frontend as a non-logged-in user
Best Practices
- Use a delay timer (1-3 seconds) for better user experience
- Test popup on different screen sizes
- Ensure login module is properly configured
- Use appropriate opacity for your design
- Test with different user groups
Features
Core Features
- Automatic Popup Display: Configure popup to open immediately or after a delay
- Customizable Dimensions: Set popup width and height for perfect sizing
- Opacity Control: Adjust overlay transparency for visual effects
- Module Integration: Display any module (login, registration, custom) in popup
- Smart User Detection: Automatically detects logged-in users
- Professional Lightbox: Fancybox integration with smooth animations
- View Exclusion: Intelligently excludes certain views to prevent loops
- Advanced Customization: Module class suffix and CSS options
User Experience Features
- Non-Intrusive: Only shows to non-logged-in users
- Smart Timing: Configurable delay prevents immediate interruption
- Modal Behavior: Prevents background interaction when popup is open
- Responsive Design: Works perfectly on all devices
- Accessible: Includes aria-label attributes for screen readers
Technical Features
- Performance Optimized: Uses ModuleHelper and WebAssetManager
- Deferred Scripts: Scripts load with defer attribute for better performance
- Error Handling: Graceful fallbacks and exception handling
- Input Validation: Comprehensive parameter validation
- Security Enhanced: XSS prevention and proper escaping
Compatibility
- Joomla 4, 5 & 6 Compatible: Full support for all modern Joomla versions
- Modern PHP: PHP 7.4+ syntax and features
- Future-Proof: Regular updates and security patches
FAQ
General Questions
Which Joomla versions are supported?
- The module is fully compatible with Joomla 4.x, 5.x, and 6.x
How do I create a content restriction popup?
- Go to Extensions > Modules > New
- Select "Content Restriction Popup"
- Configure popup settings (timing, dimensions, module)
- Assign to a module position and publish
Can I use any module in the popup?
- The field selector shows only mod_login modules by default
- You can modify the field to show other module types
- Any module can technically be displayed if you have its ID
Configuration Questions
How do I set the popup to open automatically?
- Set "Auto Popup Open Timer" to "Default" for immediate popup
- Or set to "Assign Value" and specify delay in milliseconds
What's the best delay time?
- Recommended: 1000-3000ms (1-3 seconds)
- Gives users time to see the page before popup appears
- Too short (0ms) can be intrusive
- Too long (10s+) may be missed by users
What opacity value should I use?
- Recommended: 0.5-0.8 for good balance
- Lower values (0.3-0.5) = more subtle, less intrusive
- Higher values (0.7-1.0) = more prominent, draws attention
- Test different values to find what works for your design
User Experience Questions
Who sees the popup?
- Only non-logged-in users see the popup
- Logged-in users never see it
- Certain views (reset, remind, registration) are excluded
Can users close the popup?
- Yes, users can close the popup using the close button
- The popup is modal, so users must interact with it
- Background is disabled when popup is open
What happens after users log in?
- Once logged in, the popup will not appear
- Users can access all content normally
- The module automatically detects login status
Technical Questions
How does the module detect logged-in users?
- Uses Joomla's built-in user authentication system
- Checks Factory::getIdentity() for user ID
- Only shows popup if user ID is 0 (not logged in)
Can I customize the popup styling?
- Yes, use Module Class Suffix to add custom CSS classes
- Add custom CSS in template or via extra CSS field
- Popup uses standard CSS classes that can be overridden
- Fancybox CSS can also be customized
What if I don't have a login module?
- Create a login module first: Extensions > Modules > New
- Select "Login" module type
- Configure and publish it
- Then select it in Content Restriction Popup settings
Troubleshooting
Common Issues and Solutions
Module Issues
Popup Not Displaying
- Ensure the module is published
- Check module position is assigned
- Verify menu assignment includes the current page
- Check that you're viewing as a non-logged-in user
- Clear Joomla cache
- Check browser console for JavaScript errors
Popup Shows to Logged-In Users
- Clear browser cache and cookies
- Log out and log back in
- Check Joomla session settings
- Verify user authentication is working
Configuration Issues
Login Module Not Appearing in Popup
- Verify the login module is published
- Check the module ID is correct
- Ensure the module is of type mod_login
- Check module access level
- Verify module is assigned to correct client (site, not admin)
Popup Dimensions Not Working
- Check width and height values are within range (100-2000px)
- Verify values are numeric, not text
- Clear browser cache
- Check for CSS conflicts with your template
JavaScript Issues
Popup Not Opening
- Check that jQuery is loaded (included with Joomla)
- Verify Fancybox JavaScript files are loading
- Check browser console for JavaScript errors
- Ensure no other scripts are conflicting
- Clear browser cache
- Check WebAssetManager is working correctly
Popup Opens Multiple Times
- Check that only one instance of the module is published
- Verify module is not assigned to multiple positions
- Check for duplicate module IDs
- Clear Joomla cache
Styling Issues
Popup Styling Not Applied
- Check CSS files are loading correctly
- Verify no CSS conflicts with your template
- Check browser console for CSS errors
- Try disabling other modules/plugins temporarily
- Use browser developer tools to inspect styles
Opacity Not Working
- Verify opacity value is between 0.0 and 1.0
- Check value is numeric, not text
- Clear browser cache
- Check Fancybox CSS is loading
Performance Issues
Page Loading Slowly
- Check JavaScript files are loading with defer attribute
- Verify WebAssetManager is working correctly
- Check for conflicts with other modules/plugins
- Optimize your login module if it's heavy
Getting Help
If you continue to experience issues:
- Check Joomla error logs for PHP errors
- Visit our support forum: https://support.joomlax.com
- Ensure you're using the latest version
- Verify your Joomla version is compatible (4.x, 5.x, or 6.x)
- Check documentation: https://joomlax.com/documentation/content-restriction-popup