XF 1.5 Mass-Changing Quoted Name in Replies?

XnForFanKN

Active member
Is there an easy way to go about changing the name quoted in quotes, after the quoted user has changed their username? Like if User1 makes several posts, and many users quote them in their replies. Then User1 changes their name to User100. Is there an easy way to make all the quoted messages say "User100 said..." instead of "User1 said..."?
 
You can use phpMyAdmin, but you have to be very careful and do a backup first.

UPDATE xf_post SET message = REPLACE(message, 'current content', 'new content')

For example:

current content = [QUOTE="Andy,
new content = [QUOTE="John,
 
Thank you! I tried that, but it's giving me a slight error. When I try to run the query, it gives a syntax error. I looked it up, and it's saying that there are two more open brackets than there are close brackets. That's correct, but it kind of has to be that way with the way my version of Xenforo does their quoting. The quoting appears something like this:

QUOTE="Andy, post: 1234"]
QUOTE="John, post: 4321"]

(Note that I had to remove the first brackets above, otherwise it put the rest of my post inside quotes.)

I know phpmyadmin would like to have the close brackets there, but since every post has a different post number I don't see how that could work. It is possible to use an ellipses or something similar to instruct the system to ignore a certain part of what it's changing, or would that not work in phpmyadmin?
 
You're getting a syntax error because you forgot the quotes.

Again the query is:

UPDATE xf_post SET message = REPLACE(message, 'current content', 'new content')

and the query example, you will change the username Andy and John as needed:

UPDATE xf_post SET message = REPLACE(message, 'QUOTE="Andy, post: 1234"]', 'QUOTE="John, post: 4321"]')
 
Back
Top Bottom