1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Suggestion] "Activity over past 24 hours" graphic and Sparklines

Discussion in 'XenForo Suggestions' started by Erik, Sep 5, 2010.

  1. Erik

    Erik Well-Known Member

    This is not self-promotion: Floren saw the graphic in my signature and suggested I open a new suggestion thread on it, so I did. :)

    Basically, it would be really cool to have a little activity graph like the one in my signature displayed on the homepage, either in the Members Online Now or Forum Statistics boxes. These little graphs are often referred to as "Sparklines," and are used around the web for displaying data in a small and easy-to-understand. It would be really cool to see them integrated in many places within the XenForo software.

    For a little more technical detail on my signature:
    I'm running a cron job that parses the homepage every 15 minutes, then enters the stats (Visitors/Members/Guests online) into a database. It then reads back all the entries in the database from the last 24 hours, and uses a slightly modified PHP Sparklines implentation to render out the graph to a file. :)

    I plan to keep this running indefinitely, which means in two years I can produce a massive graph of the activity of the XenForo forums since this date, with an accuracy of 15 minute intervals. It should be pretty cool to see. :)

    I'm including the file here in case I change my signature in the future: [​IMG]
    Renada, Tim, maidos and 12 others like this.
  2. Floren

    Floren Well-Known Member

    It better make it into Xen! Very sharp, Erik. :)
  3. Luke F

    Luke F Well-Known Member

    +1 to this.

    For an example of it being used on a major site, see the Steam store:

  4. Erik

    Erik Well-Known Member

    Yep, see this everyday and love it. :) And because they have such a large sample, the graph is typically very smooth and so when the graph spikes, you can tell it's an outage or something similar. :)
    Dimka Linux and Darkimmortal like this.
  5. 0ptima

    0ptima Well-Known Member

    That really cool! Dont know if I would want it on my front page, but would nice to have in a stats section.
  6. Onimua

    Onimua Well-Known Member

    That would be cool to see! Just make sure you keep a backup. ;)
  7. 0ptima

    0ptima Well-Known Member

    There has been a massive spike in posts :)
  8. Erik

    Erik Well-Known Member

    The graph actually represents users online, but I'm sure there will be a massive spike in posts as well (hopefully we'll see this represented on my other graphs tomorrow - you can already see it's going up a bit.)
    HydraulicJack likes this.
  9. Brandon_R

    Brandon_R Guest

    Can you make it bigger?
  10. Erik

    Erik Well-Known Member

    It was intended to be small so that it would fit in my signature, but yeah I can take the data and make a bigger version. Give me a day. ;)
    HydraulicJack likes this.
  11. Salty

    Salty Active Member

    Erik, if you make a Xenforo analytics product I will purchase it and support it if you need resources.
  12. Carlos

    Carlos Well-Known Member

    That would be neat. :)

    But make it a toggle - some people don't like it on certain forums. I would not put this on niche forums.
  13. Erik

    Erik Well-Known Member

    *this weekend. I just remembered this but today's my birthday so I just want to relax. ;)
    Tim likes this.
  14. EQnoble

    EQnoble Well-Known Member

    Happy B-day ...what happened to your rocks? :) Indeed this could be a nice addition to the software...i'm interested in finding out more about how to implement something like this. Was going to try and read up but just woke and am still groggy.
    Can this be used to pull live data from somewhere or must all the integers be entered in manually.
    Anyways... Hope your annual birth celebration was splediferous.
  15. Carlos

    Carlos Well-Known Member

    Happy birthday Erik! :)

    Enjoy you lil' relaxing vacation. :p Cheeeers!
  16. Erik

    Erik Well-Known Member

    I had my username changed for simplicity and clarity. :)

    The script parses the data from the homepage using a regex. So I don't have to enter the data manually, but if the format or wording of the data on the homepage changes, the script breaks and I have to change it (this has already happened once or twice). :) Originally it was on a 15 minute interval, but I've changed it to 30 minutes to reduce load and because 15 minutes wasn't really needed. :)

    If implemented as a modification, it could just pull data internally, which would eliminate a lot of the load and redundancy problems. :)
    EQnoble likes this.
  17. Sir nick

    Sir nick Well-Known Member

    Gonna love the day when the 24 hour pre-sale goes. It's gonna be so high
  18. HydraulicJack

    HydraulicJack Well-Known Member

    Yeah and they said they'd tell us the date about a week in advance...
  19. Booth

    Booth Well-Known Member

    Very cool suggestion!
  20. I really like the idea

Share This Page