| Author |
Topic Search Topic Options
|
hotice08
Groupie
Joined: 11 March 2008
Status: Offline
Points: 62
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
mattysdad
Groupie
Joined: 24 February 2008
Status: Offline
Points: 47
|
Post Options
Thanks(0)
Quote Reply
Posted: 05 April 2008 at 6:34pm |
I just cant get it to work!    
I dont know where to put the code or anything,  
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!
|
 |
hotice08
Groupie
Joined: 11 March 2008
Status: Offline
Points: 62
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
mattysdad
Groupie
Joined: 24 February 2008
Status: Offline
Points: 47
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 April 2008 at 6:31pm |
Nope
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. 
|
 |
hotice08
Groupie
Joined: 11 March 2008
Status: Offline
Points: 62
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
mattysdad
Groupie
Joined: 24 February 2008
Status: Offline
Points: 47
|
Post Options
Thanks(0)
Quote Reply
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!!
|
 |
hotice08
Groupie
Joined: 11 March 2008
Status: Offline
Points: 62
|
Post Options
Thanks(0)
Quote Reply
Posted: 08 April 2008 at 4:12pm |
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!! |
|
 |
jonnyboy
Newbie
Joined: 02 January 2004
Status: Offline
Points: 38
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |