Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 11 Months, 1 Week ago Jump to last post in threads shown in portal
#1
Solved: 4 Years, 11 Months, 1 Week ago
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.
Reply
#2
Solved: 4 Years, 11 Months, 1 Week ago
(10-27-2014, 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?
Hey man, what's up?
Reply
#3
Solved: 4 Years, 11 Months, 1 Week ago
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.
Reply
#4
Solved: 4 Years, 11 Months, 1 Week ago
(10-27-2014, 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?
Reply
#5
Solved: 4 Years, 11 Months, 1 Week ago
Try this:
<a href="{$mybb->settings['bburl']}/showthread.php?tid={$announcement['tid']}&amp;action=lastpost">{$lang->replies}</a> ({$announcement['replies']})
Reply
#6
Solved: 4 Years, 11 Months, 1 Week ago
(10-27-2014, 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.
Reply
#7
Solved: 4 Years, 11 Months, 1 Week ago
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.
Reply
#8
Solved: 4 Years, 11 Months, 1 Week ago
Provide forum URL and a testing account which can view portal news.
Reply
#9
Solved: 4 Years, 11 Months, 1 Week ago
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
Reply
#10
Solved: 4 Years, 11 Months, 1 Week ago
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>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)