Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2004
Posts: 5
Lurker
Lurker
Offline
Joined: Apr 2004
Posts: 5
I'm one of the admins at the website/forum norshroom.org. We've recently moved servers, for increased security. This is done by deploying UBB.threads on a server using SSL. We've run into a few problems tho, mainly that linking to resources on other sites cause browsers (in IE particulary), to give the user a error message about not getting all the content thru secured pipes.

I've made a fetch.php script that opens a fopen to the url supplied by the f variable and streams the file to the user. The next step in resolving this issues would be to do inline replacements of the <img> tag, replacing '<img src="http:' with '<img src="https://norshroom.ath.cx/fetch.php?f=http:'. I've been trying to edit ubbt.inc.php, but the changes I made didn't seem to gett applied. Anyone got a hint about what the best way of resolving this would be?

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Changed to the ubbt.inc.php will only affect new postings. You'll have to write a convert script that changes the body off all posts in the w3t_Posts table to get it working with older posts.

Joined: Apr 2004
Posts: 5
Lurker
Lurker
Offline
Joined: Apr 2004
Posts: 5
well, even if that's so, I'd rather have the images redirected inline. Making the change permanent in each post seems radical, and if the forum where to move later, you'd have to initiate a rescan of all posts, instead of changing one variable...

shouldn't it be possible to do this in the showflat.php file?

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Sure, you can use a regexp to replace the img-tags in the $Body variable with your script.

Joined: Apr 2004
Posts: 5
Lurker
Lurker
Offline
Joined: Apr 2004
Posts: 5
hmm... where exactly would that str_replace() funciton go? I've been reading the sources for a while, and trying to apply it, just before the '//Now we can show the post' part, but that didn't seem to work...

Sponsored Links
Joined: Apr 2004
Posts: 5
Lurker
Lurker
Offline
Joined: Apr 2004
Posts: 5
Code
$Body = str_replace("<img src=\"http:","<img src=\"https:\/\/norshroom.ath.cx\/fetch.php?f=http:",$Body);   

this is the code I applied, shouldn't this work?

Joined: Apr 2004
Posts: 5
Lurker
Lurker
Offline
Joined: Apr 2004
Posts: 5
well, I was able of doing this to some extent. I achived partial success by moving the str_replace funtion just below the poll checks. but it only applies to the posts themselves. is there a way of applying this for all images displayed in a page (avatars, signatures and so on)?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)