vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Board Optimization - Forum Load Time Indicator (https://vborg.vbsupport.ru/showthread.php?t=198079)

UKBusinessLive 12-04-2008 10:00 PM

Forum Load Time Indicator
 
Ever wanted to see just how fast your board is loading?? Its a bit slow but your not sure how slow?? Just loaded a new hack - Is your board just as fast???

Well now you'll know with this simple little hack that sits queitly at the bottom of your footer. A timer starts when the page begins to parse and ends when it has completed loading all of the content. The result is the time in seconds of how fast (or slow) your forums are loading.

The Instructions are so simple too :D

ACP> Style Manager > Your Forum Style

1. Copy the code below into your forum's style headerinclude

Code:

<script type="text/javascript">
<!-- Begin
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Abraham Joffe :: http://www.abrahamjoffe.com.au/ */

var startTime=new Date();

function currentTime(){
  var a=Math.floor((new Date()-startTime)/100)/10;
  if (a%1==0) a+=".0";
  document.getElementById("endTime").innerHTML=a;
}

window.onload=function(){
  clearTimeout(loopTime);
}

// End -->
</script>

and post this code into the Footer

Code:

<div align="center">
<script type="text/javascript">
<!-- Begin
  document.write('This Page took <span id="endTime">0.0</span> seconds to load.');
  var loopTime=setInterval("currentTime()",100);
// End -->
</script>
</div>

Thats it, short, and sweet enjoy :p

Please Click install if you use this ;)

Original Script Created by : Abraham Joffe

UKBusinessLive 12-05-2008 03:21 PM

Reserved :p

movslow 12-05-2008 05:27 PM

Installed.

Question, how do you get it centered in the page, currently it installed to the left.

:up:


/edit found it.

<div align="center">

</div>

germinus 12-05-2008 05:30 PM

Think I will wait for some proper install instructions!

movslow 12-05-2008 05:50 PM

Btw, this doesn't work well with the WebSite thumbnail mod here.

https://vborg.vbsupport.ru/showthread.php?t=196702

I had just installed the timer here, worked like a charm. Installed the website thumbnail and the timer doesn't stop counting..lol.

Install and you will see what I mean.

UKBusinessLive 12-05-2008 05:58 PM

Quote:

Originally Posted by movslow (Post 1679177)
Installed.

Question, how do you get it centered in the page, currently it installed to the left.

:up:


/edit found it.

<div align="center">

</div>

Thanks i forgot that bit :rolleyes: Updated the code now to include it :up:

UKBusinessLive 12-05-2008 06:00 PM

Quote:

Originally Posted by germinus (Post 1679181)
Think I will wait for some proper install instructions!

Only 2 small bits of code to paste, one in the headerinclude, and one in your footer easy
;)

UKBusinessLive 12-05-2008 06:01 PM

Quote:

Originally Posted by movslow (Post 1679187)
Btw, this doesn't work well with the WebSite thumbnail mod here.

https://vborg.vbsupport.ru/showthread.php?t=196702

I had just installed the timer here, worked like a charm. Installed the website thumbnail and the timer doesn't stop counting..lol.

Install and you will see what I mean.

just noticed that :rolleyes:

movslow 12-05-2008 06:06 PM

It's a cool mod, simple, clean and effective.

However I had to uninstall it until the bugs get worked out b/c it looks funny watching it count forever..lol.

:up:

mark370 12-05-2008 06:12 PM

Quote:

Originally Posted by germinus (Post 1679181)
Think I will wait for some proper install instructions!

this will help you.

choose the skin you want this showing and,

Insert this bottom of the header template:
Code:

<script type="text/javascript">
<!-- Begin


var startTime=new Date();

function currentTime(){
  var a=Math.floor((new Date()-startTime)/100)/10;
  if (a%1==0) a+=".0";
  document.getElementById("endTime").innerHTML=a;
}

window.onload=function(){
  clearTimeout(loopTime);
}

// End -->
</script>

Ive Inserted this bit of code on the next line below the vb time code in footer template as i wanted it to show below the time but you can add it where you chose:
Code:

<div class="smallfont" align="center"><b><script type="text/javascript">
<!-- Begin
  document.write('This Page took <span id="endTime">0.0</span> seconds to load.');
  var loopTime=setInterval("currentTime()",100);
// End -->
</script>
</b>
<br />



All times are GMT. The time now is 06:43 AM.

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.01201 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete