Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Unanswered posts mod?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Unanswered posts mod?

 Post Reply Post Reply
Author
skbohler View Drop Down
Newbie
Newbie


Joined: 08 February 2006
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote skbohler Quote  Post ReplyReply Direct Link To This Post Topic: Unanswered posts mod?
    Posted: 15 June 2006 at 8:25pm
Hello,
 
Does anyone know if there is a mod which displays a list of posts that have no replies? I have seen this on some other forums.
 
Thanks in advance,
 
Steve
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 16 June 2006 at 9:02am
this is a very quick edit of Maddogs Last 10 Posts mod

ive changed it to only get topics that dont have replies (unanswered)
it should work for what you want

<%
'#########################################################################
'##
'## Display Newest Forum Posts with WebWizForums v8.x
'## Modified by Dale (mbd2) to work with v8.x
'## ogrinally designed by www.maddog-asp.com
'##
'## 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)
'##
'#########################################################################
%>
<style type="text/css">
<!--
.text {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12; color: black;}
a {font-family: Verdana, Arial, Helvetica, sans-serif, Verdana, Arial, Helvetica, sans-serif; color: blue; font-size: 12; text-decoration: none;}
a:hover {font-family: Verdana, Arial, Helvetica, sans-serif; color: blue; font-size: 12; text-decoration: underline;}
a:visited {font-family: Verdana, Arial, Helvetica, sans-serif; color: blue; font-size: 12; text-decoration: none;}
a:visited:hover {font-family: Verdana, Arial, Helvetica, sans-serif; color: blue; font-size: 12; text-decoration: underline;}
-->
</STYLE>
<table cellpadding="3" cellspacing="1" width="186" bgcolor="" border="0" class="text">
  <tr>
    <td bgcolor="" align="center" class="tableSubLedger" height="15">10
      Newest Posts</td>
 </tr>
 <tr>
    <td width="33%" align="center" class="tableRow" nowrap height="25">
      <%
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 = 10

'Database connection
'-----------------------------
'-----------------------------

'Default connection
strLastestPostsModCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("")

'Uncomment for a full phsyical path. Then change the path
'strLastestPostsModCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="

'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 tblTopic.No_of_replies = 0"
strSQLLastsPostsMod = strSQLLastsPostsMod & "ORDER BY tblTopic.Last_entry_date DESC;"

rsLastestPostsMod.Open strSQLLastsPostsMod, adoLastestPostsModCon

If rsLastestPostsMod.EOF Then
 Response.Write "<span class=""smltext"">No Forum Posts Made</span>"
Else
 Do while NOT rsLastestPostsMod.EOF
  If len(rsLastestPostsMod("Subject")) > 18 then
   strLastestPostsModTopicSubject = left(rsLastestPostsMod("Subject"),18) & "...&nbsp;"
  Else
   strLastestPostsModTopicSubject = rsLastestPostsMod("Subject")
  End If

  Response.Write("<a href=""" & strLastestPostsModForumPath & "forum_posts.asp?TID=" & rsLastestPostsMod("Topic_ID") & "&PN=1"">" & 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
%>
    </td>
 </tr>
</table>

Edited by Scotty_32 - 16 June 2006 at 9:03am
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
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.