Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Forum Statistics 0.2

edited September 2006 in Vanilla 1.0 Help
This extension will place a small tab in the panel on the index page that shows some statistics about the forum. Currently in beta version, once completed, this extension will be fully configurable via the settings page. http://lussumo.com/addons/index.php?PostBackAction=AddOn&AddOnID=53
«134567

Comments

  • Looking nice vincent, I presume that in a future version you'll allow which bits of data to display?
  • edited June 2006
    I'm currently looking at that, though it may take me a bit to become comfortable with Vanilla's classing techniques If you have any other ideas for anything to be inserted into the statistics box, please say
  • Hi Vincent, lovely addon. But maybe you could cache statistics, because now it will do 5 extra queries everytime you load a page :) So, just write it to a file, and update it every time you include it and it's more than 5 minutes old or something.
  • That's a good idea. As for other stats how about some user based ones (i.e. directed to the logged in user (number of visits, posts, topics, whatever like in the profile)), and maybe some 'records' (user with most posts, topics, whatever). I generally disagree with stuff like this cause it can throw users into a competetive spam game but if there's gonna be a stats extension it might aswell include as much as it can (particularly if it's configurable like lech says and you can choose which bits to show)
  • I've about half way done with a configurable settings at the moment, but i'm probably going to deffur from that and take Jazzman's opinion with the cache. I'll also make a "Top" statistics part when i've delt with the current problems, so thankyou Minisweeper for your opinion
  • uziuzi
    edited June 2006
    Very good stuff ;)) But... eh... how to change the language-definitions??? In the default.php are only 2 defined....
  • Heads up people, version 0.1.1 is out and it has cache included aswell as unique languages
  • uziuzi
    edited June 2006
    I don't understand. Have I to add the other definitions myself into the default.php???
  • woops, sorry, i think i overwrote the version that had the languages... it's fixed now
  • Ok everybody, Forum Statistics 0.2 is out and you'll now able to show and disable all the statistics through the settings tab. I'll now be try to make a system to allow people to arange them in an order that they like and add more statistics like "Top Posters" and such like that.
  • Hi Vincent,

    I took a look at your code, and see that you've started following Mark's guidelines and his coding rules! Good good! But if I can make two remarks: instead of using php's mysql functions you should use the SqlBuilder class, and the configuration can be done a lot easier, as Mark has implement a really easy to use ConfigurationManagement system! :) If you need any help on how to use these classes let me know :)
  • Thanks for that Jazzman Basically, i've only started making two mods yesterday, so it's taken me a bit to find out the functions and how they're used, but i'm sure that it'll probably be an easy thing to do if i study the awsome library that Mark's been able to make. I'll also have a look at the SqlBuilder class and i'll change the "current(mysql_fetch_assoc(" into something easier and more standard And by the way, i didn't really mean to bring everything into standard, but as it seems, it's probably the easier method of making stuff with Vanilla, which i'm excited about because this forum is uniqually kool!!!
  • edited June 2006
    Vincent, the way you fetch the data is way easier than the SqlBuilder library. But that class makes it possible to connect to different kinds of database systems so you don't have to change the mysql_fetch blabla in the php file :)

    It took me like a month or so before I completely knew how Vanilla worked. So with the two days you've spend, you've done a great job :)
  • Just thinking out loud here, vincent, incase you were looking for other stats to add. How about stuff like most viewed thread, biggest thread, longest running thread, etc. I'm not sure how easy these are to grab but i just thought i'd throw them out there.
  • As an idea, would it be possible to only show the Statistics data to certain levels of users, set in the prefs (ie admin see it; members and non-registered users don't)?
  • If deactivating the extension there is an error:

    param: 'Statistics'
    response: "
    Failed to modify the extension


    P.S. Jazzman, the same error ;)
  • edited June 2006
    Thanks for the input guys!!! SqlBuilder - yup, i'll probably be able to learn that soon, so watch out for it in the newer versions Biggest/Smallest Threads - Yes, i can see that that's accomplishable, though it would slow down the database a little bit, so it will probably needed to be cached, and a warning put into the admin section, but it can be done ;) Only show to sertain users - Again, yes, but this one would need to be taken into thought a bit before i get too far with a couple of my own ideas ;) Deactivating error - isn't the deactivation proccess just with the extension file in /conf ?? if not, please correct me so i can look into it, because i have no idea why it would do that. Any suggestions will be gladly appreciated And again, i appreciate this input from u guys!!! EDIT:// Now that had a look at the database again, i've found that there are numerous things that i can do, though i want to impliment an idea for a more efficent system of doing things before i continue on too far and get huge blocks of needless coding
  • only show to certain users should be quite easy to add: See this page on checking against roles and adding preferences in the docs.
  • Unfortunately the way that i'm thinking of displaying the data will complicate this a little bit...
  • If anyone wants to know, i've modified the whole script so it's heaps easier to add different types of statistics, which is what i've done in the latest version
This discussion has been closed.