News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Handling unread posts and links

Started by ormuz, May 21, 2018, 09:33:06 AM

Previous topic - Next topic

ormuz

I've a custom template.

All my #new anchors, get assigned to the last post (see attach).

This is my display.template code
// Get all the messages...
while ($message = $context['get_message']())
{
$ignoring = false;
$alternate = !$alternate;
if ($message['can_remove'])
$removableMessageIDs[] = $message['id'];

// Are we ignoring this message?
if (!empty($message['is_ignored']))
{
$ignoring = true;
$ignoredMsgs[] = $message['id'];
}

// Show the message anchor and a "new" anchor if this message is new.
if ($message['id'] != $context['first_message'])
echo '
<a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';

echo '
<div class="home-feed windowbg24">
<div class="post_wrapper">';

// Show information about the poster of this message.
echo '


Any ideas on where to start debugging this?


ormuz

topic solved..

For anyone wonder, this is the correct peace of code.

$scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['new_from'] . ';topicseen#new',

Advertisement: