UBB.Dev
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?
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.
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?
Sure, you can use a regexp to replace the img-tags in the $Body variable with your script.
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...
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?
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)?
© UBB.Developers