OK.
I have been trying to get these patches to work for weeks and finally think i got it working - without the glitches.
I had the problem others have had that with the basic patch I had an occasional
(perhaps 1 in 20) glitch where the URL created looked like:
www.mysite.com/http://www.mysite.com/forum
I used the patch code provided by prutkar earlier in this thread PLUS
his idea to search the URL string and strip out the excess copy of the base URL.
I wrote my own code for this last bit...here is the complete patch with my addition highlighted in red:
if ($inactivePeriod setQuery("UPDATE #__fb_sessions SET lasttime=$systime, allowed='na', readtopics='' where userid=$my->id"

;
$database->query();
setcookie("fboard_settings[prevvisit]", $fbSession->lasttime, time() + 31536000, '/'

;
// do not reload the page if user is posting :: TODO: check if it cab be replaced by mosRedirect
if ($func != "post"

{
//echo 'setTimeout("window.location.reload( true )",100);';
$self_url = sprintf('http%s://%s%s',
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE ? 's': ''

,
$_SERVER['HTTP_HOST'],
$_SERVER['REQUEST_URI']
);
if (strripos($self_URL,"http:"
!= 0)
{
$self_url=substr($self_url,strripos($self_URL,"http:"
);
}
if (strripos($self_URL,"https:"
!= 0)
{
$self_url=substr($self_url,strripos($self_URL,"https:"
);
}
mosRedirect($self_url);
die();
}
}