drupaldrupal-7drupal-ajax

Counting the number of threads posted in a Drupal Forum Using Drupal API


I am New to Drupal Apis and i am now looking to build a few analytics board for our Drupal Forums.

I am looking to fetch the following data, so that i can use it generate weekly reports.

Total no of threads in a specific forum.

Total number of posts(responses) for The threads above, so that i can calculate responses by people in different groups(mods,Admins etc)

I am trying to find if i could fetch the above data using any of the Drupal API REST calls. Can anybody suggest me what would be the best approach to fetch this data, as this involves a simple read-only calls.

Thanks


Solution

  • print user_stats_get_stats('post_count', $uid); 
    

    Will print post count for a node by user

    To group them by (mods,Admins etc) you need to fetch all uids from bd and it can simply done with array_walk