Skip to:
Content
Pages
Categories
Search
Top
Bottom

Assign posts to author by ip?


  • Halo Diehard
    Participant

    @halo-diehard

    Anybody know of a way I can assign posts to authors by their ip? All my imported posts are being assigned to the admin 🙁 but they have the correct ip’s attached to them. I did opt to import users with the posts.

    WP Version: 3.6.0
    bbPress Version: 1.8.1

    I’m importing from phpBB3 and yes I synced everything in phpbb3 first and then in bbPress after 😉 I am also having other issues that I’m trying to get support for in another thread (posts only import up to five months ago)

Viewing 1 replies (of 1 total)
  • With some luck after we work out what is going on in that other thread you won’t need to do this, that said it does need doing a simple UPDATE query is all that will be needed.

    This is a good query to have a look around and see the data matches based on what the IP was of the post and the users last known IP address, this no doubt is not going to be accuate if the users IP changed from their first post to their last post and maybe every post in between.

    SELECT 
    phpbb_posts.post_id, phpbb_posts.poster_ip, phpbb_posts.post_text, 
    phpbb_users.user_id, phpbb_users.username, phpbb_users.user_ip 
    FROM phpbb_posts 
    LEFT JOIN phpbb_users 
    ON phpbb_users.user_ip = phpbb_posts.poster_ip

    It would be much better to do an update query using phpbb_posts.poster_id if your database tables are not in a mess but that won’t be known until the other thread is resolved.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar