Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: khigh - elokuu 05, 2019, 07:53:28 IP

Otsikko: Tinypic Shutdown. Any ideas on saving pictures?
Kirjoitti: khigh - elokuu 05, 2019, 07:53:28 IP
Hi all.

My forum is tinypic heavy. I installed the tinypic plugin after literally YEARS of people not understanding how to do inline pics.

So they're shutting down "in 2019". Not even sure when (anyone know when?).

I'm HOPING I can do some sort of batch operation to download all the pictures with an offline browser, keeping all the pictures along with their names and paths, put them somewhere, and then do a universal replace with the new hostname taking the place of tinypic.

Does that sound like the way to do it, or is there something more elegant?

Thanks for looking!
Otsikko: Re: Tinypic Shutdown. Any ideas on saving pictures?
Kirjoitti: khigh - elokuu 05, 2019, 08:41:14 IP
Looks like they don't use folders, but separate by server.

I'm downloading the site now with linked pics in WinHTTrack.

They're in the form of http://i64.tinypic.com/mtpiqr.jpg

With the "i" number being between i63 and i68

So I'm thinking of combining them all into one folder, uploading them, and then doing 6 search and replace for say http://i64.tinypic.com to http://mypichost.com

This sounding about right?

Also - one thing. I know I've seen automatic text replace before, but where is it? Thanks.
Otsikko: Re: Tinypic Shutdown. Any ideas on saving pictures?
Kirjoitti: vbgamer45 - elokuu 05, 2019, 11:15:10 IP
Text replace i would recommend using mysql's replace command on the database after you do a database backup first.
Otsikko: Re: Tinypic Shutdown. Any ideas on saving pictures?
Kirjoitti: a10 - elokuu 06, 2019, 08:38:49 AP
Have used Notepad++, extensive find & replace functions.
FTP download of actual DB table > edit\save > FTP upload (replacing the original table).
Keep a backup of original.
Otsikko: Re: Tinypic Shutdown. Any ideas on saving pictures?
Kirjoitti: Kindred - elokuu 06, 2019, 10:43:47 AP
why would you do it that way?? ???

just use a single command UPDATE table SET fieldname = REPLACE(fieldname, find_string, replace_with) WHERE condition;
e.g.
UPDATE smf_messages
SET
    body = REPLACE(body,
        'old_url',
        'new_url');

otherwise, you have to export, edit, then import with overwrite...
Otsikko: Re: Tinypic Shutdown. Any ideas on saving pictures?
Kirjoitti: a10 - elokuu 07, 2019, 04:51:53 IP
^^^ Agree of course, direct edits in the db is the correct action ...when & if one knows how, why & where :O)
Was just showing an alternative which works fine, for those who are not feeling confident doing 'things' within the db.