Hi,
Yes it's possible.
I have modified my mainfile.php as following:
//define('XOOPS_URL', 'http: //www.yourdomain.com');
// to the following
$port = $HTTP_SERVER_VARS['SERVER_PORT'];
if($port == "443"){
define('XOOPS_URL', 'https: //www.yourdomain.com');
} else {
define('XOOPS_URL', 'http: //www.yourdomain.com');
}
Furthermore, I have added these to mainfile.php either force https or normal http:
define('XOOPS_URL_SSL', 'https: //www.yourdomain.com');
define('XOOPS_URL_NON_SSL', 'http: //www.yourdomain.com');
and then you will need to add to the class/template.php file the above mentioned defines. Example:
//added: xoops_url_ssl and xoops_url_non_ssl
$this->assign(array('xoops_url' => XOOPS_URL, 'xoops_url_ssl' => XOOPS_URL_SSL, 'xoops_url_non_ssl' => XOOPS_URL_NON_SSL, 'xoops_rootpath' => XOOPS_ROOT_PATH, 'xoops_langcode' => _LANGCODE, 'xoops_charset' => _CHARSET, 'xoops_version' => XOOPS_VERSION, 'xoops_upload_url' => XOOPS_UPLOAD_URL));
}
In XOOPS 2.2.x it's class/theme.php in which you can edit like following:
function loadGlobalVars($loadConfig = true) {
global $xoopsConfig, $xoopsModule;
//added SSL and NONSSL to array below:
$this->tplEngine->assign(array('xoops_url' => XOOPS_URL, 'xoops_url_ssl' => XOOPS_URL_SSL, 'xoops_url_non_ssl' => XOOPS_URL_NON_SSL,
'xoops_rootpath' => XOOPS_ROOT_PATH,
Hope that helps
Now you can freely make the URL either http or https and images and such should all download securly.
Additonally, if you want to refer to links within the site you can always use : XOOPS_URL_NON_SSL or in Smarty:
<{$xoops_url_non_ssl}> OR <{$xoops_url_ssl}>
Hope that helps!