Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Pre-Load Forum Details »»
Pre-Load Forum
Version: 1.00, by ViciousCode ViciousCode is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 12-02-2009 Last Update: Never Installs: 14
Re-useable Code Translations  
No support by the author.

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>
Save it and you are done!

Note: This hack works with all versions of vBulletin, except VB4!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-02-2009, 10:52 PM
mandingo's Avatar
mandingo mandingo is offline
 
Join Date: Jun 2008
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*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*
Reply With Quote
  #3  
Old 12-02-2009, 11:14 PM
ViciousCode ViciousCode is offline
 
Join Date: Oct 2008
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good idea, just a loading animation image with a random quote below!

for some reason, this doesnt work on VB4, i dont know why
Reply With Quote
  #4  
Old 12-02-2009, 11:23 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 12-03-2009, 01:08 AM
ViciousCode ViciousCode is offline
 
Join Date: Oct 2008
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheLastSuperman View Post
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.
anyway around it?
Reply With Quote
  #6  
Old 12-03-2009, 04:40 AM
rainyleaves rainyleaves is offline
 
Join Date: Mar 2004
Posts: 227
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great!! Thanks.
Reply With Quote
  #7  
Old 12-03-2009, 06:57 AM
tlwwolfseye's Avatar
tlwwolfseye tlwwolfseye is offline
 
Join Date: Dec 2008
Location: Germany
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could someone maybe make a loading animation for that usage so its not only simple text ?
Reply With Quote
  #8  
Old 12-03-2009, 07:49 AM
pein87's Avatar
pein87 pein87 is offline
 
Join Date: Sep 2008
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
then open your style in styles&template select the all options in the dropdown and in the body extra css box add

HTML Code:
overflow-x:auto;
then add this to additional css

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*/
and then add this to the top of the head template

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>
You can create your own loading icons at this site http://www.ajaxload.info/ enjoy I would have made some but I dont know which ones users would like this way you can make your own for your own style and taste.

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.
Reply With Quote
  #9  
Old 12-03-2009, 03:54 PM
xorex's Avatar
xorex xorex is offline
 
Join Date: Jan 2008
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

google chrome dont working
Reply With Quote
  #10  
Old 12-03-2009, 05:32 PM
ViciousCode ViciousCode is offline
 
Join Date: Oct 2008
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well the thing is i found a code like this on google, and it works very well!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:43 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05915 seconds
  • Memory Usage 2,307KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (4)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete