1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trophy User Titles Issue After Import

Discussion in 'Troubleshooting and Problems' started by Trip, Oct 23, 2010.

  1. Trip

    Trip Active Member

    Quick question about the user titles. I successfully (and very smoothly I might add) imported my vB 3.8.4 info into my new xF forum. I have a number of members with established post counts (1000+) and I have my "post count user titles" set up...new member 0 posts, member 25 posts, etc, etc. My issue is that everyone is showing as a "new member" regardless of their post count. I tried "updating user titles" and rebuilding all the caches and ran all the crons. No joy. Are members required to login before the information is updated? Or am I missing something?
     
    CyberAP likes this.
  2. Lawrence

    Lawrence Well-Known Member

    The next time the cron runs, and if the member has been active recently, their Trophy points will be updated, which will update user titles.
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  4. Trip

    Trip Active Member

    Thanks, I wonder if there is a way to temporally change the cron to include all users and run it just the once, and then simply set it back. In my case (after import) it looks a bit "out of sorts".
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You should be able to edit this file:

    library/XenForo/CronEntry/Trophy.php

    This looks like the relevant code:

    Code:
    		$users = $userModel->getUsers(array(
    			'user_state' => 'valid',
    			'is_banned' => 0,
    			'last_activity' => array('>', XenForo_Application::$time - 86400)
    		), array(
    			'join' => XenForo_Model_User::FETCH_USER_OPTION
    		));
    
     
    Abracadaniel, MrC and Dean like this.
  6. Trip

    Trip Active Member

    Thanks Jake, you were right that worked as far as the trophy points goes. I'm still trying to figure out how to update member's user titles. I still have that
    'new member" thing going on. I would have thought that cron would have controlled that too, but I guess not.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I just ran an import to test this. User titles appear to update immediately once the trophy points are in.

    Check xf_user.trophy_points in the database for one of the problem users. Make sure their trophy points are showing an expected value after having run that cron.
     
  8. Trip

    Trip Active Member

    I see a number of different entries per problem user. Looks like the expected values though. Strange thing is that this isn't isolated to a few users here and there, it's everybody who doesn't have a custom title. The user rank ladder doesn't work correctly for me at all.
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I just spent some more time testing the title system. Everything is working as I would expect when I mess with the titles of my imported users.

    A few things:

    1) Check for custom titles in your groups:

    Admin CP -> Users -> List User Groups -> [click a group] -> User Title Override

    If a title is set here then it will override the default ladder of titles.

    2) Keep in mind the Display Styling Priority for each group. If a user belongs to multiple groups then the highest priority group will take precedence when it comes to the User Title Override. Make sure the relevant groups don't have the same priority or it becomes ambiguous.

    3) This counter will rebuild the user titles following changes to the ladder or groups:

    Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches

    I have confirmed that this counter processes all users regardless of last activity.
     
  10. Trip

    Trip Active Member

    I'm using the registered user group as an example. User title override is set to "use the default user title ladder" with a display styling priority set to 0, edit custom title is denied. I'm using one registered member to troubleshoot (although the issue is w/all members in the registered member group). This member has message count of 29, he has been on and posting since the import to xF.
    My ladder is as follows:
    New member-0
    Member-25
    Active Member-100
    Well-Known Member-500

    If I look up this member directly it is showing him in the user group "Registered" with no secondary user groups boxes checked, user state is valid. I've run the user cache and cron, technically this member should be showing as "member" but he is showing as "new member"

    I installed as fresh beta 2 on my local test server. I left all settings stock and never touched a thing as far as permissions of otherwise. I created a member created a number of posts to move up one notch on the ladder, and he is still listed as new member. Obviously I'm missing something, I was starting to think it had something to do with the import or "self-induced bug" but my local test site is showing the same problem.
     
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The titles go by trophy points, not post counts. Trophy points can be awarded by post count though.

    Admin CP -> Users -> Trophies

    Admin CP -> Users -> Trophy User Titles
     
    Dean and Trip like this.
  12. Trip

    Trip Active Member

    I thought the user ladder was based on post count. I even read the ACP trophy title page wrong as well...minimum points (not posts). Thanks for the help and setting me straight. I have to get out of yesterdays way of thinking and get on board with xF's way of doing things ;)
     
  13. sophie1204

    sophie1204 Active Member


    I'm thinking about trying this myself, but I'm not sure what code edits need to be done to make this happen. Any advice?
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Remove the red code:

    Code:
    		$users = $userModel->getUsers(array(
    			'user_state' => 'valid',
    			'is_banned' => 0,
    			'last_activity' => array('>', XenForo_Application::$time - 86400)
    		), array(
    			'join' => XenForo_Model_User::FETCH_USER_OPTION
    		));
    
     
  15. sophie1204

    sophie1204 Active Member

    Thanks! Appreciate the help.
     
  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  17. sophie1204

    sophie1204 Active Member

Share This Page