Ok it was easier than i expected.
fortunately, the last developer of newbb (the great phppp) put some functionality in newbb reserve for future using.
to enable jump to last read post in newbb 4.3 or any other newbb versions do this.
open viewtopic.php around line 100 find this:
newbb_setRead("topic", $topic_id, $topic_obj->getVar("topic_last_post_id"));
and add this above it:
// START irmtfan - jump to last post read
if (empty($post_id) && !empty($xoopsModuleConfig['jump_to_topic_last_post_read_enabled'])) {
$topic_last_post_id_read = newbb_getRead("topic", $topic_id, $xoopsUser->getVar('uid'));
if (!empty($topic_last_post_id_read))
header("Location: ".$_SERVER['REQUEST_URI']."&post_id=".$topic_last_post_id_read);
}
// END irmtfan - jump to last post read
newbb_setRead("topic", $topic_id, $topic_obj->getVar("topic_last_post_id"));
EDIT:
You can add that code just above newbb_setRead but it is better to add that above newbb_setRead right after the last redirect_header.
to avoid hardcode i add a configuration so after the above open include/plugin.php and add this:
$customConfig["jump_to_topic_last_post_read_enabled"] = true;
you can change the header to what you prefer like the below:
header("Location: ".XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/viewtopic.php?post_id=".$topic_last_post_id_read);
but i think the REQUEST_URI would be best one.
kwaltman, i think the above is the final solution but if you send me your 3.07 hack or show us your website we will see what is the exact hack in your website and also we can see your other hacks on newbb.
Also we need more testers for newbb 4.3
currently i solved many bugs that even remained unsolved for 8 years from 3.08 and earlier newbb versions.
with more testers we can find more bugs.
follow here:
https://xoops.org/modules/newbb/viewtopic.php?post_id=349548