MyBB Community Forums

Full Version: Jump to last post in threads shown in portal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm using Square theme in myBB 1.8.

Is there a way to make it so you jump to the last post in a thread shown in the portal instead of the first post?

Thanks.
(2014-10-27, 07:46 AM)amanda2014 Wrote: [ -> ]I'm using Square theme in myBB 1.8.

Is there a way to make it so you jump to the last post in a thread shown in the portal instead of the first post?

Thanks.


I don't know the answer but I want to know myself! What I do know is,

1. the template file that needs to be changed is: portal_announcement_numcomments

2. here is the contents of the template file:
- <a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}">{$lang->replies}</a> ({$announcement['replies']})

3. this is what needs to be changed:
/{$announcement['threadlink']}

As you see, the url directs the user to the thread link,

I tried changing it to /showthread.php?action=lastpost

but it didn't work. Maybe an expert can help us?
The link mentioned above should be:
<a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}&amp;action=lastpost">{$lang->replies}</a>
So basically add &amp;action=lastpost at the end.
(2014-10-27, 03:28 PM)Destroy666 Wrote: [ -> ]The link mentioned above should be:


<a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}&amp;action=lastpost">{$lang->replies}</a>
So basically add &amp;action=lastpost at the end.

I'm not getting this to work. I tried this:

- <a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}&amp;action=lastpost">{$lang->replies}</a> ({$announcement['replies']})


both with and without the dash at the beginning and with and without the ({$announcement['replies']}) at the end.


Michael2014, are you having any success?
Try this:
<a href="{$mybb->settings['bburl']}/showthread.php?tid={$announcement['tid']}&amp;action=lastpost">{$lang->replies}</a> ({$announcement['replies']})
(2014-10-27, 04:51 PM)amanda2014 Wrote: [ -> ]I'm not getting this to work.

There is no reason why it wouldn't work.. Here a demo: http://noo.hol.es/mybb18/portal.php Try hard refreshing your cache with CTRL + F5.
Still not working...  Sad

I keep coming to the first post of the thread clicked in portal. I've hard refreshed my cache just like you said and tried both of your codes.
Provide forum URL and a testing account which can view portal news.
I'm sending it to you in a PM.

The side panel equals the portal, but you can also enter with forum name/portal.php
Well, you could have said in the 1st post that you mean latest threads sidebar.. Everyone thought you're speaking about the news, which are threads too. Be more specific next time please.

Anyways, you need to edit portal_latestthreads_thread instead and replace
<a href="{$mybb->settings['bburl']}/{$thread['threadlink']}">{$thread['subject']}</a>
with:
<a href="{$mybb->settings['bburl']}/{$thread['threadlink']}&amp;action=lastpost">{$thread['subject']}</a>
Pages: 1 2