Subforums.php, line 14-41.
if (!defined('ELK'))
die('Hacking attempt...');
/**
* Init..
**/
global $SubforumFunc, $base_boardurl, $boardurl, $board_language, $language;
// define the url's
$base_boardurl = $boardurl;
$parts = parse_url($boardurl);
$boardurl = $parts['scheme'] .'://'. $_SERVER['SERVER_NAME'] .(!empty($parts['port']) ? ':'. $parts['port'] : '') . (!empty($parts['path']) ? $parts['path'] : '');
$board_language = $language;
// load the setting
SubForums_LoadSettings();
// setup function array
$SubforumFunc = array(
'isAllowed' => 'Subforums_isAllowed',
'LoadTheme' => 'Subforums_LoadTheme',
'getContext' => 'Subforums_GetContext',
'getScripturl' => 'Subforums_GetScripturl',
'getMemberurl' => 'Subforums_GetMemberurl',
'isOwnurl' => 'Subforums_isOwnurl',
'checkurl' => 'Subforums_checkurl',
'updateStats' => 'Subforums_updStats',
);
Since parse_url here is not working for unknown-to-me reason, I have to do the above mentioned hack. But now I temporarily changed QueryString.php instead of Setting.php to include $boardurl = 'http://' . $_SERVER['SERVER_NAME'] just before $scripturl = $boardurl . '/index.php'.
Latest package is attached.