<%
'#########################################################################
'##
'## Display Newest Forum Posts with WebWizForums v7.x
'##
'## If you have any problems with this visit www.maddogs-asp.com
'## and post on the forums with the problem you are having and
'## if you have any error please post the full error so we can
'## help you easyer.
'##
'## Just change the database connection in the strMembersModCon
'## variable.
'##
'## Then make sure the strLastestPostsModForumPath is the right path
'## to your forum.
'##
'## Mod from www.maddogs-asp.com
'##
'## Writen by Drew Gauderman (aka MadDog)
'## Email: drew@madasp.com
'## Website: www.maddogs-asp.com
'##
'#########################################################################
%>
<table width="135" cellpadding="0" cellspacing="0" class="text_arial">
<tr>
<td width="33%" align="left" nowrap height="25"> <font face="Arial, Helvetica, sans-serif" size="2">
<%
Dim rsLastestPostsMod
Dim adoLastestPostsModCon
Dim strLastestPostsModCon
Dim strSQLLastsPostsMod
Dim strLastestPostsModTopicSubject
Dim strLastestPostsModForumPath
Dim intLastestPostsTotal
'The path to the forum
strLastestPostsModForumPath = ""
'How many new topics to show
intLastestPostsTotal = 25
'Database connection
'-----------------------------
'-----------------------------
'Default connection
'strLastestPostsModCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/database/wwforum.mdb")
'Uncomment for a full phsyical path. Then change the path
'strLastestPostsModCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:/yoursite/root/forum/admin/database/wwforum.mdb"
strLastestPostsModCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strDbPathAndName 'This one is for Access 2000/2002
'Uncomment for a DSN connection
'strLastestPostsModCon = "DSN=DSN_NAME"
'-----------------------------
'-----------------------------
Set adoLastestPostsModCon = Server.CreateObject("ADODB.Connection")
adoLastestPostsModCon.Open strLastestPostsModCon
Set rsLastestPostsMod = Server.CreateObject("ADODB.Recordset")
strSQLLastsPostsMod = "SELECT Top " & intLastestPostsTotal & " tblTopic.Topic_ID, tblTopic.Subject, tblForum.Forum_ID "
strSQLLastsPostsMod = strSQLLastsPostsMod & "FROM tblForum INNER JOIN tblTopic ON tblForum.Forum_ID = tblTopic.Forum_ID "
strSQLLastsPostsMod = strSQLLastsPostsMod & "WHERE ((tblForum.Password) Is Null) "
strSQLLastsPostsMod = strSQLLastsPostsMod & "ORDER BY tblTopic.Last_entry_date DESC;"
rsLastestPostsMod.Open strSQLLastsPostsMod, adoLastestPostsModCon
If rsLastestPostsMod.EOF Then
Response.Write "<span class=""text_arial"">No Forum Posts Made</span>"
Else
Do while NOT rsLastestPostsMod.EOF
If len(rsLastestPostsMod("Subject")) > 18 then
strLastestPostsModTopicSubject = left(rsLastestPostsMod("Subject"),30) & "... "
Else
strLastestPostsModTopicSubject = rsLastestPostsMod("Subject")
End If
Response.Write("<img src=/Slike_template/kvadrat_CC3300.jpg width=5 height=5 hspace=5 align=absmiddle><a href=""" & strLastestPostsModForumPath & "forum_posts.asp?TID=" & rsLastestPostsMod("Topic_ID") & "&PN=1"" target=_parent>" & strLastestPostsModTopicSubject & "</a>")
rsLastestPostsMod.MoveNext
If NOT rsLastestPostsMod.EOF Then Response.Write("<br>")
Loop
End If
'Reset Server Objects
rsLastestPostsMod.Close
Set rsLastestPostsMod = Nothing
adoLastestPostsModCon.Close
Set adoLastestPostsModCon = Nothing
%>