All the modal needs to do is popup in the center of the screen and display this message: "The site is experiencing Heavy Traffic. Please click Ok to close"
My client does not want to pay for any extensions. If you want popup to have memory functions (ie not showing up everytime someone access the site) then you have to pay for the pro version of regular labs.
So far i have managed to create a custom module from within the admin console and just paste the bootstrap code in there.
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of Auto Loading Bootstrap Modal on Page Load</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script>
$(document).ready(function () {
$("#myModal").modal('show');
});
</script>
</head>
<body>
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"> site is experiencing a higher-than-normal volume</h5>
</div>
<div class="modal-body">
<p>Users may experience intermittent connection issues</p>
<ul>
<li>Our technical teams are currently working to resolve this issue.</li>
<li>Click “Close” to acknowledge this and enter the site.</li>
</ul>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
Am i on the correct track? I'm not really sure what the best practice is for modals in joomla. My understanding is that the Cassiopeia template has its own predefined layout so i'm not sure if my code is interfering with that.