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

Lack of Interest [Suggestion] User name changes Applied to older Posts

Discussion in 'Closed Suggestions' started by Andy.N, Oct 3, 2010.

  1. Andy.N

    Andy.N Well-Known Member

    I noticed that the new mod Dean used to have username Abomination and now reading his past post where someone quote him, it would show as old username instead of new username. In my experience, it would confuse new members.
    Shouldn't there a cron job to run daily to update the database with new username?
    Here is the post I link to that show that I meant
    http://xenforo.com/community/threads/xf-installation-support.2606/#post-37960

    Of course, new users would think that post belong to Abomination but it should be changed to Dean.
     
    Puntocom likes this.
  2. Dean

    Dean Well-Known Member

    I noticed that. :)

    I've seen the discussions about it but don't recall the details.
     
  3. OperaManiac

    OperaManiac Well-Known Member

    when i got my user name changed, mike specifically told me that it was technically very tough to get all instances changed.

    of course a cron job can be run to rename instances of a user name in posts/quotes to the new name. but that also risks the possibility of messing up with totally unrelated content.

    unless quotes are specifically linked to the quoted posts (like when you reply to a tweet on twitter) i guess, it would be a bad idea to just do a find and replace!
     
  4. Andy.N

    Andy.N Well-Known Member

    I do remember in VB where we can run some run Maintenance->Update Counters->Update Usernames to fix this problem. I don't remember if it would update the quotes as well.
     
  5. OperaManiac

    OperaManiac Well-Known Member

    i do not think it has worked on my forum. :) i run that command on a regular basis.

    trying again anyways. description of the feature:

    Update User Names:
    This will update user names everywhere they occur on your forums. This may need to be done after changing a user's name in the Admin CP.
     
  6. Decent60

    Decent60 Well-Known Member

    The Quote feature isn't actually linked to a username but just rather a word:
    The only way to actually get it to change in the same instance, is to use the userID instead of userName. ID's are what your account is attached to, not the name.
    However, it get's a bit harder for the member to distinguish user 335 and user 267. So names are generally used in these manners.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    I thought Mike said he had fixed this when Peggy had hers changed.

    It shouldn't be too difficult to do a replace on usernames inside quote tags.
    If not, I can't imagine the word "Abomination" has been used too many times in posts...;)

    I'll flag it up to him so he's aware.
     
  8. anotheralias

    anotheralias Well-Known Member

    I'm so glad you mentioned that, because I was wondering who the heck Dean is - I couldn't remember ever coming across him anywhere on the entire board. lol
     
    Dean likes this.
  9. Brogan

    Brogan XenForo Moderator Staff Member

    After discussion with Mike, although it would be desirable to reflect username changes in historic data (quotes, likes, etc.), it is fairly low priority at the moment (for obvious reasons).

    A simple find and replace on a text string isn't desirable or feasible as it would catch all instances of it in posted content, whether it is a username or not.
    Additionally, one of the problems is that on large boards (e.g. several million posts) it would have a severe impact on DB performance whilst the query is running.

    So the idea isn't off the table but it's not something that's at the top of the list.
     
    erich37 and OperaManiac like this.
  10. Andy.N

    Andy.N Well-Known Member

    Good to hear that M&K is aware of the problem.
    I don't imagine this is a big problem for most boards since username change is on a case-by-case basis and we can set up a cron that run at 3AM on a weekend or something. As long as the option is there, the owner can decide how best to use it.
     
  11. Shamil

    Shamil Well-Known Member

  12. Brogan

    Brogan XenForo Moderator Staff Member

    The case you are quoting above has been resolved.
    If you go back to an old post by Dean now and quote him, it will be his new username.

    The issue being discussed here is with regards to historical post content.
     
  13. AndyB

    AndyB Well-Known Member

    Older posts could be updated using a query like this. I assume there is a table called post in xenForo.

    UPDATE post SET pagetext = REPLACE(pagetext, 'quote="Abomination', 'quote="Dean')
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    I made the same suggestion to Mike this morning ;)
    Although it's not quite that simple as the post_id is in the quote tags too.
    Still easily done though.
     
  15. Shamil

    Shamil Well-Known Member

    Try do that on a large forum, with other 100K posts. It's not a nice thing to experience, especially with table-locking.
     
  16. AndyB

    AndyB Well-Known Member

    The post_id is not effected with the query I posted.
     
  17. AndyB

    AndyB Well-Known Member

    I do it all the time with over a million posts. Just takes a few seconds for the query to run.
     
  18. Dean

    Dean Well-Known Member

    I'm such a trouble maker :)
     
  19. OperaManiac

    OperaManiac Well-Known Member

    take the forum offline. let the load settle. run the query. should be possible. but then i am not very good with databases. :( almost killed one earlier this week.
     
  20. Brogan

    Brogan XenForo Moderator Staff Member

    You're right, I misread the query.
     

Share This Page