Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
Hi
there has been discussions about Photobucket starts to charge money and a lot of our member has now problems with old links to photos.
one member sent me this message and a per script.
do you think it could be used. I havenot included the scrip here.

What do you suggest?
Should I allow anybody to opload photos to out forum, right now its premium members that pay a fee. I'm not sure that allowing everyone is a good ideas cause it will be so many photos over time but I'm open for suggestions.

Thanks


Quote
Hello Morgan,

Here’s the script - photobuckoff.pl

It’s written to work with files, so would not immediately useful for Britbike, which I think holds posts in a database.
If you can tell me what database you’re using and the table structure, I should be able to give you an updated version which will work for Britbike as well.

This could come in handy as people move images to another image hosting site. Get them to give you the old URL and new URL for the images, Then run the script to update the links in their posts.

Anyway, it will work best on a Unix-based system such as Linux or OS X, but there are versions of Perl available for Windows.
You will also need the Getopt::Long Perl module installed

There are 4 ways to run it

1/ specify the input & output files, and the old and new URLs
perl photobuckoff.pl -s <source file> -d <destination file> -o <old URL> -n <new URL>

2/ specify the input & output files, and a file with an old and new URL on each line
perl photobuckoff.pl -s <source file> -d <destination file> -f <file containing URLs>

3/ specify the input & output directories, and the old and new URLs
perl photobuckoff.pl -s <source directory> -d <destination directory> -o <old URL> -n <new URL>

4/ specify the input & output directories, and a file with an old and new URL on each line
perl photobuckoff.pl -s <source directory> -d <destination directory> -f <file containing URLs>

where:
<source file> is the file you want to fix
<destination file> is the file which will will have the updates applied (avoid overwriting your original)
<old URL> is the URL you want to replace
<new URL> is the URL you want to replace it with
<file containing URLs> is a file with a pair of URLs on each line. The first is the one you want replaced, the second is what will replace it

The script will replace every occurrence of the old string with the new string.

If you specify directories, it will work on every file in the directory, and all the subdirectories.

If you have a file with pairs of URLs, these will be sorted by length and alphabetically. It runs through each old URL for each line, which can be a bit of a trap if one of the shorter URLs is a subset of one of the longer replacements - you can wind up with some odd looking results.


An example would be:
perl photobuckoff.pl -s tom.html -d harry.html -o http://photobucket.com/users/shane -n http://britbike.com/home/shane


Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
The image processing for UBB.threads has been considerably updated since version 7.6.0 (which you're currently running).
https://www.ubbcentral.com/forums/u...hreads-7-6-1-not-yet-released#Post259969

It can take and process a standard sized (example: 12MP-16MP) smartphone photo and reduce the dimensions and file sizes for you on the fly.

[Linked Image]

The result will be an attached post image which uses much less storage on your server, and "costs less" to transfer for each page view.

I would highly recommend that you stay away from photobucket for a few simple reasons:
1) uploads to photo bucket mean that you never have control over the photobucket-linked-content your users post. And it could go away whenever photobucket chooses, creating incomplete posts and broken links.
2) if you ever decide to jump on the HTTPS bandwagon which most of today's internet is headed towards, be warned that photbucket still doesnt support https, and you are linking to a 3rd party for your content (see also #1). a future UBB.threads 7.6.x feature which is being worked on, will be to check if your main domain is on https, and then only allowing inlined images from your own website, and others who are also https -- meaning that photobucket's insecure http urls will not be displayed as images, but only as a url link to the image. This is intended to preserve the https validation of your pages.
3) users leave your site to create and account (and upload, manage...etc) at photobucket. a user can also violate the terms of photobucket and have all their account photos deleted, thus removing valuable content from being used on your site. a user can also choose to have their photobucket account deleted, with the same results. if a users requests that your delete their account from your UBB.threads forum, you can remove their account, but keep all the content that was created, and label the user as "Anonymous."
4) photobucket is not mobile friendly. if you have users with android or iphones, they may just ignore trying to attach any images at all. (see also #3)
5) if you do choose to manually manicure/curate your attachment folder for NSFW/unrelated forum attachments, you absolutely wont be seeing any of the linked items linked from photo bucket.
6) Perl/CGI scripts... A quick google search returns many results. These were within those results: (A), (B).

The attached image processing code for UBB.threads 7.6.1 is basically written and done already. The Control Panel page settings for this new code are being written with as much time as I can put in to it -- June was an awful month for my productivity due to picking up a new 6 week puppy at the beginning of it. She's getting better and sleeping for longer periods of time now, so I've been able to jump back in to some UBBT programming over the last week. (translation: im looking forward to getting this new code finished up, and in to everyone's hands as soon as I can. I've been looking forward to it since May).

Last edited by isaac; 07/09/2017 8:12 AM. Reason: added some links, screenshot, clarity and... more info.

Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
Thanks for your answer isaac,

I guess thousands of photos will dissapere from the forum due to broken photobucket links in the future.
Best would perhaps be to allow photo uploads to my server then.
I look forward to 7.6.1 to see how much it will help when it arrives.
Good luck with your puppy and with the programming.



Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
1 members (Nightcrawler), 963 guests, and 210 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)