Print Page | Close Window

Last topic displayed for each forum on default.asp

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=22804
Printed Date: 30 March 2026 at 9:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Last topic displayed for each forum on default.asp
Posted By: nsomniac
Subject: Last topic displayed for each forum on default.asp
Date 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!



Replies:
Posted By: gölge
Date 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 http://www.tallarmeniantale.com - www.tallarmeniantale.com AND SEE THE TRUTH.


Posted By: nsomniac
Date 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?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net