Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - latest 10 topics on main page
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

latest 10 topics on main page

 Post Reply Post Reply Page  <12345 6>
Author
hotice08 View Drop Down
Groupie
Groupie


Joined: 11 March 2008
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote hotice08 Quote  Post ReplyReply Direct Link To This Post Posted: 03 April 2008 at 2:05pm
It works on my forum..I mean it is currently only in testing url. Once I make some other changes I will move it to live one.
 
here is the url where I made it to work . Check it out. 
 
I have here 20 latest topics.
 
 
 
Back to Top
mattysdad View Drop Down
Groupie
Groupie


Joined: 24 February 2008
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattysdad Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2008 at 6:34pm
I just cant get it to work! CryCryCryCryCry
 
I dont know where to put the code or anything,CryCry
 
I'd love to be able to get it to appear on the right of the screen like you have!
 
But I just dont know how!
Back to Top
hotice08 View Drop Down
Groupie
Groupie


Joined: 11 March 2008
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote hotice08 Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2008 at 2:00pm
This is the Code that I have added and please Note I am using MySql. Here the limit on Number of Topics are 25. If you want to change it Please find "LIMIT 25" and change the number of Topics you want to . Hope this helps
 
 

Dim rsLatestPosts

Dim rsLatestPosts2

Dim strSql2
Dim LastLatestPostsDateTime
Dim LastLatestPostsDate
Dim LastLatestPostsTime

<tr>
<td bgcolor="#FFFFFF" >
<%
Set rsLatestPosts = Server.CreateObject("ADODB.Recordset")

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 "

strSql = strSql & "From " & strDbTable & "Topic, " & strDbTable & "Forum Where " & strDbTable & "Topic.Hide = False And " & strDbTable & "Topic.Forum_ID = " & strDbTable & "Forum.Forum_ID And " & strDbTable & "Topic.Forum_ID > 0 Order By " & strDbTable &"Topic.Last_Thread_ID desc " & "LIMIT 25"

rsLatestPosts.Open strSQL, adoCon
If rsLatestPosts.EOF Then
%>
<p style="text-align: center">There are no topics to display. </p>
<%
Else
%>
<p style="text-align: center" class="Main"><strong> Latest Topics !!! </strong> </p>
<%
Do while not rsLatestPosts.Eof

Set rsLatestPosts2 = Server.CreateObject("ADODB.Recordset")
strSql2 = "SELECT tblThread.Thread_ID, tblThread.Topic_ID, tblThread.Message_date, tblAuthor.Username, tblAuthor.Author_ID FROM (tblAuthor INNER JOIN tblThread ON tblAuthor.Author_ID = tblThread.Author_ID) WHERE tblThread.Hide = False And Topic_ID= " & rsLatestPosts("Topic_ID") & " order by Message_date desc"
rsLatestPosts2.Open strSql2, adoCon
LastLatestPostsDateTime = rsLatestPosts2("Message_date")
LastLatestPostsDate = DateFormat(LastLatestPostsDateTime)
LastLatestPostsTime = TimeFormat(LastLatestPostsDateTime)
intForumColourNumber = intForumColourNumber + 1
%>
<a class="Main" href="forum_posts.asp?TID=<%= rsLatestPosts("Topic_ID")%>&get=last=<%= rsLatestPosts("Last_Thread_ID")%>" title=""><%= rsLatestPosts("Subject") %></a>
<br>
<%
rsLatestPosts.MoveNext
loop
End If
%> </td>
</tr>



Edited by hotice08 - 07 April 2008 at 2:22pm
Back to Top
mattysdad View Drop Down
Groupie
Groupie


Joined: 24 February 2008
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattysdad Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2008 at 6:31pm
NopeConfused
 
It still does not work.
 
Where should I insert this code, in to which file?
 
Im putting it in the default.asp but it just keeps returning an internal server error.
 
Which line should I be adding this code, and where?
 
Im also using mysql.
 
Kindest thanks for your help.Smile
Back to Top
hotice08 View Drop Down
Groupie
Groupie


Joined: 11 March 2008
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote hotice08 Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2008 at 6:39pm

Modified File has been sent via PM. Check it and let me know if that works



Edited by hotice08 - 07 April 2008 at 6:45pm
Back to Top
mattysdad View Drop Down
Groupie
Groupie


Joined: 24 February 2008
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattysdad Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2008 at 4:09pm
sadly it still did not work.
 
I really am not very good at this, though I wish I was.
 
I need to know what to add, and where to add it!!
Back to Top
hotice08 View Drop Down
Groupie
Groupie


Joined: 11 March 2008
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote hotice08 Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2008 at 4:12pm
Originally posted by mattysdad mattysdad wrote:

sadly it still did not work.
 
I really am not very good at this, though I wish I was.
 
I need to know what to add, and where to add it!!
 
If it is ok  send me your Default.asp via email at charades08@yahoo.com
 
 
 
Back to Top
jonnyboy View Drop Down
Newbie
Newbie


Joined: 02 January 2004
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote jonnyboy Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2008 at 4:10pm
Is there a way to get the last 10 posts to come up in the forum stats bar as it used to do back in version 6 (I think)? It used to split the who's online bar in two with the latest posts showing in a separate table on the right of the box.
Back to Top
 Post Reply Post Reply Page  <12345 6>

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.