vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Batting Average for Baseball Type Forums (https://vborg.vbsupport.ru/showthread.php?t=65413)

Ryan Ashbrook 05-21-2004 10:00 PM

Batting Average for Baseball Type Forums
 
This was requested by MLBCenter at vBulletinTemplates.

Basically, this hack averages in Post Count, Posts Per Day, and Join Time and gives an average at one thousandth of a decimal.

So it will display an average like this: .203 on both the memberinfo and postbit pages.

I hope you enjoy this hack. :)

Credits:

Boofo - Helping fix the code. Thanks a lot!

MLBCenter - For letting me develop this hack on his live forums. :)

The textfile will constantly be changing, so if you get abnormal averages either report them to me in this thread, or re-do the codes, because posts per day is a tough one to work with, since the posts per day can be very weird on a user by user basis.

xQuEeNzNaZcHox 05-23-2004 01:57 AM

Can I see some screens? It's very interesting looking.

MLBCenter 05-23-2004 02:29 AM

I'm getting an error now...

http://forums.mlbcenter.com/member.php?u=2676

Ryan Ashbrook 05-23-2004 02:27 PM

Screenshots attached to first post.

Ryan Ashbrook 05-23-2004 04:14 PM

Ok, it's been determined that this hack needs work, or there is no definate way to actually do this.

Code optimized, and totally fixed. :)

Boofo 05-23-2004 10:28 PM

Congratulations on your second vB3 hack, Ryan. ;)

I think I'll use this. Great idea. Thank you, sir. ;)

Ryan Ashbrook 05-24-2004 12:20 AM

You're welcome Boofo. :)

Remember about my note in the first post though. The code will always be changing, so be on the lookout. ;)

JCJiffy 05-24-2004 05:32 AM

The algorithm you're using doesn't make sense at all. Users on my forums with extremely high post counts end up having way lower batting averages than those with very low post counts. Join dates are the same.

Boofo 05-24-2004 05:39 AM

Quote:

Originally Posted by JCJiffy
The algorithm you're using doesn't make sense at all. Users on my forums with extremely high post counts end up having way lower batting averages than those with very low post counts. Join dates are the same.

But rememeber that the batting average is based on posts per day, not total post counts. ;)

JCJiffy 05-24-2004 05:45 AM

Quote:

Originally Posted by Boofo
But rememeber that the batting average is based on posts per day, not total post counts. ;)

Posts per day is based off total post counts and the join date.

Boofo 05-24-2004 05:57 AM

Quote:

Originally Posted by JCJiffy
Posts per day is based off total post counts and the join date.

Right. So if you have a new user that is posting alot (as new users often do) and a user that has been there a while but not posted in a while, then the new user will have a higher batting average than the user with a big post count. That is how this should work. ;)

JCJiffy 05-24-2004 06:03 AM

Quote:

Originally Posted by Boofo
Right. So if you have a new user that is posting alot (as new users often do) and a user that has been there a while but not posted in a while, then the new user will have a higher batting average than the user with a big post count. That is how this should work. ;)

And to quote myself from above:

Quote:

Originally Posted by JCJiffy
Join dates are the same.

In other words, I am noticing that people with higher post counts AND higher posts per day are getting lower batting averages.

Ryan Ashbrook 05-24-2004 10:46 PM

Well, the thing about the equations is I couldn't get it to work without putting it like it is.

I'm not the best PHP coder in the world, since I've only released three hacks, and they're all basic ones.

MLBCenter 05-25-2004 12:35 AM

If anyone else can help that would be great...

Strike Three 06-21-2004 06:35 PM

Here's an idea, for an all-sports forum - give users the choice between batting average [baseball fans], QB passer rating [football fans], shooting percentage [basketball fans or hockey fans]. If you want to give this a try and would like to test it on my site, shoot me an email - chris@thesportsfans.com.

Strike Three 07-02-2004 02:22 AM

I installed this on my site, but for some reason the batting average shows up at 0.000 for anyone with 3.xx posts per day (or more?).

Ex - http://www.thesportsfans.com/forums/member.php?u=10, http://www.thesportsfans.com/forums/member.php?u=11

MLBCenter 07-05-2004 02:38 AM

There are some flaws in the BA system here - which is why we created our own way on getting a realistic batting average for all members.

Boofo 07-05-2004 05:26 AM

Quote:

Originally Posted by MLBCenter
There are some flaws in the BA system here - which is why we created our own way on getting a realistic batting average for all members.

Would you care to share? ;)


All times are GMT. The time now is 03:51 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.01168 seconds
  • Memory Usage 1,747KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete