Statistics and Tendencies

This product is a complete statistics display engine, which can be used to replace some graved:
Site Life Status – vBulletin.org Forum
vbTrends – An Enhanced Statistics Box on Forum Home – vBulletin.org Forum

These two were overtaken by me, and were requested by many visitors here lately… They were not used for this engine as they are not following my protocol… but thanks for the inspiration!

The first goal was to add some informations on your « Site Statistics » block in the footer of the Forumhome, this one:

Here is the block without any product added:

nex_stats_tend_fh_0.jpg

Here is the simple version, adding details without changing the format:

nex_stats_tend_fh_1.jpg

in this version, when you hover the numbers, you see the whole stats!

And here is the Textual version, for the ones who do not like to hover words!

nex_stats_tend_fh_2.jpg

But there is more. Basically, this engine which require only one query to create the whole statistics, and one additional query if you display X new members, is also the same which create an entire statistics and tendencies page which is displayed like this:

nex_stats_tend_mainpage.jpg

the link to access this page is the title of the statistics block on forumhome… or misc.php?do=tendencies >> vbEnhancer.com – Statistics and Tendencies

The statistics for each day of the chart can be read by hovering it. if you hover the colors parts, you see their values, and if you hover the date, a complete description of the day is displayed.

You have some settings with this engine, to change the colors in the charts, and configure what is seen:

nex_stats_tend_admin_options.jpg

That’s about it for the features.

A note on the installation: This engine is using your existing site content to create the statistics display, and statistics can not be built with mist… You need a sitelife of at least 2 complete months to make it so, therefore the product file will verify this information and if your site is too young, the product will not install itself.

Some persons would say they want their stats anyway… too bad, performances and tendencies can not be evaluated with no content. Anyway, what would you do with these details, a 2 months old forum is not sellable, the stats are too tight to mean anything, and you can not determine anything based on a chart that have nothing to display.

Ok, and the usage… This engine is not a complete « google analytics » clone, it just display what already exists on your site. Posting and registrations rate is not very useful if you want to see what is popular and what not… but it’s a start. A more complete statistics engine will be released soon for more complex analysis and trafic evaluations.

So what can we see in these charts?… The days your members post the most, the % of real active members, as you can see if the newly registered are the ones to be active compared to the existing ones (if you have 10 active and 8 new registered, it means your existing members are not participating!).

That’s about it…


note: july 18th, 2009: version updated to 1.1.0, with the addition of the « New Subscriptions » display, and some esthetics changes. Now you can show the number of new subscriptions in the main page, giving a good idea of the members membership. This is a on/off switch.

note: july 22th, 2009: version updated to 1.2.0, with the complete transformation of the Tendencies calculation. We now use a complete new engine to calculate the tendencies for the next month, accurate and using the gray matter instead of my fingers. It requires a new file upload btw, you need to upload the file to the proper location and update the product… added permission per usergroup too… check the Options page, in the bottom!

note: august 1st 2009, no version change, corrected the « divide by zero » problem… again!

note: august 4th, version changed to 1.2.1, just a detail, added the proper code to fetch usergroup markup for « Latest X New Members » … so now they show with their usergroup.

note: august 20th, 2009, added a « class_for_43.zip » archive in the distro to fix some incompatibility with older versions of PHP. as on this site we’re using only the latest PHP version to avoid collision of genres, i’m providing an « obsolete » version that will help those who are hosted on a server older than PHP 5.1… simply upload the folder the same way you do with the original code, it will replace the file « nex_stats_tend_classes.php ».

note: october 8th, 2009… after many tries to display the date properly for international languages, i think i have it… 🙂 this is a fix, so no version update. JUST import the product again, overwriting the actual installation.

note: lundi 19 octobre 2009, ajout du fichier langue française de la part de vBulletin-Ressources

123 réponses sur “Statistics and Tendencies”

  1. hum, i forgot to mention, this product is self exploding…. hum, self-installing. No file edit, no template edit. All the display is inside templates, so you can customize as you wish.

    Also, it is not changing your database, it use only existing stats from vBulletin.

    If you already have seen a chart that look like the one i created for this engine, you are not wrong. Two years ago i rebuilt a chart for the engine called Statpress, a plugin for the WordPress blog engine. the design was cool and the display was reformated to be useful also, and i decided to use the same technique here… see the original:
    overview_statpress.jpg

  2. @natecoupons 21696 wrote:

    is there a way to limit the graphs page by usergroup??

    You can restrict it for example with this code.

    only members in group 2 will see this content.
    all members except those in group 2 can see this content [/CODE][CODE] only members in group 2 will see this content.
    all members except those in group 2 can see this content [/CODE]

  3. I really like this, is there anyway to bypass this message

    Sorry, but this product will install ONLY if your site is at least 2 months old, after 10 weeks of activity.

    I’m trying to install it on a forum that we imported from another script, the site is years old, but only on vb for a few weeks

  4. version updated to 1.1.0, with the addition of the « New Subscriptions » display, and some esthetics changes. Now you can show the number of new subscriptions in the main page, giving a good idea of the members membership. This is a on/off switch.

  5. Updated this engine with a complete new protocol to calculate the Tendencies for the month to come.

    source: AdSpeed.org | Giving it back: Time-Series Forecasting with PHP

    This is what is now used to calculate all the appropriate things.

    So you need to upload the file found in the directory « UPLOAD_THIS » in the right structure, creating the directory named « nex » if you do not have anyother product from here.. and update the product file.

  6. hey, sorry, but you will have to download it again… 🙂

    while you were checking it, i re-uploaded the product with a missing feature, the permissions block.

    now when you go to the AdminCP >> vBulletin Options >> Nexia’s Statistics and Tendencies

    you will have a block on the bottom, where you select the usergroups you want to give access to for the main page of stats… 🙂 as requested by [user]natecoupons[/user]

  7. Great Mod! I was looking for vbTrends and found it no longer available, I am glad you have created this.

    I do have a couple of questions. How do I change it so any plus % is Green and any minus % is Red?

    Also, I know you have the usergroup setting as to who can see the graphs, but can this be made to limit who sees this Stats vs the default?

    I would like my Admin/Moderators/Charter members to be able to see this but not any other group.

    Thanks a lot for any help you can give me.

    Jamie

  8. oh, you have a good idea about who see the stats vs the default… i will check that tomorrow.

    and for the plus/minus, i have this for the forumhome[html].nex_stats_tend_fh_plus {
    font-weight: bold;
    color: green;
    }
    .nex_stats_tend_fh_minus{
    color: blue;
    }[/html]
    but i forgot to add it to the main page… i’ll do it for the main page while checking your suggestion of permisions.

  9. @xOBKx 22356 wrote:

    misc.php?do=tendencies

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 25

    –EDIT–

    Error seems to have disappeared now. Thanks, this is great! 🙂

    Im Still getting this error

  10. Okay, that was no bug, but I am a bug-hunter and I always find something. lol 😉

    Im sure, that the « active users » part in the tables is calculating wrong or at least pretty confusing.
    Look, the chart is showing well how many users were active the last few days. So day by day is okay. But for weeks and months it just summarise the active users by day and say, that a week ago there were 7 x (active users/day) active. I for example have just 14 members(new project to start) and in stats it say last month there were 154 active members, but I do only have 14. 🙂
    So it sum up the active users of each day to display.

    I for myself leave the (10/day) part in, but the summarise is confusing.

    Please wise me up if I am wrong. Maybe today I just had a bottle too much. 😉

    In respect
    cloni

  11. i know it’s a bit confusing, but the calculation is based on the actual way vBulletin store stats, which is partly wrong… they are supposed to fix this with 4.1 or later, as we’re looking at a new way to build the stats…

    i may change this in the next version, where we will be able to check who really logged-in in the right period…

  12. Well, I just drop the value and leave the « value/day » part in, because that is working good. 🙂
    Thanks anyway … by the way(dont kill me! lol) the WOL part is missing. Not showing in whos online, that I am watching the stats. 😉

    cheers mate

  13. you have to upload the folder itself so it create the directory /nex/ if not done already *(some of the other products already have it)… the file « nex_stats_tend_classes.php » have to be inside that folder/directory…

    the script is compatible with 3.8.x

  14. @nexia 22617 wrote:

    you have to upload the folder itself so it create the directory /nex/ if not done already *(some of the other products already have it)… the file « nex_stats_tend_classes.php » have to be inside that folder/directory…

    the script is compatible with 3.8.x

    Ok, I see.

    Thanks for the quick reply !!

  15. Hi,

    I uploaded the folder (« nex ») and the product xml file but when I click the link « Forums Statistics and Tendencies » I get this error:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /var/www/sites/worldlawdirect/forum/nex/nex_stats_tend_classes.php on line 38

  16. Hi–We have a dedicated server.

    PHP 4.4.8

    MySQL Version 4.1.22-standard

    Shouldn’t that be sufficient?

    BTW, I installed recently few other mods from the vbulletin.org and vbseo.com sites without a problem…

    :grin_Confused:

  17. Hi Nexia,

    I uploaded the updated nex folder (from the « class_for_43 » zip file) and I can see now the stats page but there are still some errors displayed above the stats…

    Warning: Invalid argument supplied for foreach() in [path]/nex/nex_stats_tend_classes.php on line 50

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 66

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 193

    Warning: Invalid argument supplied for foreach() in [path]/nex/nex_stats_tend_classes.php on line 50

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 66

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 193

    Warning: Invalid argument supplied for foreach() in [path]/nex/nex_stats_tend_classes.php on line 50

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 66

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 193

    Warning: Invalid argument supplied for foreach() in [path]/nex/nex_stats_tend_classes.php on line 50

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 66

    Warning: Division by zero in [path]/nex/nex_stats_tend_classes.php on line 193

  18. i’ve asked 3 of my guys over here, and it will be impossible to make a backward compatible version after all. the overall structure of the statistics is based on classes that are PHP 5.2 and newer… i thought it was not a problem for most of the hosts, but some versions of PHP 4.3 are incompatible…

  19. Why not just upgrade your php or ask your provider to do so. Online business competition needs fitness or you ain´t gonna survive at all … Darwin waves.
    Consequently, providers must upgrade and I believe by asking them, they will do so. It is very easy to upgrade to php 5 if you have cPanel in your sever tho.

  20. it’s not always the case cloni, even when you have a dedicated server, if all your applications are based on PHP 4.3+, you may encounter a lot of incompatibilities, so it would break your site for long time…

    and i don’t think it worth upgrading just for a freebie.. 🙂

  21. Hello guys!!

    Thank you for all the replies.

    @nexia 22655 wrote:

    it’s not always the case cloni, even when you have a dedicated server, if all your applications are based on PHP 4.3+, you may encounter a lot of incompatibilities, so it would break your site for long time…

    and i don’t think it worth upgrading just for a freebie.. 🙂

    That is the real concern we have. Our main site is not compatible yet with PHP 5 and about two years ago we have installed a wikipedia type hack (nuwiki software) for the vbulletin. The software works great even with the vb 3.8 series but unfortunately the developer of the software completely disappear over a year ago and there is no official support available for the product anymore.

    Sooner or later we will have to face all these issues before we decide to make the PHP upgrade.

    Anyway, the stats mod seems to work fine even with the error messages displayed above the stats, here is the snapshot of the stats page…

    Forum Statistics & Tendencies – WORLD Law Direct Forums

    i’ve asked 3 of my guys over here, and it will be impossible to make a backward compatible version after all. the overall structure of the statistics is based on classes that are PHP 5.2 and newer… i thought it was not a problem for most of the hosts, but some versions of PHP 4.3 are incompatible…

    I guess there is no easy workaround solution how to fix the code for the PHP 4.8… I would be happy to pay for it otherwise.

  22. @wld 22669 wrote:

    I guess there is no easy workaround solution how to fix the code for the PHP 4.8… I would be happy to pay for it otherwise.

    i told Drew, my real OOP coder that it was needed to find a fix, i am waiting for his answer… 🙂

  23. Ok, you can try with the new « class_for_43.zip » file, [user]Drew[/user] recoded what need to be recoded to make the class more compatible… i think.. lol

    it works on this site, so i suppose it will on yours.. tell me!

  24. @wld 22702 wrote:

    How can I pay for all the extra work? Or at least donate some small money…

    no need, you subscribed to this site for this engine, so it is normal that it works as announced. btw, now you have my paypal email, you do what you want…

  25. Hi Nexia. It’s normal that in my forum doesn’t appear the numbers for d/m below the bars like in your screenshot?

    Also I’ve translated to spanish but I don’t know what means « Tendencies for F Y » in the last row:

    tend.jpg

    Regards

  26. euh, il est pas déjà traduit?… j’au oublié d’y mettre le fichier language… misère…

    de toute façon la correction de l’erreur que tu vois n’a pas rapport à la traduction mais à la fonction appellée pour afficher la date.. 🙂

    j’y reviens!

  27. je vais mettre à jour la version dans la soirée… n’effacer que vbdate pour le remplacer avec date ne va pas aider, si les traductions ne sont pas disponibles… je vais voir à remplacer la fonction…

    et pour la trad., je ne la trouve plus.. si tu veux t’amuser, faut pas se gêner!

  28. @nexia 22978 wrote:

    je vais mettre à jour la version dans la soirée… n’effacer que vbdate pour le remplacer avec date ne va pas aider, si les traductions ne sont pas disponibles… je vais voir à remplacer la fonction…

    et pour la trad., je ne la trouve plus.. si tu veux t’amuser, faut pas se gêner!

    Pas de mise à jour du hack ?

  29. @nexia 23047 wrote:

    ça va venir, j’ai pas pu coder du week-end, et avec toutes ces demandes de support,… lol

    je reviens là dessus d’ici demain, c’est mineur mais je dois tester plusieurs languages.

    Dump :grin_Tongue:

  30. @Allan 23045 wrote:

    Pas de mise à jour du hack ?

    the hack was updated this morning, with a fix for the date display…

    the big problem is actually the language files that use the « local » thing in the settings of the language… this is a complete mess with the default vBulletin structure of things, and Jelsoft never fixed this in vbdate()…

  31. @nexia 23238 wrote:

    the hack was updated this morning, with a fix for the date display…

    the big problem is actually the language files that use the « local » thing in the settings of the language… this is a complete mess with the default vBulletin structure of things, and Jelsoft never fixed this in vbdate()…

    Thank you 😉

  32. Thank you!

    @nexia 23238 wrote:

    the hack was updated this morning, with a fix for the date display…

    the big problem is actually the language files that use the « local » thing in the settings of the language… this is a complete mess with the default vBulletin structure of things, and Jelsoft never fixed this in vbdate()…

  33. times I’ve turned off all the hacks at times to see whether it is an error, but unfortunately still appears on the errors:

    Parse error: syntax error, unexpected ‘;’ in /homepages/1/……..99/htdocs/Forum/index.php(631) : eval()’d code on line 359

  34. Hi Nexia,

    I have used it for 3 days but there are has problem i’d like to ask:

    1. In this line :

    Quote:
    Yesterday only, we welcomed xx new members among our active members. xx new discussions and xx new messages were posted

    is error can not Statistics

    2. in this line

    Quote:
    has xx members, and we have xx new members this month, a change of xx compared to september.

    has missed something like demo….

    hope u fix it, thanks

    Sorry my english bad

  35. @nexia 23410 wrote:

    [user]Allan[/user] nous fourni le fichier langue française pour la dernière version, merci de la part des gens de vBulletin-Ressources

    le fichier source est mis à jour et vous trouverez le fichier phrases françaises dans /languages/ comme d’habitude!

    hello, deux petits oublis
    comparer à september

    en october

  36. @nexia 23438 wrote:

    je crois que c’est la traduction que j’ai de vBulletin « core » qui a ce détail… ou manque ce détail et utilise les mots par défaut… tu peux vérifier?

    Oui, j’ai ce problème sur vBr, mais ce n’est pas du à ce hack, je vais regarder.

  37. I get This error, any help?

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 81

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 4

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 82

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 4

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 83

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 4

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 84

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 4[/CODE][CODE]
    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 81

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 4

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 82

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 4

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 83

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 4

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 84

    Warning: Division by zero in [path]/index.php(594) : eval()’d code on line 4[/CODE]

  38. k thank you nexia, i just reinstalled my board, and first im gonna install vbseo & vba, then ill install this, maybe it will work woth no other plugins ill update you after im done

    btw im using vb 384 pl1

    ok ive tried class 43 and normal and i still get that error, ive even disable all other products

  39. hum, oh… oups… you mean they are all at zero…

    oh. yeah, it is not indicated in the page, forgot to mention that… you have to rebuild your stats once to have this feature to generate all the old stuff…

    very sorry:

    Admincp >> Maintenance >> Update Counter >> Rebuild Statistics

    and the stats are supposed to update once a day, when the cron « Daily Cleanup » runs…

  40. no, rebuilding the stats will just update them … the system simply check each day and recount all the datas… it is not deleting the stats, it is refreshing them… with my product installed, it will also calculate the old subscriptions.

  41. @nexia 25798 wrote:

    no, rebuilding the stats will just update them … the system simply check each day and recount all the datas… it is not deleting the stats, it is refreshing them… with my product installed, it will also calculate the old subscriptions.

    Ok, thanks, but doesn’t seem to work.

  42. Hi Nexia,

    this product did total up after a day, I have to rebuild stats by hand through ACp function (Admincp >> Maintenance >> Update Counter >> Rebuild Statistics), Can you fix this error?, thanks

    P/S: i has been been this error for 3 months