@@ -353,7 +353,7 @@ public function getAllTopics($forum, $criteria = null)
353353 }
354354 }
355355 // irmtfan - move here for both topics with and without pages
356- $ topic_page_jump_icon = "<a href=' " . XOOPS_URL . '/modules/newbb/viewtopic.php?post_id= ' . $ myrow ['post_id ' ] . "'> " . \newbbDisplayImage ('lastposticon ' , _MD_NEWBB_GOTOLASTPOST ) . '</a> ' ;
356+ $ topic_page_jump_icon = "<a href=' " . XOOPS_URL . '/modules/newbb/viewtopic.php?topic_id= ' . $ myrow [ ' topic_id ' ] . ' & post_id= ' . $ myrow ['post_id ' ] . ' #forumpost ' . $ myrow [ ' post_id ' ] . "'> " . \newbbDisplayImage ('lastposticon ' , _MD_NEWBB_GOTOLASTPOST ) . '</a> ' ;
357357
358358 // ------------------------------------------------------
359359 // => topic array
@@ -389,12 +389,13 @@ public function getAllTopics($forum, $criteria = null)
389389 if (isset ($ lastRead )){
390390 if (!empty ($ lastRead )){
391391 if ($ lastRead <$ myrow ['topic_last_post_id ' ]){
392- $ topicLink = 'viewtopic.php?post_id= ' . $ lastRead . '#forumpost ' .$ lastRead ;
392+ $ topicLink = 'viewtopic.php?topic_id= ' . $ myrow ['topic_id ' ] .'&post_id= ' . $ lastRead . '#forumpost ' .$ lastRead ;
393+
393394 //BigKev73 > Adding this code to support jumping to the next post after the LastReadPost, otherwise we could end up on the prior page
394395 // if the lastread post is not on the last page and the next new post. Added getNextPostId to topichandler to support this
395396 $ nextPostID = $ topicHandler ->getNextPostId ($ myrow ['topic_id ' ],$ lastRead );
396397 if (!empty ($ nextPostID )){
397- $ topicLink = 'viewtopic.php?post_id= ' . $ nextPostID . '#forumpost ' .$ nextPostID ;
398+ $ topicLink = 'viewtopic.php?topic_id= ' . $ myrow [ ' topic_id ' ] . ' & post_id= ' . $ nextPostID . '#forumpost ' .$ nextPostID ;
398399 print ('LastRead= ' .$ lastRead . ', NextPostID= ' . $ nextPostID );
399400 }
400401 }
@@ -925,6 +926,7 @@ public function &display($forums, $length_title_index = 30, $count_subforum = 1)
925926 if ($ post_id ) {
926927 $ post = &$ posts [$ post_id ];
927928 $ _forum_data ['forum_lastpost_id ' ] = $ post_id ;
929+ $ _forum_data ['forum_lastpost_topicid ' ] = $ post ['topic_id ' ];
928930 $ _forum_data ['forum_lastpost_time ' ] = \newbbFormatTimestamp ($ post ['post_time ' ]);
929931 if (!empty ($ users_linked [$ post ['uid ' ]])) {
930932 $ _forum_data ['forum_lastpost_user ' ] = $ users_linked [$ post ['uid ' ]];
0 commit comments