Skip to content

Commit 8d78a5e

Browse files
authored
Merge branch 'master' into patch-26
2 parents 44e6fe5 + 7ecbdbf commit 8d78a5e

7 files changed

Lines changed: 12 additions & 9 deletions

File tree

action.topic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
$notificationHandler->triggerEvent('global', 0, 'new_thread', $tags);
9898
$notificationHandler->triggerEvent('forum', $topicObject->getVar('forum_id'), 'new_thread', $tags);
9999
$postObject = $topicHandler->getTopPost($id);
100-
$tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $postObject->getVar('post_id');
100+
$tags['POST_URL'] = $tags['THREAD_URL'] . '&topic_id=' . $id . '#forumpost' . $postObject->getVar('post_id');
101101
$notificationHandler->triggerEvent('thread', $id, 'new_post', $tags);
102102
$notificationHandler->triggerEvent('forum', $topicObject->getVar('forum_id'), 'new_post', $tags);
103103
$notificationHandler->triggerEvent('global', 0, 'new_post', $tags);

blocks/newbb_block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function b_newbb_show($options)
188188
// START irmtfan remove hardcoded html in URLs - add $seo_topic_url
189189
//$seo_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id'];
190190
//BigKev73 > Change to support jumping directly to that post, vs just the page that the topic is on
191-
$seo_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?post_id=' . $topic['post_id'] . '#forumpost' . $topic['post_id'];
191+
$seo_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?topic_id=' . $topic['id'] . '&post_id=' . $topic['post_id']."#forumpost" . $topic['post_id'];
192192
$seo_topic_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewtopic.php?topic_id=' . $topic['id'];
193193
$seo_forum_url = XOOPS_URL . '/' . SEO_MODULE_NAME . '/viewforum.php?forum=' . $topic['forum_id'];
194194
if (!empty($newbbConfig['do_rewrite'])) {

class/Post.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,9 @@ public function showPost($isAdmin)
714714
'mod_buttons' => $mod_buttons,
715715
'poster' => $poster,
716716
//Modified by BigKev73
717-
'post_permalink' => '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?post_id=' . $post_id . '#forumpost='. $post_id .'"></a>',
717+
'post_permalink' => '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?topic_id=' . $topic_id. '&amp;post_id=' . $post_id . '#forumpost='. $post_id .'"></a>',
718+
719+
718720
//'post_permalink' => '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?post_id=' . $post_id . '"></a>',
719721
];
720722

class/TopicRenderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,8 @@ public function renderTopics(\Smarty $xoopsTpl = null)
966966
}
967967
}
968968
// BigKev73 - Added to make jump ICON, jump and scroll to the correct "last post"
969-
$topic_page_jump_icon = "<a href='" . XOOPS_URL . '/modules/newbb/viewtopic.php?post_id=' . $myrow['topic_last_post_id'] . '#forumpost=' . $myrow['topic_last_post_id'] . "'>" . newbbDisplayImage('lastposticon', _MD_NEWBB_GOTOLASTPOST) . '</a>';
970-
969+
$topic_page_jump_icon = "<a href='" . XOOPS_URL . '/modules/newbb/viewtopic.php?topic_id=' . $myrow['topic_id'] . '&amp;post_id=' . $myrow['topic_last_post_id'] . '#forumpost=' . $myrow['topic_last_post_id'] . "'>" . newbbDisplayImage('lastposticon', _MD_NEWBB_GOTOLASTPOST) . '</a>';
970+
971971
// irmtfan - move here for both topics with and without pages - change topic_id to post_id
972972
//$topic_page_jump_icon = "<a href='" . XOOPS_URL . '/modules/newbb/viewtopic.php?post_id=' . $myrow['topic_last_post_id'] . '' . "'>" . newbbDisplayImage('lastposticon', _MD_NEWBB_GOTOLASTPOST) . '</a>';
973973

post.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@
329329
$tags = [];
330330
$tags['THREAD_NAME'] = Request::getString('subject', '', 'POST');
331331
$tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewtopic.php?topic_id=' . $topicObject->getVar('topic_id');
332-
$tags['POST_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewtopic.php?post_id=' . $postid . '#forumpost' . $postid;
332+
$tags['POST_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/viewtopic.php?topic_id=' . $topicObject->getVar('topic_id') . '&amp;post_id=' . $postid . '#forumpost' . $postid;
333+
333334
require_once __DIR__ . '/include/notification.inc.php';
334335
$forum_info = newbb_notify_iteminfo('forum', $forumObject->getVar('forum_id'));
335336
$tags['FORUM_NAME'] = $forum_info['name'];
@@ -389,7 +390,7 @@
389390
$GLOBALS['xoopsDB']->queryF(' REPLACE INTO ' . $GLOBALS['xoopsDB']->prefix('newbb_user_stats') . " SET uid = '{$uid}', user_topics = '{$topics}', user_posts = '{$posts}', user_digests = '{$digests}', user_lastpost = '{$lastpost}'");
390391
}
391392

392-
$redirect = XOOPS_URL . '/modules/newbb/viewtopic.php?post_id=' . $postid;
393+
$redirect = XOOPS_URL . '/modules/newbb/viewtopic.php?topic_id=' . $topicObject->getVar('topic_id') . '&amp;post_id=' . $postid . '#forumpost' . $postid ;
393394
$message = _MD_NEWBB_THANKSSUBMIT . '<br>' . $error_upload;
394395
} else {
395396
$redirect = XOOPS_URL . '/modules/newbb/viewforum.php?forum=' . $postObject->getVar('forum_id');

templates/newbb_index.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
<{$forum.forum_lastpost_time}> <{$smarty.const._MD_NEWBB_BY}> <{$forum.forum_lastpost_user}>
134134
<br>
135135
<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?topic_id=<{$forum.forum_lastpost_topicid}>&amp;post_id=<{$forum.forum_lastpost_id}>#forumpost<{$forum.forum_lastpost_id}>">
136-
<{$forum.forum_lastpost_subject}>&nbsp;&nbsp;
136+
<{$forum.forum_lastpost_subject}>&nbsp;&nbsp;
137137
<{* irmtfan remove icon_path *}>
138138
<{$forum.forum_lastpost_icon}>
139139
</a>

templates/newbb_thread.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<div class="ThreadTitle">
2626
<{if $topic_post.post_id > 0}>
2727
<{* irmtfan add id for each post *}>
28-
<a id="<{$forum_post_prefix}><{$topic_post.post_id}>" href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$topic_post.post_id}>">#<{$topic_post.post_no}></a>
28+
<a id="<{$forum_post_prefix}><{$topic_post.post_id}>" href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?topic_id=<{$topic_id}>&post_id=<{$topic_post.post_id}>#forumpost<{$topic_post.post_id}>">#<{$topic_post.post_no}></a>
2929
<{/if}>
3030
</div>
3131
</th>

0 commit comments

Comments
 (0)