Find and replace?


Well-known member
Is there a way to do this like you can in Word? A member has changed a pet's name and wants the name changed on every thread it was mentioned on!
You can via the DB.... but honestly, I'd simply temporarily give them a special group with unlimited edit time and tell them to knock themselves out reviewing their posts and making the changes. Give them a few days then disable that special group.
Or you could edit the database, but realize that doing it that way unless you filter based upon specific user any reference to that name, so you have to be more careful.
Also keep in mind, that changing words in the database won't update your search index.

I'd suggest you search for the posts with a SQL statement, that creates a list of posts and then edit the posts manually:

For all posts containing "string":
SELECT CONCAT('', post_id) FROM `xf_post` WHERE message LIKE "%string%";
For all posts by user_id 1 containing "string":
SELECT CONCAT('', post_id) FROM `xf_post` WHERE user_id = 1 AND message LIKE "%string%";
You have to change to your forum url.
Cheers. I told them to add a post saying x name is now called y name and start a new thread about the name change. It seemed a bit much editing all old threads when others had replied using the old pet name (and it was in quotes etc).
Top Bottom