Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla 2.0.18.4 , user stats

422422 Developer MVP
edited December 2012 in Vanilla 2.0 - 2.8

Never bothered reading any posts on this before.

But, wondered what post counts there are ( ie, does vanilla keep tally on post counts ) such as:

number of threads made
number of posts made

also is there a method, for displaying all threads a member has made ?

also is a reply count kept on a per thread basis..

so if user A ) makes a thread ..

we can extract data such as:

User A:

thread x = 12 replies

total threads started = 120

total replies made = 480

see all threads made by [ user A ] = click here

Just wanted to know, what we can do to echo this data out, and if anyone has any sample code or can share some ideas.

There was an error rendering this rich post.

Answers

  • peregrineperegrine MVP
    edited December 2012

    Hey 422

    But, wondered what post counts there are ( ie, does vanilla keep tally on post counts ) such as:

    number of threads made number of posts made

    see
    http://vanillaforums.org/addon/statisticsfooter-plugin

    also is there a method, for displaying all threads a member has made ?

    see usercomment table and userdiscussiontable.

    also look in user table commentcount and discussioncount

    also is a reply count kept on a per thread basis..

    in your discussion topic page
    usercomment and userdiscussion table

    so if user A ) makes a thread ..

    we can extract data such as:

    User A:

    thread x = 12 replies

    total threads started = 120

    total replies made = 480

    see all threads made by [ user A ] = click here

    click on the profile and look at code.

    Just wanted to know, what we can do to echo this data out, and if anyone has any sample code or can share some ideas.

    see

    http://vanillaforums.org/addon/memberslistenh-plugin

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • 422422 Developer MVP

    Cheers mate will check it out :) thankyou

    There was an error rendering this rich post.

  • businessdadbusinessdad Stealth contributor MVP

    Good answer, @peregrine. I used what you write to create the User Statistics plugin, StackOverflow style. :)

  • peregrineperegrine MVP
    edited December 2012

    @businessdad said:
    Good answer, peregrine. I used what you write to create the User Statistics plugin, StackOverflow style. :)

    @businessdad
    I'd still like to see the code posted :). it is visually appealing.

    And yes I could try to emulate it - "if wanted to and had the time and other conditionals :):):)" (joke in case you didn't realize).

    we also need more good questions posted about vanilla internals. and you and a few others have great ones? a bit tired of the "bonks" and the obvious question that is asked - when a quick search is the answer. :).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • businessdadbusinessdad Stealth contributor MVP

    @peregrine said:
    I'd still like to see the code posted :). it is visually appealing.

    I'm still negotiating with the client who commissioned it, then I can distribute it. I just have to see how much money they will ask me to pay, to get the rights to do so. :)

  • @businessdad said:
    I'm still negotiating with the client who commissioned it, then I can distribute it. I just have to see how much money they will ask me to pay, to get the rights to do so. :)

    and the costs will get passed down to the consumer :).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • businessdadbusinessdad Stealth contributor MVP

    @peregrine said:
    and the costs will get passed down to the consumer :)

    That is quite possible, especially because the plugin is quite complex and required a significant amount of work. It also includes an API system that allows external websites to fetch the statistics in both XML and JSON. :)

  • 422422 Developer MVP

    To be honest, Businessdad you may have hit the nail on the head, in terms of fetching the data for external application.

    What I am after is:

    master site : abc.com
    forum area : abc.com/forum/

    We fully use one integrated database.

    On master site: on any particular page ( obviously probs on the user profile page )

    thread x = 12 replies ( most popular thread link )
    thread/post y = 4 mins ago ( most recent thread / post )

    total threads started = 120

    total replies made = 480

    see all threads made by [ user A ] = click here

    That kinda thing, then we can attribute points into our existing points system, also. Plus fire off some stat graphing

    There was an error rendering this rich post.

  • what do you mean most popular thread link (highest comment count).

    SELECT InsertUserID, DateUpdated, CountComments FROM GDN_Discussion ORDER BY CountComments DESC limit 1;

    use the timeago thing to subtract now() - DateUpdatedinfo

    by user e.g. user 2 returned above from InsertUserID

    SELECT CountDiscussions, CountComments FROM GDN_User where UserID = "2"

    total threads started = 120 is CountDiscussions

    total replies made = 480 is CountComments

    just create a php program that has access to your database

    and call it with userid for

    see all threads made by [ user A ] = click here

    api or whatever it's within your ability :).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • businessdadbusinessdad Stealth contributor MVP

    @422 said:
    To be honest, Businessdad you may have hit the nail on the head, in terms of fetching the data for external application.

    That kinda thing, then we can attribute points into our existing points system, also. Plus fire off some stat graphing

    Actually, the User Statistics plugin was designed exactly for that purpose. In my case Master site is an ecommerce, and forum statistics will grant Users some discount points (or something like that).

  • peregrineperegrine MVP
    edited December 2012

    A "Most Popular Plugin". Would there be interest in this.

    popular by views or comment counts
    or 3 or 5 most popular
    or all-time popular and monthly or weekly popular.

    an example of a sidepanel.

    any sponsors out there :)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • could probably add a line to activity that shows popular discussion.
    as well as a popularity badge to the users profile.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.