TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,022
  • Total Topics: 21,332
  • Online today: 725
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 287
  • Total: 287

Statistics Mod

Started by WSA, October 11, 2006, 08:48:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WSA

I was over at a vBulletin forum getting ready to talk smack about how the Cardinals are going to lay the woopdown on them bears.

Anyways, as I was going through it, I noticed this little statistical feature.  Is there anyway this can be done using SMF?

Threads: 11,371, This Month: 509 (15%)
Posts: 164,583, This Month: 7773 (24%)
Members: 2,359, This Month: 115 (28%)
Welcome to our newest 5 members, ThreeNagurski, Horus, Daa Bearss 54, chaspal, fkthepackers

jacortina

That depends. What are the percentages representing?

JPDeni

How is the percentage calculated? For that matter, how are the numbers for "this month" calculated? Is it "the number so far in this calendar month, compared to the same number of days from last calendar month"? Or is it "the number from the past 30 days, compared to the number from the previous 30 days"? Or is it "the number from the past 30 days (or the days from this calendar month), compared to a similar period from last year"? There's lots and lots of different ways you can calculate statistics, each one of which would require a different query syntax.

If you don't know what vBulletin's is, what would you like? I can probably come up with the query syntax. From there, it would just be a matter of printing it out.

I see that jacortina has the same question.  :)

WSA

I believe that they are monthly statistics.

So for instance on threads, they have 11,371 to date.  That means at the end of last month, they were at 10,862.  So far this month, they have 509 threads whereas at the same time last month they had say 480.  That makes a 15% increase over the previous month.

It's the same for all of the stats.

akulion

looks very nice
would be cool one to have


WSA

I'm not positive what those stats are based off of.  I just noticed it and thought that would be a neat thing to show.

I guess you could come up with the statistic any way you wanted, but just seeing growth is what I like.

akulion

its definately not calculated off the totals - because if it was then the numbers would be extremely low

jacortina

You can certainly get data on a rolling thirty day basis (and data for the prior 30). You can certainly get month-to-date data and prior month-to-date data.

So, it's a matter of what data/calculations you want.

Jpg

#8
This is possible. Just Plain did one on members during the last month, last week, today. Would be that same just adding the "current" amount. And adding images.
Shouldn't be that hard.

akulion

percentage decrease and increase using a conditional check perhaps?
X2 = This month
X1 = last month
PX = Percentage increase / decrease

For percentage increases:
If X1 - X2 == +ve
then use this formula:
PX = [(X2 - X1)/X1 ] * 100
Print results with green arrow in this case

Else
For percentage decreases:
If X1 - X2 == -ve
then use this formula:
PX = [(X1 - X2)/X2] * 100
Print results with red arrow in this case

This website is proudly hosted on Crocweb Cloud Website Hosting.