MyBB Community Forums

Full Version: Forward Custom Mod Tool to LastPost instead of page 1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

if I use my own moderation tool (topic tool), then you will be directed to page 1 of the topic when performing the action.

Can I modify this to take me to the last page?

Perhaps via "lastpost" attachment in the link? If so, where do I add it? Does somebody has any idea?

That would make my moderator's job easier.

Best wishes
SkrilaxRev
(2020-08-30, 11:42 PM)skrilaxrev Wrote: [ -> ]Hello,

if I use my own moderation tool (topic tool), then you will be directed to page 1 of the topic when performing the action.

Can I modify this to take me to the last page?

Perhaps via "lastpost" attachment in the link? If so, where do I add it? Does somebody has any idea?

That would make my moderator's job easier.

Best wishes
SkrilaxRev

Nobody knows a solution, how I can redirect to "lastpost" after using Mod Tools?
Explain how you did your tool, and maybe we can help you
(2020-09-04, 10:13 PM)Crazycat Wrote: [ -> ]Explain how you did your tool, and maybe we can help you

What should I explain?

Use ANY custom mod tool and you will be directed to the first page instead to the last post.

That's all. It would be better to get to the last post.

If anybody knows how I can change this, I would be happy to hear that.
https://github.com/mybb/mybb/blob/aaceba....php#L3242
moderation_redirect(get_thread_link($thread['tid'], 0, 'lastpost'), $lang->redirect_customtool_thread);

https://github.com/mybb/mybb/blob/aaceba....php#L3299
moderation_redirect(get_thread_link($tid, 0, 'lastpost'), $lang->redirect_customtool_thread);

But this will redirect you to the last post, not the last page.

For redirecting to the last page a plugin would be better.
(2020-10-17, 08:11 PM)Omar G. Wrote: [ -> ]But this will redirect you to the last post, not the last page.

No "but" necessary - that is exactly what I need. Thank you very much!