Print Page | Close Window

Latest posts

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=2250
Printed Date: 31 March 2026 at 5:05am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Latest posts
Posted By: markmied
Subject: Latest posts
Date Posted: 28 April 2003 at 1:19pm

I have latest posts being displayed on my front page at:

http://www.cdnauto.org - http://www.cdnauto.org

It is working fine, however, it only shows topics that are posted and not replied to.  I want it to be able to show latest topic whether it has been to replied to or not.  Also hyperlink to the topic does not work.  Thank you in advance.  Here is the code:

<%
Dim rsLastestPosts
Dim strPosts
Dim adoCon
Dim strCon
Dim strSQL

'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")

'Database connection info and driver
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=; DBQ=" & Server.MapPath("/forum/XXXX/XXXXXXX.XXX")

'Set an active connection to the Connection object
adoCon.Open strCon

Set rsLastestPosts = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT Top 3 tblTopic.*, tblForum.* "
strSQL = strSQL & "FROM tblForum INNER JOIN tblTopic ON tblForum.Forum_ID = tblTopic.Forum_ID "
strSQL = strSQL & "WHERE ((tblForum.Password) Is Null) and Start_date = Last_entry_date "
strSQL = strSQL & "ORDER BY tblTopic.Last_entry_date DESC;"

rsLastestPosts.Open strSQL, strCon

If rsLastestPosts.EOF Then Response.Write "Ingen nye indlęg"

Do while NOT rsLastestPosts.EOF

If len(rsLastestPosts("Subject"))>14 then
     strPosts = left(rsLastestPosts("Subject"),14) & "... "
Else
     strPosts = rsLastestPosts("Subject")
End If


%>
                    <br>
                    <a href="forum_posts.asp?TID=<% = rsLastestPosts("Topic_ID") %>" target="_self">
                    <% = strPosts %>
                    <br>
                    </a>
                    <%     
rsLastestPosts.MoveNext
Loop
rsLastestPosts.Close
Set rsLastestPosts = Nothing
adoCon.Close
Set adoCon = Nothing
Set strCon = Nothing
%>

 




Replies:
Posted By: MadDog
Date Posted: 28 April 2003 at 1:26pm
That shows the lastest topic and even when it was replyed. And add "forum/" in the link, then it works just fine.

-------------
http://www.iportalx.net" rel="nofollow">


Posted By: markmied
Date Posted: 28 April 2003 at 1:30pm

I have it set to show 3 latest postings.  They do disapear once it is replied to.  Testing keeps showing because there was no reply to it.  There were other postings there and are gone now.  And adding /forum in the link still makes it invalid.  Thanks for fast answer though.

Please reply again.

 



Posted By: MadDog
Date Posted: 28 April 2003 at 1:33pm

change:

<a href="forum_posts.asp?TID=<% = rsLastestPosts("Topic_ID") %>" target="_self">

to:

<a href="forum/forum_posts.asp?TID=<% = rsLastestPosts("Topic_ID") %>" target="_self">



-------------
http://www.iportalx.net" rel="nofollow">


Posted By: Zamal
Date Posted: 28 April 2003 at 1:35pm
You search for posts where the startdate = last_entry_date. That way you'll only find the first post of a topic


Posted By: markmied
Date Posted: 28 April 2003 at 1:37pm

I know you don't believe me - it doesn't work.  I changed the code, check for yourself.  The forum is in the forum directory.  ?

Thanks Maddog.



Posted By: MadDog
Date Posted: 28 April 2003 at 1:41pm

O man, your using v6!

Your using the mod for v7, you want this one, http://www.maddogs-asp.com/show_entry.asp?TYP=2&EntryID=53 - http://www.maddogs-asp.com/show_entry.asp?TYP=2&EntryID=53



-------------
http://www.iportalx.net" rel="nofollow">


Posted By: markmied
Date Posted: 28 April 2003 at 1:44pm

Sorry I forgot to mention Ver. 6.  I will look at your site.  Thank you for all your help Maddog.  http://www.maddogs-asp.com - www.maddogs-asp.com >> Nice site by the way.

 

 



Posted By: MadDog
Date Posted: 28 April 2003 at 1:46pm

Thanks.

If your gonna get anymore mods make sure they are in the v6 section ;)



-------------
http://www.iportalx.net" rel="nofollow">


Posted By: markmied
Date Posted: 28 April 2003 at 1:47pm

One more question.  In the read me file it says: NOTE: it must be on a page that the forum uses.

Will it work on my front page?




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