Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Frequently Asked Questions
 FAQ Addition Requests
 Posting 5 last posts on my homepage

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
fluor Posted - 23 March 2001 : 09:36:56
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<
5   L A T E S T    R E P L I E S    (Newest First)
Sparks Posted - 19 February 2004 : 15:15:48
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.
<
acoustika Posted - 19 November 2003 : 00:46:17
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>
<
RichardKinser Posted - 27 March 2001 : 03:08:17
try here: http://forum.snitz.com/forum/link.asp?TOPIC_ID=7032<
fluor Posted - 27 March 2001 : 02:14:59
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.

<
Kerry Posted - 23 March 2001 : 09:53:51
Look in Mods w/Code for the the Slash addon - it sounds exactly like what you're looking for.

-Kerry

<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000 Version 3.4.07