|
|
Joined: Apr 2004
Posts: 5
Lurker
|
Lurker
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?
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
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
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
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
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...
|
|
|
|
Joined: Apr 2004
Posts: 5
Lurker
|
Lurker
Joined: Apr 2004
Posts: 5 |
$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
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)?
|
|
|
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.
|
|
Posts: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|