cweb (@cweb)

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • In reply to: Plugin: bb-Topic-Views

    Hrmmm, I just installed the plugin, reviewed the steps a few times to make sure I was correct. My view count hasn’t been incrementing at all, stays fixed at the Post count. In fact, today a few View counts have actually decremented from the Post count, weird. Seems like a simple enough plugin, did I miss some setup with the database?

    Ya I’m having the same problem. Seems there’s no logic that says:

    If (post is not from member)
    then pass post to spam rules
    else always accept

    Either that or it’s broken.

    In reply to: Avatars

    It works for me, just had to change your variable name $usermail because it’s supposed to be $email – so the code looks like this:

    function get_avatar() {

    global $bbdb;

    $id = get_post_author_id();

    $user = bb_get_user( $id );

    $email = $user->user_email;

    $default = "http://eastcoastwahines.com/images/gravatar.gif"; // Put your default avatar link

    $size = 40;

    $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($email)."&default=".urlencode($default)."&size=".$size;

    echo "<img src="$grav_url" alt="Gravatar" width="$size" height="$size" />";

    }

    Thank you very much for the detailed response. I’m sure this will help out many folks who have this issue. Let me ponder a lazy man’s approach. That lazy man being me, since I already have said bye to phpbb and have bbpress up and running. Couldn’t I run mysqldump to extract the bb_users table, then go in and modify the first few user ID’s (across the data I know :( ) and then just import that table into wp_users?

    Or since my WP install is still fresh with only a couple users, it might be easier to change their ID’s in the database, then import bb_users into wp_users?

    In reply to: User ID = 999999999?

    Ok this worked for me, here’s how I actually reset the auto_increment counter.

    NOTE: If you’ve already integrated WP and bbpress and/or if you’ve already had a bunch of new users register, this wont be so easy for you. If however, you’ve performed a fresh installation and conversion then this will be simple.

    1. make sure one of my existing users in the normal ID range is a Key_Master (this is very important). For me, I made one of my users with ID =5 the Key Master.

    2. login with the new Key Master, and delete all the users who are registered with a number => 999999999. For me this wasn’t a problem because “admin” was the only user, I haven’t had any new user registrations. If you do have new users in the 1000000000 range you’ll need to reset their ID’s (I’m not a MySQL guy so I dunno how)

    3. Once all users in the ugly high number range are deleted, you can run the command to reset the counter on your *_users table, for me it was:

    ALTER TABLE bb_users AUTO_INCREMENT = 400

    I just added a few new users and they indeed started at ID 400.

    BTW, here’s the code in the phpbbtobbpress.php converter that sets this very high ID:

    //Let's clean up the trash.
    //Your admin user will be given the biggest possible ID (I tried the biggest BIGINT but it didn't work inside bbPress)
    //If you have more than 999999999 users on your forum, you may have problems... ;-)
    @mysql_query ("UPDATE " . $bbpress_tables['users'] . " SET ID=999999999 WHERE ID=1");
    @mysql_query ("UPDATE " . $bbpress_tables['usermeta'] . " SET user_id=999999999 WHERE user_id=1");
    @mysql_query("TRUNCATE TABLE " . $bbpress_tables['forums']);

    In reply to: User ID = 999999999?

    I’ll confirm that I have this problem as well, from a phpbb to bbpress conversion. I actually tried to reset the auto_increment like chrishajer said:

    ALTER TABLE bb_users AUTO_INCREMENT = 400

    Since my original ID’s stopped at around 350.

    It didn’t work though, still incrementing in the billions. MySQL documentation says:

    “You cannot reset the counter to a value less than or equal to any that have already been used.”

    http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

    So to me that reads I need to delete the admin user 999999999 first, am I correct?

Viewing 6 replies - 1 through 6 (of 6 total)