Mod req: "Last 10 topics", Not last 10 posts
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=19852
Printed Date: 29 March 2026 at 10:25am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Mod req: "Last 10 topics", Not last 10 posts
Posted By: fx5500
Subject: Mod req: "Last 10 topics", Not last 10 posts
Date Posted: 13 May 2006 at 1:05pm
|
Hi.
I am searching for "last 10 topics" mod. There are a lot of mod. of "last 10 posts" but I am not searching for this. How can I find this mod.?
|
Replies:
Posted By: gölge
Date Posted: 13 May 2006 at 11:30pm
|
here is the code:
gölge wrote:
%><table cellspacing="1" cellpadding="3" class="tableBorder" align="center"> <tr class="tableLedger"> <td colspan="7">Last Topics</td> </tr> <tr class="tableSubLedger"> <td width="2%" align="center"></td> <td width="30%" align="center">Forum</td> <td width="2%" align="center"></td> <td width="36%" align="center">Topic</td> <td width="10%" align="center">Sent by</td> <td width="10%" align="center">Reply</td> <td width="10%" align="center">Read</td> </tr>
<%
Dim siralama
strSql = "Select " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Topic.No_of_views, tbltopic.no_of_replies, tblAuthor.Author_ID, tblAuthor.Username " strSql = strSql & "From " & strDbTable & "Topic, " & strDbTable & "Forum, tblthread, tblAuthor Where " & strDbTable & "Topic.Hide = 0 And " & strDbTable & "Topic.Forum_ID = " & strDbTable & "Forum.Forum_ID AND tblthread.thread_ID =tblTopic.Last_Thread_ID AND tblAuthor.Author_ID =tblthread.Author_ID Order By " & strDbTable & "Topic.Topic_ID desc" rscommon.Open strSQL, adoCon For siralama= 1 to 10 if rscommon.Eof Then Exit For
Response.Write "<tr class=""tableRow""><td><img border=""1"" src=""" & strImagePath & "hot_topic_no_new_posts_icon.gif""/></td><td><a href=""forum_topics.asp?FID=" & rsCommon("Forum_ID") & """ title=""click for forum page"">" & rsCommon("Forum_name") & "</a></td><td><img style=""border:1px solid #000000;"" src=""" & strImagePath & "read_private_message.gif"" alt=""show message"" /></td><td><a href=""forum_posts.asp?TID=" & rsCommon("Topic_ID") & "&get=last#" & rsCommon("Last_Thread_ID") & """ title=""Topic"">" & rsCommon("Subject") & "</a></td><td align=""center""><a href=""member_profile.asp?PF=" & rsCommon("Author_ID") & """ title=""by"">" & rsCommon("username") & "</a></td><td align=""center"">" & rsCommon("no_of_replies") & "</td><td align=""center"">" & rsCommon("No_of_views") & "</td></tr>"
rsCommon.MoveNext Next rscommon.close end if %></table> |
|
Posted By: chapman_bryn
Date Posted: 15 May 2006 at 3:32am
|
Thanks for the code. For some reason after I have inserted the code in my page I get the error:
Error Type: Microsoft VBScript compilation (0x800A0400) Expected statement /original/Default.asp, line 866 end if
My code has been inserted in the default.asp page and looks as follows:
%><table cellspacing="1" cellpadding="3" class="tableBorder" align="center"> <tr class="tableLedger"> <td colspan="7">Last Topics</td> </tr> <tr class="tableSubLedger"> <td width="2%" align="center"></td> <td width="30%" align="center">Forum</td> <td width="2%" align="center"></td> <td width="36%" align="center">Topic</td> <td width="10%" align="center">Sent by</td> <td width="10%" align="center">Reply</td> <td width="10%" align="center">Read</td> </tr> <% Dim siralama strSql = "Select " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Topic.No_of_views, tbltopic.no_of_replies, tblAuthor.Author_ID, tblAuthor.Username " strSql = strSql & "From " & strDbTable & "Topic, " & strDbTable & "Forum, tblthread, tblAuthor Where " & strDbTable & "Topic.Hide = 0 And " & strDbTable & "Topic.Forum_ID = " & strDbTable & "Forum.Forum_ID AND tblthread.thread_ID =tblTopic.Last_Thread_ID AND tblAuthor.Author_ID =tblthread.Author_ID Order By " & strDbTable & "Topic.Topic_ID desc" rscommon.Open strSQL, adoCon For siralama= 1 to 10 if rscommon.Eof Then Exit For Response.Write "<tr class=""tableRow""><td><img border=""1"" src=""" & strImagePath & "hot_topic_no_new_posts_icon.gif""/></td><td><a href=""forum_topics.asp?FID=" & rsCommon("Forum_ID") & """ title=""click for forum page"">" & rsCommon("Forum_name") & "</a></td><td><img style=""border:1px solid #000000;"" src=""" & strImagePath & "read_private_message.gif"" alt=""show message"" /></td><td><a href=""forum_posts.asp?TID=" & rsCommon("Topic_ID") & "&get=last#" & rsCommon("Last_Thread_ID") & """ title=""Topic"">" & rsCommon("Subject") & "</a></td><td align=""center""><a href=""member_profile.asp?PF=" & rsCommon("Author_ID") & """ title=""by"">" & rsCommon("username") & "</a></td><td align=""center"">" & rsCommon("no_of_replies") & "</td><td align=""center"">" & rsCommon("No_of_views") & "</td></tr>" rsCommon.MoveNext Next rscommon.close end if %></table>
|
Posted By: gölge
Date Posted: 15 May 2006 at 10:29pm
|
sorry i forgot delete end if
delete the end if row at the end of the code it is ok.
Next rscommon.close end if 'delete this line %></table> |
|
Posted By: fatlad
Date Posted: 16 May 2006 at 11:10am
when trying this code http://www.bigalsplace.co.uk/badbrains/forum/testnew.asp - here I'm getting the following error:
Microsoft VBScript runtime error '800a01a8'
Object required
/badbrains/forum/testnew.asp, line 737 Any ideas? Cheers
Al
|
Posted By: fx5500
Date Posted: 16 May 2006 at 5:20pm
|
Its not workin on my page? I delete the "end if" , but its not workin.
|
Posted By: gölge
Date Posted: 16 May 2006 at 9:01pm
fatlad wrote:
when trying this code http://www.bigalsplace.co.uk/badbrains/forum/testnew.asp - here I'm getting the following error:
Microsoft VBScript runtime error '800a01a8'
Object required
/badbrains/forum/testnew.asp, line 737
Any ideas?
Cheers
Al
|
in line 383 cut this line:
Call closeDatabase()
and paste under the code that i gave...
like this:
Next rscommon.close Call closeDatabase() %></table> |
|
Posted By: fatlad
Date Posted: 17 May 2006 at 8:46am
superb!!
That works a treat! Many thanks and good karma to that man
|
Posted By: gölge
Date Posted: 17 May 2006 at 7:20pm
i dont believe karma my name is not earl ...
u r wellcome...
|
|