PHP Code:
if ($_SERVER['SERVER_PORT'] == 80) {
$secure = 'http';
} elseif ($_SERVER['SERVER_PORT'] == 443) {
$secure = 'https';
}
Should do the trick. However there are probably very few, if any references to
http://..... in the source and templates so a better option IMO would be to just change the value of the boards URL:
PHP Code:
if ($_SERVER['SERVER_PORT'] == 443) {
$vboptions['bburl'] = 'https://mydomain.com/forums';
}
Of course you'll still get errors for inline images in [IMG] code if there are on HTTP but thats unavoidable unless you disable it.