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

Reply
 
Thread Tools
Forum Load Time Indicator Details »»
Forum Load Time Indicator
Version: 1.00, by UKBusinessLive UKBusinessLive is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.8.0 RC 1 Rating:
Released: 12-04-2008 Last Update: Never Installs: 46
Template Edits
Re-useable Code Translations  
No support by the author.

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

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

Please Click install if you use this

Original Script Created by : Abraham Joffe

Screenshots

File Type: png page.png (61.0 KB, 0 views)

Show Your Support

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

Comments
  #12  
Old 12-07-2008, 06:24 AM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hIBEES View Post
MY "timer" keeps going and going lol

For some reason i don't think this quite works if you use the "View website thumbnail" mod, not sure why??
Reply With Quote
  #13  
Old 12-18-2008, 02:38 AM
Darkstarproject Darkstarproject is offline
 
Join Date: May 2008
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*Uninstalled* - Timer continues to count up.
Reply With Quote
  #14  
Old 12-18-2008, 06:16 PM
7lanet's Avatar
7lanet 7lanet is offline
 
Join Date: Aug 2007
Location: YeMeN
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^_^
Reply With Quote
  #15  
Old 12-21-2008, 01:39 AM
LGKeiz LGKeiz is offline
 
Join Date: Nov 2005
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vbseo causes the index timer to continue on and on and on, you need to make it so when the page ends loading, it stops counting.
Reply With Quote
  #16  
Old 01-02-2009, 06:38 PM
wingrider wingrider is offline
 
Join Date: Mar 2002
Location: Turlock, CA
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same experience here, and I'm not using vbSEO. It just keeps on counting.
Reply With Quote
  #17  
Old 01-02-2009, 07:01 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Microtime is about the cleanest way of doing this.

Add this to very top of headerinclude ( i think ) above everything else ( must load first )

Code:
<?
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;

?>
In footer add:
Code:
<? 
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
printf ('Generated in %f seconds.', $totaltime);
?>
Reply With Quote
  #18  
Old 01-16-2009, 11:12 AM
LGKeiz LGKeiz is offline
 
Join Date: Nov 2005
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

php doesn't load properly I think with templates :P
Reply With Quote
  #19  
Old 01-28-2009, 02:22 PM
porschinho's Avatar
porschinho porschinho is offline
 
Join Date: Mar 2004
Location: Germany
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has nothing to do with the real load-time of a php based website!
Java script ist interpreted by the client computer, not by the server.
This loadtime indicates how fast your webbrowser displays the page, not how fast the server generates the content...
Reply With Quote
  #20  
Old 01-29-2009, 02:35 AM
ZomgStuff ZomgStuff is offline
 
Join Date: Feb 2007
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Freaking awesome, thank you!
This looks great.


Edit: nevermind. This fails to stop counting sometimes - uninstalled.
Reply With Quote
  #21  
Old 01-29-2009, 05:03 AM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ZomgStuff View Post
Freaking awesome, thank you!
This looks great.


Edit: nevermind. This fails to stop counting sometimes - uninstalled.
have you tried the code from TimberFloorAu??? above

Microtime is about the cleanest way of doing this.

Add this to very top of headerinclude ( i think ) above everything else ( must load first )


Code:
<?
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;

?>
In footer add

Code:
<? 
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
printf ('Generated in %f seconds.', $totaltime);
?>
I'll update the code later
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 05:53 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.08730 seconds
  • Memory Usage 2,328KB
  • Queries Executed 28 (?)
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
  • (6)bbcode_code
  • (2)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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete