I really like this! I just wanted to share the mods that I did.
- Hover your cursor over the next/previous icons to display the next/previous topic title
Sub Topic_nav()
if prevTopic = "" then
strSQL = "SELECT T_SUBJECT, TOPIC_ID "
strSql = strSql & "FROM " & strActivePrefix & "TOPICS "
strSql = strSql & "WHERE T_LAST_POST > '" & Topic_LastPost
strSql = strSql & "' AND FORUM_ID=" & Forum_ID
strSql = strSql & " ORDER BY T_LAST_POST;"
set rsPrevTopic = my_conn.Execute(TopSQL(strSql,1))
if rsPrevTopic.EOF then
prevTopic = getCurrentIcon(strIconBlank,"","align=""top"" hspace=""6""")
else
prevTopic = "<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & rsPrevTopic("TOPIC_ID") & """>" & getCurrentIcon(strIconGoLeft,"" & rsPrevTopic("T_SUBJECT") & "","align=""top"" hspace=""6""") & "</a>"
end if
rsPrevTopic.close
set rsPrevTopic = nothing
else
prevTopic = prevTopic
end if
if NextTopic = "" then
strSQL = "SELECT T_SUBJECT, TOPIC_ID "
strSql = strSql & "FROM " & strActivePrefix & "TOPICS "
strSql = strSql & "WHERE T_LAST_POST < '" & Topic_LastPost
strSql = strSql & "' AND FORUM_ID=" & Forum_ID
strSql = strSql & " ORDER BY T_LAST_POST DESC;"
set rsNextTopic = my_conn.Execute(TopSQL(strSql,1))
if rsNextTopic.EOF then
nextTopic = getCurrentIcon(strIconBlank,"","align=""top"" hspace=""6""")
else
nextTopic = "<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & rsNextTopic("TOPIC_ID") & """>" & getCurrentIcon(strIconGoRight,"" & rsNextTopic("T_SUBJECT") & "","align=""top"" hspace=""6""") & "</a>"
end if
rsNextTopic.close
set rsNextTopic = nothing
else
nextTopic = nextTopic
end if
Response.Write (" " & prevTopic & "<b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """> Topic </font></b>" & nextTopic)
end sub
I hope you like it.