Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Latest posts
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Latest posts

 Post Reply Post Reply Page  12>
Author
markmied View Drop Down
Newbie
Newbie


Joined: 12 January 2003
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmied Quote  Post ReplyReply Direct Link To This Post Topic: Latest posts
    Posted: 28 April 2003 at 1:19pm

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

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
%>

 

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
markmied View Drop Down
Newbie
Newbie


Joined: 12 January 2003
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmied Quote  Post ReplyReply Direct Link To This Post 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.

 

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post 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">

Back to Top
Zamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 27 February 2003
Location: Netherlands
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zamal Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
markmied View Drop Down
Newbie
Newbie


Joined: 12 January 2003
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmied Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
markmied View Drop Down
Newbie
Newbie


Joined: 12 January 2003
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmied Quote  Post ReplyReply Direct Link To This Post 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. www.maddogs-asp.com >> Nice site by the way.

 

 

Back to Top
 Post Reply Post Reply Page  12>

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.