Photobucket fix

Need help with something on the website, forums etc? Ask here.

Moderator: Moderators

StephenSLR
Mustang Star
Mustang Star
Posts: 892
Joined: Sat May 26, 2012 1:33 pm
Contact:

Photobucket fix

Post by StephenSLR »

I just noticed a thread here affected with Photobucket disease.

I'm not sure if it's been mentioned here before, I couldn't find it when I searched.

There is a workaround to get your pics back.

If you edit your old posts and add ~original to the end of the image file name it should display properly.

The last part of your image tag will look something like this:

my_image_file_name.jpg[/img]

change it to:

my_image_file_name.jpg~original[/img]

I tried it on one of my posts here and it works.

If you have a lot of pics in your post, click 'Modify' on your post,

CTRL+A to highlight all,

CTRL+C to copy it

then paste the content of your post into Notepad using CTRL+V

go to Edit > Replace > Replace All

and replace all the jpg's with jpg~original then you can copy/paste all that into your post and save.

;)

s
hybrid
Mustang King
Mustang King
Posts: 9352
Joined: Tue Jul 27, 2010 2:13 pm
Contact:

Re: Photobucket fix

Post by hybrid »

I can probably script something to change the whole database.
Dwayne
Mustang Star
Mustang Star
Posts: 813
Joined: Thu Jun 02, 2016 4:37 am

Re: Photobucket fix

Post by Dwayne »

That would be awesome.
nassi
Mustang King
Mustang King
Posts: 6730
Joined: Sun Aug 01, 2010 11:06 pm
Contact:

Re: Photobucket fix

Post by nassi »

Thank you Stephen, it is working for most of the images. Very good find.
Thanks again.
ozbilt
Site Admin
Site Admin
Posts: 10977
Joined: Tue Jul 27, 2010 3:30 pm

Re: Photobucket fix

Post by ozbilt »

hybrid wrote:I can probably script something to change the whole database.
You are a good man hybrid, I don't care what they say about you .......

With over 8,000 pics on my bucket and over 10,000 posts, I was not looking forward to fixing them ....... :bingo:
Kerry

To our wives and sweethearts. May they never meet
StephenSLR
Mustang Star
Mustang Star
Posts: 892
Joined: Sat May 26, 2012 1:33 pm
Contact:

Re: Photobucket fix

Post by StephenSLR »

hybrid wrote:I can probably script something to change the whole database.
Cool; although it'd probably change all my 'jpg~original's to 'jpg~original~original' lol.

Some of the photobucket links also have the suffix jpeg for some reason and it works if you change jpeg to jpeg~original

s
Last edited by StephenSLR on Sun Apr 01, 2018 2:53 am, edited 3 times in total.
scott66stang
Mustang King
Mustang King
Posts: 4716
Joined: Wed Jul 28, 2010 6:15 am

Re: Photobucket fix

Post by scott66stang »

Thats awesome as i have just spent about 8 hours finding my original pics on storage devices transfering to postimage and copy pasting to a couple of my build threads. i have done about 2% ?
scott66stang
Mustang King
Mustang King
Posts: 4716
Joined: Wed Jul 28, 2010 6:15 am

Re: Photobucket fix

Post by scott66stang »

StephenSLR wrote:
hybrid wrote:I can probably script something to change the whole database.
Cool; although it'd probably change all my 'jpg~original's to 'jpg~original~original' lol.

Some of the photobucket links also have the suffix jpeg for some reason and it works if you change jpeg to jpeg~original

s
So yeah i just changed a load of posts in a matter of minutes, but i might just hold off to see if Hybrid can work his magic otherwise i will have to remove 1 ~original from the ones i have changed. ?
hybrid
Mustang King
Mustang King
Posts: 9352
Joined: Tue Jul 27, 2010 2:13 pm
Contact:

Re: Photobucket fix

Post by hybrid »

StephenSLR wrote:
hybrid wrote:I can probably script something to change the whole database.
Cool; although it'd probably change all my 'jpg~original's to 'jpg~original~original' lol.

Some of the photobucket links also have the suffix jpeg for some reason and it works if you change jpeg to jpeg~original

s
Not if someone that knows what they are doing writes the script ?
Dwayne
Mustang Star
Mustang Star
Posts: 813
Joined: Thu Jun 02, 2016 4:37 am

Re: Photobucket fix

Post by Dwayne »

That rules me out then.
hybrid
Mustang King
Mustang King
Posts: 9352
Joined: Tue Jul 27, 2010 2:13 pm
Contact:

Re: Photobucket fix

Post by hybrid »

Ok, I have made the change database wide.
Can you guys that still had photobucket links see if they are working now?

For the rest of the interwebs, this is how it was done.
- Backup database
- Export the posts_text table
- run the following over it:

Code: Select all

sed -ie -E ":a;s|(^.*\[IMG\]http:\/\/.*.photobucket.com\/albums\/.*)(.jpg)\[\/IMG\]|\1\2~original\[\/IMG\]|gi;ta" exportedtable.sql
- Check it
- truncate the table in the db
- import the file back into the db
hybrid
Mustang King
Mustang King
Posts: 9352
Joined: Tue Jul 27, 2010 2:13 pm
Contact:

Re: Photobucket fix

Post by hybrid »

By the way - once this "fix" filters around the interwebs, photobuckets traffic will start to increase again and they may shut this down.
I wouldn't expect it to last forever.
scott66stang
Mustang King
Mustang King
Posts: 4716
Joined: Wed Jul 28, 2010 6:15 am

Re: Photobucket fix

Post by scott66stang »

Yep all fixed except a few reply posts from others with pictures attached, but they may have been deleted by other uses. Well Done :bingo:
Dwayne
Mustang Star
Mustang Star
Posts: 813
Joined: Thu Jun 02, 2016 4:37 am

Re: Photobucket fix

Post by Dwayne »

Awesome job, thanks.

I'm going to save some key pages offline, and save photos etc for future reference.
scott66stang
Mustang King
Mustang King
Posts: 4716
Joined: Wed Jul 28, 2010 6:15 am

Re: Photobucket fix

Post by scott66stang »

Even the ones i have recently added the ~original too
Post Reply