The Arcive of vBulletin Modifications Site. |
|
Pre-Load Forum Details »»
|
|||||||||||||||||||||||||
This little mod pre-loads the forum before even actual showing you the forum, it loads all the contents such as images, css, etc before showing you the forum.
put this code at the bottom of your forums headinclude template Code:
<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>
![]() Note: This hack works with all versions of vBulletin, except VB4! Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
*tries it*
might even set the text as random quotes so my users have something to read quick when my server is being slow lol. *likes it* |
|
#3
|
|||
|
|||
|
good idea, just a loading animation image with a random quote below!
for some reason, this doesnt work on VB4, i dont know why |
|
#4
|
||||
|
||||
|
Maybe body onload code.. I have had problems with toooooo many mods or custom third party scripts all using the body onload part of the code
just a thought.
|
|
#5
|
|||
|
|||
|
anyway around it?
|
|
#6
|
|||
|
|||
|
Great!! Thanks.
|
|
#7
|
||||
|
||||
|
Could someone maybe make a loading animation for that usage so its not only simple text ?
|
|
#8
|
||||
|
||||
|
try this.
Add this to the headinclude template HTML Code:
<script type="text/javascript"> <!-- Begin function loadImages() { if (document.getElementById) { // DOM2 = 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 --> window.onload = function() { loadImages(); } // or try this window.onload = loadImages; </script> HTML Code:
overflow-x:auto; HTML Code:
#hidepage {position: absolute; left:0px; top:0px; background-color:#FFF;layer-background-color:#FFF;height: 100%; width: 100%; }
#hidepage table {height:100%; width:100%;}
#hidepage table td { vertical-align:middle; text-align:center;}
#loaderText {color:#000;}/*change to your own color for loading text*/
HTML Code:
<div id="hidepage" ><table> <tr> <td><img src="your/path/here/image.gif" alt="loading icon" /><br /><span id="loaderText">Forum Content Loading... Please wait.</span> </td> </tr> </table></div> trying to make it semi validate since layer-background-color: is for netscape only and I can't see why you would use legacy netscape code because I doubt anyone uses netscape anymore or IE6 let alone IE4. Also its DOM 2 not 3 as most browsers dont even support DOM 3. Should work I cant test my self my domain is being transferred and I can't access the site until friday. |
|
#9
|
||||
|
||||
|
google chrome dont working
|
|
#10
|
|||
|
|||
|
well the thing is i found a code like this on google, and it works very well!
|
![]() |
|
|