Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Last topic displayed for each forum on default.asp
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Last topic displayed for each forum on default.asp

 Post Reply Post Reply
Author
nsomniac View Drop Down
Newbie
Newbie


Joined: 01 March 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote nsomniac Quote  Post ReplyReply Direct Link To This Post Topic: Last topic displayed for each forum on default.asp
    Posted: 01 March 2007 at 11:56am
Hi,

I was wondering if there was any way of showing just the title of the last topic in each forum on the default.asp page.

That is, for each forum, in the table of last post where is actually just has the username and timestamp of the last post, can you add the title of this last post as well??

I'm sure it's very easy with asp, but i'm a complete newbie and would love a tip on how to do this. Would be most appreciative!
Back to Top
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2007 at 4:20pm
first define a veriable named  strSubject
 
dim strSubject
 
 
 
find that code;
 
'Write the HTML of the forum descriptions and hyperlinks to the forums
 
 
and paste that code after it:
     'Write the HTML of the forum descriptions and hyperlinks to the forums
     'Son mesajlar
     strSQL = "SELECT" & strDBTop1 & " " & strDbTable & "Topic.Subject FROM " & strDbTable & "Topic" & strDBNoLock & ", " & strDbTable & "Thread" & strDBNoLock & " " & _
      "WHERE " & strDbTable & "Topic.Topic_ID = " & strDbTable & "Thread.Topic_ID AND " & strDbTable & "Topic.Forum_ID=" & intForumID & " AND " & strDbTable & "Topic.Hide=" & strDBFalse & " " & _
       "AND " & strDbTable & "Thread.Hide=" & strDBFalse & " ORDER BY " & strDbTable & "Thread.Message_date DESC" & strDBLimit1 & ";"
      rsCommon.Open strSQL, adoCon
      if NOT rsCommon.EOF then
      If len(rsCommon("Subject"))>30  Then
       strSubject = "<a href=""get_last_post.asp?FID=" &intForumID & """ class=""link_1"">" & left(rsCommon("Subject"),30) &"..."& "</a>"
      else
       strSubject = "<a href=""get_last_post.asp?FID=" &intForumID & """ class=""link_1"">" & rsCommon("Subject")& "</a>"
      End If
      end if
      rsCommon.Close
        'Son Mesajlar 
 
 
 
finally find and change this code:
 
     If lngNumberOfPosts <> 0 Then
        'Don't disply last post details if there are none 
      Response.Write(DateFormat(dtmLastEntryDate) & "&nbsp;" &  strTxtAt & "&nbsp;" & TimeFormat(dtmLastEntryDate) & _
      "<br/>" & strTxtBy & "&nbsp;<a href=""member_profile.asp?PF=" & lngLastEntryUserID & strQsSID2 & """ class=""smLink"">" & strLastEntryUser & "</a> <a href=""get_last_post.asp?FID=" & intLastForumEntryID & strQsSID2 & """><img src=""" & strImagePath & "right_arrow.gif"" align=""absmiddle"" border=""0"" alt=""" & strTxtViewLastPost & """ /></a>")
     End If 
 
 
to this;
 
 
     If lngNumberOfPosts <> 0 Then
        'Don't disply last post details if there are none 
      Response.Write(strSubject & "<br />" & DateFormat(dtmLastEntryDate) & "&nbsp;" &  strTxtAt & "&nbsp;" & TimeFormat(dtmLastEntryDate) & _
      "<br/>" & strTxtBy & "&nbsp;<a href=""member_profile.asp?PF=" & lngLastEntryUserID & strQsSID2 & """ class=""smLink"">" & strLastEntryUser & "</a> <a href=""get_last_post.asp?FID=" & intLastForumEntryID & strQsSID2 & """><img src=""" & strImagePath & "right_arrow.gif"" align=""absmiddle"" border=""0"" alt=""" & strTxtViewLastPost & """ /></a>")
     End If 
 
 
thats all....
"A lie travels round the world while Truth is putting on her boots" C.H. Sturgeon
PLEASE VISIT www.tallarmeniantale.com AND SEE THE TRUTH.
Back to Top
nsomniac View Drop Down
Newbie
Newbie


Joined: 01 March 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote nsomniac Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2007 at 12:36pm
Hi Golge,

Thanks for the mod! It works great, but I was wondering if there is any way to modify the code so that it also shows the last post on the main default.asp page of the last subforum post in the forum "Last Post" section.

So if there have been a few subforum posts, it just shows the last subforum post in the forum "Last Post" row on the main default.asp??

Is this possible?
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.