Hier die Codezeile:
Code: Alles auswählen
$sql = "SELECT t.topic_title, t.topic_id
FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2
WHERE
t2.topic_id = $topic_id
AND t.forum_id = t2.forum_id
AND t.topic_last_post_id > t2.topic_last_post_id
ORDER BY t.topic_last_post_id ASC
LIMIT 1";
if ( !($result = $db->sql_query($sql)) || $db->sql_numrows($result) != 1 )
{
$nextTopicText = $lang['No_newer_topics'];
$nextTopicLink = '#';
}
else
{
$row = $db->sql_fetchrow($result);
$nextTopicText = $row['topic_title'];
$nextTopicLink = append_sid("viewtopic.php?t=" . $row['topic_id'], "", $nextTopicText);
}
$db->sql_freeresult($result);
$sql = "SELECT t.topic_title, t.topic_id
FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2
WHERE
t2.topic_id = $topic_id
AND t.forum_id = t2.forum_id
AND t.topic_last_post_id < t2.topic_last_post_id
ORDER BY t.topic_last_post_id DESC
LIMIT 1";
if ( !($result = $db->sql_query($sql)) || $db->sql_numrows($result) != 1 )
{
$prevTopicText = $lang['No_older_topics'];
$prevTopicLink = '#';
}
else
{
$row = $db->sql_fetchrow($result);
$prevTopicText = $row['topic_title'];
$prevTopicLink = append_sid("viewtopic.php?t=" . $row['topic_id'], "", $prevTopicText);
}
$db->sql_freeresult($result);
Dann soll man laut MOD noch folgende Änderungen durchführen aber die sind für das Problem nicht relevant soweit ich das erkennen kann:
Code: Alles auswählen
#
#-----[ FINDE ]---------------------------------------------------
#
'L_VIEW_NEXT_TOPIC' => $lang['View_next_topic'],
'L_VIEW_PREVIOUS_TOPIC' => $lang['View_previous_topic'],
#
#-----[ DANACH EINFÜGEN ]---------------------------------------------------
#
'L_VIEW_NEXT_NAME' => $nextTopicText,
'L_VIEW_PREVIOUS_NAME' => $prevTopicText,
#
#-----[ FINDE ]---------------------------------------------------
#
'U_VIEW_OLDER_TOPIC' => $view_prev_topic_url,
'U_VIEW_NEWER_TOPIC' => $view_next_topic_url,
#
#-----[ ERSETZEN DURCH ]------------------------------------------
#
'U_VIEW_OLDER_TOPIC' => $prevTopicLink,
'U_VIEW_NEWER_TOPIC' => $nextTopicLink,