News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Last post date/time question

Started by [chrisB], December 12, 2022, 02:09:21 PM

Previous topic - Next topic

[chrisB]

Can the 'Last Post: Date and time' be a link to the actual post also?
I'm stuck in a time warp from the early 00's.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

[chrisB]

I'm stuck in a time warp from the early 00's.

Kindred

I assume you mean the board-list then?

in Boardindex.template.php, you'd have to add the link to the loops that pulls the content (sorry, on a mobile device, so Idon't have the exact code in front of me)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

[chrisB]

Quote from: Kindred on December 12, 2022, 04:13:12 PMI assume you mean the board-list then?

in Boardindex.template.php, you'd have to add the link to the loops that pulls the content (sorry, on a mobile device, so Idon't have the exact code in front of me)
Would you please be able to tell me how to make the edits for this?

Also, if you don't mind. Can the vertical scroll bar in browsers be forced to always show? It happens here a lot, as it does on my forum where it sometimes doesn't show. Usually after a 10 seconds or so, it will popup but it makes my site seem like its bouncing.

I appreciate your help.
I'm stuck in a time warp from the early 00's.

Kindred

Oh...  in looking at the template files, this becomes alot more difficult than I thought.

lastpost generates here
<div class="lastpost">
', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), '
</div>';
by calling
function template_bi_board_lastpost($board)
{
if (!empty($board['last_post']['id']))
echo '
<p>', $board['last_post']['last_post_message'], '</p>';
}

However -- that reads directly from the array which is assembled elsewhere, and includes the link as PART of the array value.

Thing is....   that array value already DOES link to the new posts in the topic.
like so ---> forumurl/index.php?topic=1234.msg5678#new
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: