Yes, I can use showthread_end. I gave it a go and now have the following code:
I then globalized $result. It works and the issue is fixed now, but is ok to do this? I mean, can I just globalize variables like that instead of defining them? For example, would it be ok to remove the following code and instead put those variables in the global scope? (I've tested it, both methods work)
Thanks again for your help.
if($mybb->input['pid'])
{
if(($result % $perpage) == 0)
{
$mybb->input['page'] = $result / $perpage;
}
else
{
$mybb->input['page'] = intval($result / $perpage) + 1;
}
}
I then globalized $result. It works and the issue is fixed now, but is ok to do this? I mean, can I just globalize variables like that instead of defining them? For example, would it be ok to remove the following code and instead put those variables in the global scope? (I've tested it, both methods work)
$perpage = $mybb->settings['postsperpage'];
$postcount = intval($thread['replies'])+1;
$pages = $postcount / $perpage;
$pages = ceil($pages);
Thanks again for your help.