Fixing the 'Re:' reply prefix

Started by AzorMachine, April 09, 2013, 09:31:28 AM

Previous topic - Next topic

AzorMachine

Well, by some way, my forum creates the reply messages with the following title 'Re:A Reply' without a blank after the prefix. I would like to know a way to add that blank after the prefix, and fixing it in the old posts.

Arantor

Check index.english.php for $txt['response_prefix'] and check there's a space there.

As for fixing it in old posts, how comfortable are you with manually editing the database?
Holder of controversial views, all of which my own.


AzorMachine

Quote from: Arantor on April 09, 2013, 09:32:42 AM
Check index.english.php for $txt['response_prefix'] and check there's a space there.

Done.

QuoteAs for fixing it in old posts, how comfortable are you with manually editing the database?

Familiar with phpmyadmin, but how would be the code to run?

Arantor

QuoteFamiliar with phpmyadmin, but how would be the code to run?

Off the top of my head - and untested.

UPDATE smf_messages SET subject = REPLACE(subject, 'Re:', 'Re: ') WHERE subject LIKE 'Re:%';
UPDATE smf_messages SET subject = REPLACE(subject, 'Re:  ', 'Re: ') WHERE subject LIKE 'Re:%';


The first one finds every case of a Re: and forces a space there, whether it needed one or not. The second fixes any cases of a double space now there and replaces. BACKUP FIRST.
Holder of controversial views, all of which my own.


AzorMachine

Tested it on my Test Forum, and then executed it on the real one. Everything went better than expected.
Thank you very much Arantor.

Advertisement: