Clickable last post date?

Started by Melonking, February 01, 2022, 06:40:39 PM

Previous topic - Next topic

Melonking

Hi, not sure if this is just a setting or a mod or something that needs to be custom coded. On this forum when you are on a board you can click the last post date and it will take you to the last post of a topic. On my forum running 2.0.18 you cannot do that. Is there a way I can add this feature?

Sir Osis of Liver

In 2.0 you get to last post by clicking on "in topic title" in right column.  Date/time is not linked.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

And when you're inside a board, on 2.1 (like this site) you can use the title to get to the last post; on 2.0 you have to click the little arrow that's present:

You cannot view this attachment.

Melonking

Quote from: Arantor on February 01, 2022, 07:59:21 PMAnd when you're inside a board, on 2.1 (like this site) you can use the title to get to the last post; on 2.0 you have to click the little arrow that's present:

You cannot view this attachment.

Interesting, this is completely missing from my forum theme, do you have a code snippet to for this?

Arantor

Before I get into that, I want to clear one thing up. Sir Osis figured you were on the list of boards (the front page), while I figured you were on the list of topics inside a board?

Which is it, because it affects which file to go looking in...?

Melonking

Quote from: Arantor on February 02, 2022, 08:52:11 AMBefore I get into that, I want to clear one thing up. Sir Osis figured you were on the list of boards (the front page), while I figured you were on the list of topics inside a board?

Which is it, because it affects which file to go looking in...?

You figured correctly, topic list is what I was trying to describe! The topic link shows as expected on the list of boards.

Sir Osis of Liver

The button is last_post.gif in MessageIndex.template.php -


<td class="stats ', $color_class, '">
', $topic['replies'], ' ', $txt['replies'], '
<br />
', $topic['views'], ' ', $txt['views'], '
</td>
<td class="lastpost ', $alternate_class, '">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
', $topic['last_post']['time'], '<br />
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
</td>';


It doesn't appear in some themes, and in others is removed only in mobile display.  I've added it back in, it's annoying not to have it.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Melonking

Thanks! I was able to merge this into the last post date, code added below for anyone interested.

<td class="windowbg2" valign="middle" width="22%">
            <span class="smalltext">',
                '<a href="',
                $topic['last_post']['href'],
                '">',
                $topic['last_post']['time'],
                '</a>',
                '<br />',
                $txt['by'],
                ' ',
                $topic['last_post']['member']['link'],
                '</span></td>';

Doug Heffernan

Quote from: Melonking on February 02, 2022, 03:47:31 PMThanks! I was able to merge this into the last post date, code added below for anyone interested.

<td class="windowbg2" valign="middle" width="22%">
            <span class="smalltext">',
                '<a href="',
                $topic['last_post']['href'],
                '">',
                $topic['last_post']['time'],
                '</a>',
                '<br />',
                $txt['by'],
                ' ',
                $topic['last_post']['member']['link'],
                '</span></td>';


Thanks for posting the solution. It will come in handy to others who might want to achieve the same thing.

Advertisement: