MyBB Community Forums

Full Version: Pre Load your forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

This little mod pre-loads the forum before even actual showing you the forum, it loads all the contents such as images, css, etc.

Put this code at the bottom of your forums headerinclude template:
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function loadImages() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) {  // Netscape 4
document.hidepage.visibility = 'hidden';
}
else {  // IE 4
document.all.hidepage.style.visibility = 'hidden';
      }
   }
}
//  End -->
</script>
</head>
<BODY OnLoad="loadImages()" style="overflow-x: hidden;">
<div id="hidepage" style="position: absolute; left:0px; top:0px; background-color: #FFFFFF; layer-background-color: #FFFFFF; height: 100%; width: 100%;"><table width="100%" height="100%"><tr><td valign="middle" align="center">Forum Content Loading... Please wait.</td></tr></table></div>
Enjoy Smile
Excuse me for being stupid, but where is the headerinclude?
Edit: Found it.
Edit 2: Messed up my forums theme from the top, it said the message "Forum Content Loading... Please wait." Didn't load out.
Quote:// DOM3 = IE5, NS6

Quote:// Netscape 4

Quote:// IE 4

Where did you get this code from? I find it very doubtful that anything built with support for IE 4 and Netscape would be reliable or even useful in 2013. You're better off implementing a lazy loading feature.
Oops my bad I had this from a while back, I edited it since and have just uploaded the wrong one! Blush:p