Print Page | Close Window

How to Display Last 5 Posts on ASP Page

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=19172
Printed Date: 12 April 2026 at 2:22pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How to Display Last 5 Posts on ASP Page
Posted By: wmeyers
Subject: How to Display Last 5 Posts on ASP Page
Date Posted: 06 April 2006 at 6:50pm
Can someone please share the code they would use to display the last 5 forum topics on an ASP page?
 
I've read something about a javascript routine that does this, but I can't locate the actual code.
 
Thanks!



Replies:
Posted By: WebWiz-Bruce
Date Posted: 07 April 2006 at 11:47am
The forum has an RSS Feed of the last 10 posts.

If you search on Google there are tools to be able to display an RSS Feed in another page even another site, you could use one of these RSS Feed Tools to display the last 10 posts in another page.


Posted By: wmeyers
Date Posted: 07 April 2006 at 2:00pm
Thanks, yeah, I was searching yesterday and coming across all kinds of stuff. I was hoping if someone here was already doing it they could share the code that works. Information overload is confusing me!
 
From what I understand there is a program that extracts the forum data, then another program that translates it. After it is translated, it can be read by a java snippet.
 
Does your program do the translation as well as the extraction? Or am I misunderstanding what I'm reading?


Posted By: WebWiz-Bruce
Date Posted: 07 April 2006 at 2:05pm
I've never looked at the tools that allow you to place RSS Feeds in other pages, I just know they exist.

One day when I have the time I will look into it further.


Posted By: wmeyers
Date Posted: 07 April 2006 at 8:45pm
OK, I had some luck today I'd like to share.
 
Here is a link that helped me:
 
http://home.att.net/~codeLibrary/XML/rss.htm - http://home.att.net/~codeLibrary/XML/rss.htm
 
I put the ASP sub code in my ASP page, and added the html snippet to call it where I want the forum entries to appear.
 
On the above page there is a link to download a news.xsl file - this translates the RSS format into an html compatible format, and is very similar to html. I am playing with this file now to get the forum data to appear the way I want it.
 
The only things to remember is to modify the path to news.xsl (or whatever you want to call it) so it points to this file which you need to upload to the forum directory, and to enter the URL to the rss_topic.asp page in the html snippet where you want the forum data to appear.
 
If anyone has any questions please feel free to contact me or post here, I'll do my best to share what I did to get to this point.
 
You can see the results on http://www.CommuterClub.org/
 


Posted By: Andersen
Date Posted: 07 April 2006 at 8:56pm
I have tried some of the RSS readers. (Seperate apps).
Due to problems with the RSS feed from my forum, which I first thought was because of the scandinavian letters, I tested a few readers feeds from other sites which also contained scandinavian letters. They worked fine in the readers I tested. But my forum still fails.
I think there is a problem in the feed from WWF.


-------------
Greets
Andersen


Posted By: Andersen
Date Posted: 07 April 2006 at 9:15pm
Arrgh, have just been told, my forum is working fine in Firefox.. Now I really dont get it Wacko


-------------
Greets
Andersen


Posted By: niugiovanni
Date Posted: 08 April 2006 at 12:48am
Just use an SQL query by topic number and get the last 5 posts relating to a forum_id. Or am I missing what you're really looking for? If I can help just PM me. I've integrated WebWiz into four sites now.

     http://www.heatofbattle.net - http://www.heatofbattle.net
http://www.mikesmarauders.com - http://www.mikesmarauders.com


Posted By: wmeyers
Date Posted: 08 April 2006 at 3:30pm
Thanks, niugiovanni - I was able to do what I needed using rss and xml, just need to play around with the .xsl file to get it looking the way I want it.
 
The requirement is to have the last 5 posts appear on any page on my site. Right now I just want them on the home page. All pages are ASP. The beauty of this method is I can syndicate the forums by providing the code to other sites - it will work anywhere as long as they run ASP.
 
That said, I am curious to see the code you used to make this work directly from the WWF SQL database, if you don't mind sharing. Just because I have it working doesn't mean it is the best way!
 
Thanks,
 
Wayne



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