Making word replacement permanent

Started by PietvWdV, September 30, 2010, 08:41:48 AM

Previous topic - Next topic

PietvWdV

Hi!

I have been searching but to no avail :(

I am using SMF2.0 RC3

Here is my dilema: We are currently doing a much needed re-structuring of some of our download file structures. This will require the changing of thousands of download links.

I can use the censored words function to change aspects of the link's adress. For example, and old download link may be

http://www.vanwykdevries.com/aflaai/WIP/Cirx_CP_Me-262.zip [nofollow]

By entering the word aflaai/WIP in the censored words, to be replaced by sasdl/WIP, I can sucessfully change all instances of this link and others in that directory to

http://www.vanwykdevries.com/sasdl/WIP/Cirx_CP_Me-262.zip [nofollow]

But, it is not a permanent change it seems. The moment I remove the word from the censored words list, it all reverts back to the old links.

How can I make these changes permanent? So that I dont have to have this one-time operation sit in my censored words list for all time, adding extra to the load.

I just want to be able to run a one time search and replace operation.

I am sure we did it in the past once or twice when we moved servers, but that was long ago and probably with another version of SMF. I cannot for the life of me remember, or find such a function at the moment. It may even be that at that stage the forum was small enough to do it manually, but unfortunately , that is no longer the case, I am talking here about litteraly thousands of edits.

Any advice would be welcome, and if I have missed some basic function, please forgive.

All the best
Piet




Oya

theres no function to do it in smf however you can run it as a database query

BACKUP FIRST

then in phpmyadmin go to your database and run
UPDATE smf_messages SET body = REPLACE(body, 'aflaai/WIP', 'sasdl/WIP');

Aleksi "Lex" Kilpinen

Hi PietvWdV, did Oya's advice help you? Do you still need assistance on this? :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

PietvWdV

Hi

I am not bold enough to work with the database just yet, so i did not try this. :)
But thanx for the advice.

Currently I am not doing badly without this function, so it's all good.

Aleksi "Lex" Kilpinen

Ok, if you don't need further assistance on this at the moment - please consider marking the topic solved :)
If you need to, you can just reopen it later on.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: