Results 1 to 7 of 7

Associating likes to a new user from an old account.

This is a discussion on Associating likes to a new user from an old account. within the General Discussion forums, part of the vBSEO SEO Plugin category; I'm hoping someone can help. A long story short over the past couple of years we allowed under exceptional circumstances ...

  1. #1
    Senior Member Array
    Real Name
    zelnik
    Join Date
    Aug 2008
    Posts
    101
    Liked
    3 times

    Associating likes to a new user from an old account.

    I'm hoping someone can help.

    A long story short over the past couple of years we allowed under exceptional circumstances accounts to be deleted from our site (not banned) and now we've decided to revert that rule.

    The only way to "re-enable" the very few accounts we have that have been deleted was to add a new user and then associate the old "guest" posts to the new accounts

    using the following code

    Code:
    UPDATE post SET userid='123' WHERE username='Old Username';
    that seemed to work fine for the threads/post counts and so on but not the vbseo "like" system as it's empty and posts that the former deleted user liked are showing up as an old username (when we deleted the users we changed the username also before deletion)

    I know it's nothing wrong with the vbseo package so I know it's quite cheeky to ask but it would mean a lot if someone could help to try and re-associate the likes to the new user account?

    Thank you so much.

  2. #2
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    Hello,

    you can use these queries to update the likes:
    UPDATE vbseo_likes SET l_from_userid=123, l_from_username='New Username' WHERE l_from_username='Old Username';
    UPDATE vbseo_likes SET l_dest_userid=123 WHERE l_dest_userid=OldUserID; (if you have the OldUserID)
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #3
    Senior Member Array
    Real Name
    zelnik
    Join Date
    Aug 2008
    Posts
    101
    Liked
    3 times
    Thanks so much oleg!

    I think I have found the old userid for the user from a very old backup, their username whenever i search it has the same number near it so I assume so!

    Do I need to run both those queries?

    Also, one final question before I try if possible.

    Now obviously this "new" account which I created to associate all the old posts to has 0 reputation from the old VB rep system for which the original user account would have had hundreds of rep points.

    Do I need to issue a command to copy all the old user (deleted guest account) built in VB rep first before doing the vbseo likes? if so do you know how to do this? or is that OK since the importer had already done that prior to the deletion of the account?

    Thanks so much for your time and effort on this matter, really appreciate it!

  4. #4
    Senior Member Array
    Real Name
    zelnik
    Join Date
    Aug 2008
    Posts
    101
    Liked
    3 times
    Quote Originally Posted by Oleg Ignatiuk View Post
    Hello,

    you can use these queries to update the likes:
    UPDATE vbseo_likes SET l_from_userid=123, l_from_username='New Username' WHERE l_from_username='Old Username';
    UPDATE vbseo_likes SET l_dest_userid=123 WHERE l_dest_userid=OldUserID; (if you have the OldUserID)
    Sorry Oleg but do I run both these queries?

    Also on both query the first userid is that the new created user or the old deleted account userid?

  5. #5
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    If you don't have the OldUserID then you would run only first query (new user ID should be specified)
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  6. #6
    Senior Member Array
    Real Name
    zelnik
    Join Date
    Aug 2008
    Posts
    101
    Liked
    3 times
    Quote Originally Posted by Oleg Ignatiuk View Post
    If you don't have the OldUserID then you would run only first query (new user ID should be specified)
    Thanks Oleg.

    First I tried to do just the second query as I had both userid's and that did nothing.

    So I tried both and now it's kind of working but not updating the counter for given or received but if you click on the given or received the posts show up, just the counter is not working.

    Is there a counter I have to refresh?

  7. #7
    vBSEO Staff Array Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,818
    Liked
    192 times
    Yes, you can use the vbseo_likes_calc.php file form vBSEO package ("docs (do not upload)/importers/" subfolder) for that.
    Oleg Ignatiuk / Crawlability Inc.
    Security bulletin - Patch Level for all supported versions released

    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


Similar Threads

  1. Likes tab not always showing in user profile.
    By IcEWoLF in forum General Discussion
    Replies: 2
    Last Post: 01-08-2012, 09:52 PM
  2. vBulletin 3.x user with a billion likes
    By MentaL in forum Troubleshooting
    Replies: 2
    Last Post: 12-13-2011, 02:36 PM
  3. Overall stats for Likes tab in User Profiles?
    By DevOne5555 in forum General Discussion
    Replies: 2
    Last Post: 07-24-2011, 07:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •