Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - how do to display the lastest title?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how do to display the lastest title?

 Post Reply Post Reply
Author
alphalee View Drop Down
Newbie
Newbie


Joined: 14 May 2003
Location: China
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote alphalee Quote  Post ReplyReply Direct Link To This Post Topic: how do to display the lastest title?
    Posted: 14 May 2003 at 9:56pm
I want this function:
On the main page of forum,it can display the lastest message's title.
how do i do?
Back to Top
Norrad View Drop Down
Newbie
Newbie


Joined: 08 September 2002
Location: South Africa
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote Norrad Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2003 at 10:43pm
Add this just above where it displays the time and the time of your last visit on the forum homepage.

<%
Response.Write("<b>" & strMainForumName & " Latest News: ")

strSQL = "SELECT Top 1 " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Subject, " & strDbTable & "Forum.Forum_ID "
strSQL = strSQL & "FROM " & strDbTable & "Forum INNER JOIN " & strDbTable & "Topic ON " & strDbTable & "Forum.Forum_ID = " & strDbTable & "Topic.Forum_ID "
strSQL = strSQL & "WHERE ((" & strDbTable & "Forum.Password) Is Null) "
strSQL = strSQL & "ORDER BY " & strDbTable & "Topic.Last_entry_date DESC;"

rsCommon.Open strSQL, adoCon

If rsCommon.EOF Then
     Response.Write "No Posts Made"
Else
     Do while NOT rsCommon.EOF
          If len(rsCommon("Subject"))>18 then
               strTopicSubject = left(rsCommon("Subject"),18) & "..."
          Else
               strTopicSubject = rsCommon("Subject")
          End If
          
          Response.Write("<a href=""forum_posts.asp?TID=" & rsCommon("Topic_ID") & "&PN=1"">" & strTopicSubject & "</a>")
          
     rsCommon.MoveNext
     Loop
End If

Response.Write("</b><br>")

rsCommon.Close
%>

If your forum is in another language then you will have to do the translation yourself.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.