XF 1.5 Modifying IMG markup

JamesE

Member
Hello!

I have a moderately size forum that is about 10 years old, with a lot of old content from when it was VBulletin. I now have a CDN available and I want to be able to scrape all of the old IMG bbcodes in the forum and retrieve the images for CDN storage. This is to prevent issues like what happened with photobucket earlier this year.

I have written a script that does the work well, however what I am trying to do is modify the IMG bbcode to let my script know that this URL has already been attempted in the past and to not try again. The problem I am encountering is that any modification to the IMG bbcode appears to break the parsing to turn it into an image.

Does anyone have any suggestions on how I can achieve this, or if there is an extension that will do this for me?

Jason
 
Is anything in the URL actually changing?

If not - perhaps you should make a slight change in the URL for display via the CDN (perhaps just an alias so both URLs work) which would then make it easy to determine which URLs have already been processed/changed and which haven't?
 
This is actually what is happening already with my script. However for a portion of the URLs, the content is no longer accessible, so the URL doesn't get changed, so the file gets processed on the next run. But you may have answered the question anyway, since I can just replace unrecoverable links with a single URL anyway.
 
Top Bottom