Site Links
Pricing & Order
Members Area
Support Options
Who's Online Now
1 registered members (JAISP), 91 guests, and 291 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Daryl Fawcett
Daryl Fawcett
Posts: 596
Joined: June 2006
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 19
Morgan 9
Ruben 8
SteveS 6
isaac 4
Latest Photos
Testing to drag photos
Comfortable Cats
BSA photos
Previous Thread
Next Thread
Print Thread
upload photo or not for everyone #260278
07/09/17 06:14 AM
07/09/17 06:14 AM
Morgan  Offline
Joined: Jun 2006
Posts: 609
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.


Hello Morgan,

Here’s the script -

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 -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 -s <source file> -d <destination file> -f <file containing URLs>

3/ specify the input & output directories, and the old and new URLs
perl -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 -s <source directory> -d <destination directory> -f <file containing URLs>

<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 -s tom.html -d harry.html -o -n

Morgan Johansson
BritBike Forum
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: upload photo or not for everyone [Re: Morgan] #260279
07/09/17 06:46 AM
07/09/17 06:46 AM
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,230
The image processing for UBB.threads has been considerably updated since version 7.6.0 (which you're currently running).

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/17 07:12 AM. Reason: added some links, screenshot, clarity and... more info.

isaac @ // my forum @
a current developer of UBB.threads php forum software // 7.6.2 Released
Re: upload photo or not for everyone [Re: Morgan] #260280
07/09/17 07:11 AM
07/09/17 07:11 AM
Morgan  Offline
Joined: Jun 2006
Posts: 609
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

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Reddy Kilowatt
by SteveS. 11/20/18 08:30 AM
by Morgan. 11/18/18 02:33 PM
Phishing SCAM emails
by Morgan. 11/16/18 01:28 PM
Repliers can change thread title
by Baldeagle. 11/12/18 08:49 PM
Tabs In Header
by AstroCat. 11/11/18 08:33 AM
Forum Statistics
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.2