Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Frequently Asked Questions
 FAQ Addition Requests
 Posting 5 last posts on my homepage
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fluor
Starting Member

2 Posts

Posted - 23 March 2001 :  09:36:56  Show Profile  Reply with Quote
Hi and thanks for the best software!
I just wondered if somebody can code me a simple ASP code so i can post a little table on my homepage, announcing the last 5 posts.

E.g.
WELCOME TO MY HOMEPAGE!

Blah blah blah
blah..
Check the forum (link)
5 last posts:
23.03 "Oh yeah" by Zyko
23.03 "Stop discussing this!" by Zyko
22.03 "Yeah right!" by Zyko
21.03 - "I like rock and if you hate it then..." by Zyko

Would be cool if the all those posts were links where <a href="URL" title="23-MARCH-2001 - Full text of post goes here (max 250chars)"> "Yeah right!" </a>

This would be real cool. I am tired of login in and see no new topics every day (I run a small board).



Edited by - fluor on 23 March 2001 09:47:18<

Kerry
Average Member

USA
553 Posts

Posted - 23 March 2001 :  09:53:51  Show Profile  Visit Kerry's Homepage  Reply with Quote
Look in Mods w/Code for the the Slash addon - it sounds exactly like what you're looking for.

-Kerry

<
Go to Top of Page

fluor
Starting Member

2 Posts

Posted - 27 March 2001 :  02:14:59  Show Profile  Reply with Quote
I tried installing it, but it failed. How about just giving me a little ASP code to post on the web. Must be simple to program if it's only the last five topics sorted by newest date.

<
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 27 March 2001 :  03:08:17  Show Profile  Reply with Quote
try here: http://forum.snitz.com/forum/link.asp?TOPIC_ID=7032<
Go to Top of Page

acoustika
Junior Member

Denmark
311 Posts

Posted - 19 November 2003 :  00:46:17  Show Profile  Visit acoustika's Homepage  Send acoustika an ICQ Message  Reply with Quote
Hey there

I have used and modified a bit the code from Richard's link

quote:
try here: http://forum.snitz.com/forum/link.asp?TOPIC_ID=7032


Now I have a little request, Could someone please help me make so it also shows WHO posted the topic.

My code is as follows, the little script can be seen in use here
www.uniquedk.dk/forum/f_news.asp

CODE:

<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE file="inc_func_secure.asp" -->
<!--#INCLUDE file="inc_sha256.asp"-->
<%
connString = strConnstring
function getlast_topics(numdays)
set tConn= Server.CreateObject("ADODB.Connection")
tConn.Open ConnString

'''''''''''''''''''''''''''''''''''''    
''Don't display if from private forum    
'''''''''''''''''''''''''''''''''''''    
set PrivateForum = tConn.Execute("select FORUM_ID from FORUM_FORUM where F_PRIVATEFORUMS = 6")    
SQL = "SELECT TOP " & numdays & " * from FORUM_TOPICS WHERE "    
do until PrivateForum.eof        
SQL = SQL & "FORUM_ID <> " & PrivateForum("FORUM_ID") & " and "        
PrivateForum.movenext    
Loop    
'''''''''''''''''

strSql = "SELECT TOP " & numdays & " T_AUTHOR,T_LAST_POST,T_LAST_POSTER,T_DATE,T_SUBJECT,TOPIC_ID,FORUM_ID,CAT_ID from FORUM_TOPICS order by T_LAST_POST DESC"
CColor = strForumCellColor
set rss = tConn.Execute (strSql)

response.write    "<tr><td bgcolor=""" & strCategoryCellColor & """ height=""24"" align=""center"">Nyeste Forum Indlæg</td></tr>" & vbnewline

do until rss.eof
tID = rss("TOPIC_ID")
tPOSTER = rss("T_LAST_POSTER")
tDATE = rss("T_DATE")
tSUBJECT = rss("T_SUBJECT")
strlast = strlast & "<tr><td onMouseOver=""this.style.background='" & strForumFirstcellcolor & "';"" onMouseOut=""this.style.background='"& CColor &"';"" style=""cursor: hand"" bgcolor=" & CColor & " onClick=""window.location.href='/forum/link.asp?TOPIC_ID=" & tID & "'"" height=""18"" class=""button"">" & vbcrlf
strlast = strlast & "<div align=""left"" class=""button (unavailable)""><font face=""Veranda, Arial, Helvetica, san-serif"" size=""1"">Emne: <a href=""link.asp?TOPIC_ID=" & tID & """ class=""button (unavailable)"" target=""_blank""><small>" & tSUBJECT & "</small></a></font></div>" & vbcrlf
strlast = strlast & "</td></tr>" & vbcrlf

rss.movenext
loop

rss.close
set rss=nothing
tConn.close
set tConn=nothing
getlast_topics=strlast
end function
%>
<table width="100%" cellspacing="1" cellpadding="0" border="0" bgcolor="#333333">
<%=getlast_topics(5)%>
</table>
<

May The Code Be With You
www.UniqueDk.dk *** The Open Forums of Denmark ***
Go to Top of Page

Sparks
Starting Member

USA
6 Posts

Posted - 19 February 2004 :  15:15:48  Show Profile  Visit Sparks's Homepage  Send Sparks an AOL message  Reply with Quote
quote:
How about just giving me a little ASP code to post on the web. Must be simple to program if it's only the last five topics sorted by newest date.


I wrote a simple plug-in for my website, http://www.iscifistory.com . In the left nave bar, the last 5 topics are listed. It is indeed just a few lines of code; email me at sparks@iscifistory.com and I will share the code.
<

--
Ron Sparks
http://www.iscifistory.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07