Thanks
VERY much for this Prutkar. This stupid reloading started to annoy me from the 1st time i used joomlaboard, 4 years ago !!
As always, very good coding (
my name is flocmoimeme on blastchat).
Just wondering which version of FB you are using ? FB 1.0.1
original file is like that lines 255 to 271 :
if ($inactivePeriod setQuery("UPDATE #__fb_sessions SET 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
if ($func != "post"
{
echo 'setTimeout("window.location.reload( true )",100);';
}
}
$database->setQuery("UPDATE #__fb_sessions SET lasttime=$systime where userid=$my->id"
;
$database->query();
}So if i change only [code:1]setTimeout("window.location.reload( true )",100);[/code:1] to [code:1]global $mosConfig_live_site;
$database->setQuery("UPDATE #__fb_sessions SET lasttime=$systime where userid=$my->id"«»);
$database->query();
mosRedirect($mosConfig_live_site.$_ENV["REQUEST_URI"]);[/code:1]as you said previously, it works, but as the whole part of the file becomes :
[code:1]if ($inactivePeriod setQuery("UPDATE #__fb_sessions SET 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
if ($func != "post"«»)
{
echo 'global $mosConfig_live_site;
$database->setQuery("UPDATE #__fb_sessions SET lasttime=$systime where userid=$my->id"«»);
$database->query();
mosRedirect($mosConfig_live_site.$_ENV["REQUEST_URI"]);';
}
}
$database->setQuery("UPDATE #__fb_sessions SET lasttime=$systime where userid=$my->id"«»);
$database->query();
}[/code:1]I'm afraid the table #__fb_sessions is updated twice don't you think (i'm a php beginner) ? Wouldn't it be possible to remove the two $database->...; lines from your hack ?