Broken links after convert
#8
(2010-06-24, 11:55 PM)allbordercollies Wrote: Hello. I have the same problem and I'm currently running your script. It is running but I'm not sure if it's doing what you intended it to do, as there are only about 30K posts on my forum and the script just keeps going and going. It's been running for about and hour now and is around 2 million posts?

Ok, you need to run the following script in the PHPMyAdmin site:

Replace mybbdatabase with the right database name for your site:
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`, '<!-- e --><a href="mailto:', '[email=');
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`,'</a><!-- e -->', '[/email]');
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`, '<!-- l --><a class="postlink-local" href="', '[url=');
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`, '</a><!-- l -->', '[/url]');
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`, '<!-- w --><a class="postlink" href="', '[url=');
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`, '</a><!-- w -->', '[/url]');
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`, '<!-- m --><a class="postlink" href="', '[url=');
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`, '</a><!-- m -->', '[/url]');
update `mybbdatabase`.`mybb_posts` SET `message` = REPLACE(`message`, '">', ']');

Then, you need to fix you private message too, and for this you need to run the following script:

update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`, '<!-- e --><a href="mailto:', '[email=');
update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`,'</a><!-- e -->', '[/email]');
update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`, '<!-- l --><a class="postlink-local" href="', '[url=');
update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`, '</a><!-- l -->', '[/url]');
update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`, '<!-- w --><a class="postlink" href="', '[url=');
update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`, '</a><!-- w -->', '[/url]');
update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`, '<!-- m --><a class="postlink" href="', '[url=');
update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`, '</a><!-- m -->', '[/url]');
update `mybbdatabase`.`mybb_privatemessages` SET `message` = REPLACE(`message`, '">', ']');

Let me know if it works, I built that for my forum Smile
Reply


Messages In This Thread
Broken links after convert - by RickR86 - 2010-05-18, 01:18 PM
RE: Broken links after convert - by Sukanjan.K - 2010-05-18, 10:57 PM
RE: Broken links after convert - by MAGZine - 2010-05-21, 02:49 PM
RE: Broken links after convert - by Dylan M. - 2010-05-22, 02:31 AM
RE: Broken links after convert - by MAGZine - 2010-05-22, 03:03 AM
RE: Broken links after convert - by kizza42 - 2010-05-23, 01:59 PM
RE: Broken links after convert - by SinStereo - 2010-07-08, 04:03 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)