@bernard_timbal was asking to me last week if it’s possible to re-link the posts he have created previously on BOB to his current profile (instead of the default @system user actually).
During the migration process we have decided with @DaveRathbun that it will be too much work to do it during the migration (ask for each user etc…), but I think it can be possible now. I just want to check if some are interested in such process, and I will spend some time on it.
Thanks for your vote !
Do you want to re-link old posts to your current profile ?
That’d be really useful.And it’s probably not doable to link old posts to new, is it? Only I frequently google stuff which points to the old forum, which is now a dead end …
I have a work in progress regarding changing internal links (old ur to new url). But I can’t change google or other sites But slowly old links will be dereferenced by google and new url will be foundable on google. It will take just time.
I think we need this, I’m not able to open a link to any of the old questions on the old forum, it asks for my username and password (which I lost and reset) and the temp password I got in the email doesn’t work.
HI @Mohammed
Previous forums have been shutdown so topics are not available anymore. I have a work in progress to replace old link to new url, if you have some expertise on regex + postgresql I can use it (the topic id are the same!):
I would love to relink older posts to my username. Heck I even have the same username hehe.
Also, if there is a way to re-route google results of older BOB forum to this new one?
Unfortunately, this is not planned. But as the old BOB forum is not serving the content anymore, I hope it will be slowly replaced by bobj-board links (when I see the activity level of bot user, I think google and others already know each page of this site )
def relink_posts(user_id, bob_login)
regex = /\n\n---\n\n\*\*#{bob_login}\*\* (:\w+: |)_\(BOB member since (\d{4}-\d{2}-\d{2})\)_/
posts = Post.where("raw ~ ?", '\n\n---\n\n\*\*' + bob_login + '\*\* (:\w+: |)_\(BOB member since \d{4}-\d{2}-\d{2}\)_')
post_modified = 0
since = nil
# Reaffect posts
posts.find_each do |post|
puts "work on #{post.topic_id} #{post.id} #{post.created_at}"
post.raw.match(regex) do |m|
since = m[2]
new_raw = post.raw.gsub(m[0], "")
post.update_column(:user_id, user_id)
post.update_column(:raw, new_raw)
post.update_column(:baked_version, nil)
post_modified = post_modified + 1
end
end
# Set user creation date
user = User.find_by_id(user_id)
user.update_column(:created_at, since)
post_modified
end
# how to use ?
relink_posts(NEW_USER_ID, 'olduser')
I have a little rails script that can:
re-link content from system user to your new Discourse user, based on the signature at the end of the post
remove this signature (as it is correctly linked to your user)
set the user creation date based on the creation date in BOB (still relying on the signature)
This is a manual process to run the script. I will not run this script for every single user, you will have to ask for it. Here is the steps:
Send a message to @admins requesting to ‘relink previous owner post on BOB to my current profile’ with following info:
your old profile name
I will already have your new profile info
Then wait. I am not providing any deadline for running the script. It is a manual script I do it when I can Do not hesitate to participate (if lots of profiles I will choose profiles with most interactions )
When the script will be launched for your user I will warn you by direct message.