Hi,

If you wish your user_titles to be given on the base of user_stats post count, this is for you.

/**
 * Sample hook implementation for user_stats; should be placed in user_stats
 */
if (module_exists('user_stats') && !function_exists('user_stats_user_titles')) {
  function user_stats_user_titles($op, $uid = NULL) {
    switch ($op) {
      case 'register':
        return 'user_stats';
      case 'name':
        return t('User Stats');
      case 'description':
        return t('Count of post and/or comments');
      case 'units':
        return t('Posts');
      case 'url':
        return 'admin/help/user_stats';
      case 'get':
        return user_stats_get_stats('post_count', $uid);
    }
  }
}
CommentFileSizeAuthor
#1 user_titles-597028-1.patch1.36 KBrooby

Comments

rooby’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.36 KB

I haven't had tome to test this out properly yet but here is your code in a patch.

You have to apply the patch in #453190: Role based titles first.
This is because that patch moves the integration with userpoints, user_stats etc. out to separate submodules, which is better.
So with this patch you also have to enable the user titles user stats module.

agileware’s picture

Status: Needs review » Fixed

Committed and in 6.x-1.0-beta3

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.