Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Mod req: "Last 10 topics", Not last 10 posts
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Mod req: "Last 10 topics", Not last 10 posts

 Post Reply Post Reply Page  12>
Author
fx5500 View Drop Down
Groupie
Groupie
Avatar

Joined: 30 July 2005
Location: Turkey
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote fx5500 Quote  Post ReplyReply Direct Link To This Post Topic: Mod req: "Last 10 topics", Not last 10 posts
    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.?
Back to Top
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2006 at 11:30pm
here  is the code:
 
Originally posted by gölge 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>
Back to Top
chapman_bryn View Drop Down
Newbie
Newbie


Joined: 24 April 2006
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote chapman_bryn Quote  Post ReplyReply Direct Link To This Post 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>
Back to Top
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post 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.
 
Quote
Next
rscommon.close
end if  'delete this line
%></table>
Back to Top
fatlad View Drop Down
Newbie
Newbie


Joined: 16 May 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote fatlad Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2006 at 11:10am
when trying this code here I'm getting the following error:

Microsoft VBScript runtime error '800a01a8'

Object required

/badbrains/forum/testnew.asp, line 737

Any ideas?

Cheers

Al

 
Back to Top
fx5500 View Drop Down
Groupie
Groupie
Avatar

Joined: 30 July 2005
Location: Turkey
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote fx5500 Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2006 at 5:20pm

Its not workin on my page? I delete the "end if" , but its not workin.

Back to Top
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2006 at 9:01pm
Originally posted by fatlad fatlad wrote:

when trying this code 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:
 
Quote Next
rscommon.close
Call closeDatabase()
%></table>


Edited by gölge - 16 May 2006 at 9:02pm
Back to Top
fatlad View Drop Down
Newbie
Newbie


Joined: 16 May 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote fatlad Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2006 at 8:46am
superb!!Clap

That works a treat! Many thanks and good karma to that manBig smile
Back to Top
 Post Reply Post Reply Page  12>

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.