Page 1 of 1

Archive internal links

Posted: Mon Jul 17, 2017 4:56 pm
by Gareth
Could a script be run to fix up the internal links of the archived forum?

Re: Archive internal links

Posted: Tue Jul 18, 2017 10:03 pm
by akirk
I suspect so, can you give me any examples?
Alasdair

Re: Archive internal links

Posted: Tue Jul 18, 2017 11:47 pm
by RiK
A simple SQL search & replace on the posts field in the database should do the trick.

Just replace the first part of each URL

i.e. search for "www.advanced-driving.co.uk/forum/"
and replace it with: "archive.advanceddrivinghub.com/"

Re: Archive internal links

Posted: Wed Jul 19, 2017 7:39 am
by Gareth
I logged in to the Archive and searched for viewtopic - the first one was http://archive.advanceddrivinghub.com/v ... 36#p109136 ... although it has the appearance of a relative link, when I viewed the source it included the old sitename in the URL:

< a class="postlink-local" href="https://www.advanced-driving.co.uk/forum/viewtopic.php?f=1&amp;t=5381">viewtopic.php?f=1&amp;t=5381< / a >

I don't know how much of an internal link is held in the database and how much is auto-generated when threads are displayed.

Re: Archive internal links

Posted: Thu Jul 20, 2017 1:06 pm
by akirk
good question... will have a play, but might be at the weekend now...
Alasdair

Re: Archive internal links

Posted: Fri Jul 21, 2017 6:29 pm
by Mr Cholmondeley-Warner
The topic numbers might be OK, but the forum numbers will probably need replacing.