Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Script for the front *.asp page
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Script for the front *.asp page

 Post Reply Post Reply
Author
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Topic: Script for the front *.asp page
    Posted: 15 January 2004 at 9:17pm

I know I asked this before:(  But I searched and searched and I would like a script that will call up the top 5 or 10 most recent posts to my main *.asp web page.  I still  can't find it.  Can some one please post a link or just post the scipt.  I have the mod to post the 5 most recent posts to the main FORUM page but I would like to pull these most recent post on my front WEB page... 

Thanks in Advance

Lo

 

PS

You can see what I'm trying to accomplish from my link below.

Thanks.................

You can see what I'm trying

Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2004 at 9:21pm

Simple:


Dim strRecentPosts
strSQL = "SELECT TOP 10 topic_ID,subject from tblTopic ORDER BY Last_entry_date DESC"
rsCommon.open strSQL, adoCon

Do until rscommon.eof or rsCommon.bof
strRecentPosts = strRecentPosts + ("<a href=""http://www.yoursite/forum/forum_posts.asp?TID=" & RsCommon("topic_ID") & "&PN=1&TPN=1"">" & rsCommon("subject") & "</a><BR>")
rsCommon.movenext
loop

rsCommon.close

Then wherever you want the recent posts box simply put:


<%=strRecentPosts%>



Edited by Gullanian
Back to Top
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Posted: 16 January 2004 at 1:44pm

Thanks that got me in the right direction...  I need some more help but it's working now.

 

Thanks,

Lo

Just trying to have some fun and learn in the process.
Come have Some Fun
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.