New Posts New Posts RSS Feed - Update: Latest Topics (V1.04)
  FAQ FAQ  Forum Search   Register Register  Login Login

Topic ClosedUpdate: Latest Topics (V1.04)

 Post Reply Post Reply
Author
Matt View Drop Down
Admin Group
Admin Group


Joined: 07 Feb 2003
Location: Manchester, UK
Status: Offline
Points: 195
Direct Link To This Post Topic: Update: Latest Topics (V1.04)
    Posted: 21 Mar 2009 at 11:50am
I have updated Latest Topics to version 1.04.

This is simply to make it compatible with Web Wiz Forums V9.56a.

I have added support for the new SEO Links (for example: forum_posts.asp?TID=26152&title=mod-latest-topics-v104) on the topics and forum links.

For more information and to download the update please visit the Latest Topics page.
Back to Top
Human View Drop Down
Newbie
Newbie


Joined: 23 Mar 2009
Status: Offline
Points: 11
Direct Link To This Post Posted: 23 Mar 2009 at 2:21pm
How to add No_of_view
Back to Top
Matt View Drop Down
Admin Group
Admin Group


Joined: 07 Feb 2003
Location: Manchester, UK
Status: Offline
Points: 195
Direct Link To This Post Posted: 25 Mar 2009 at 3:15pm
This would be very easy to do.

Are you familiar with ASP and HTML?
Back to Top
Human View Drop Down
Newbie
Newbie


Joined: 23 Mar 2009
Status: Offline
Points: 11
Direct Link To This Post Posted: 26 Mar 2009 at 7:16am
I know html. Asp can be.


Edited by Human - 26 Mar 2009 at 7:20am
Back to Top
Matt View Drop Down
Admin Group
Admin Group


Joined: 07 Feb 2003
Location: Manchester, UK
Status: Offline
Points: 195
Direct Link To This Post Posted: 27 Mar 2009 at 6:32pm
Open up the 'includes/s2h_latest-topics.asp'. You would need to add the field name (I think it is no_of_views) to the SQL statement at the end of the Select part. You would need to then call it along with the others from the recordset array and then add a new column to the table to display the new field.

As I said, if you are familiar with ASP and HTML you should be able to achieve this relatively easily.
Back to Top
Human View Drop Down
Newbie
Newbie


Joined: 23 Mar 2009
Status: Offline
Points: 11
Direct Link To This Post Posted: 28 Mar 2009 at 8:25am
Let me try it thanks Scotty32
Back to Top
Human View Drop Down
Newbie
Newbie


Joined: 23 Mar 2009
Status: Offline
Points: 11
Direct Link To This Post Posted: 29 Mar 2009 at 8:14am
I've done in this manner
 
<%
Const TxtLpHeader = "Latest Posts"
Const TxtLpForum = "Forum"
Const TxtLpTopic = "Topic"
Const TxtLpAuthor = "Author"
Const TxtLpDate = "Date"
Const TxtLpViews = "Views"
%>

<%
Response.Write ("<table align=""center"" width=""98%"" class=""tableBorder"" cellspacing=""1"" cellpadding=""3"">" & _
vbCrLf & "<tr class=""tableLedger"">" & _
vbCrLf & "<td colspan=""5"">" & TxtLpHeader & "</td>" & _
vbCrLf & "</tr>" & _
vbCrLf & "<tr class=""tableSubLedger"">" & _
vbCrLf & "<td>" & TxtLpForum & "</td>" & _
vbCrLf & "<td>" & TxtLpTopic & "</td>" & _
vbCrLf & "<td>" & TxtLpAuthor & "</td>" & _
vbCrLf & "<td>" & TxtLpDate & "</td>" & _
vbCrLf & "<td>" & TxtLpViews & "</td>" & _
vbCrLf & "</tr>")
%>

<%
Dim rsLatestPosts
Dim intLimit
Dim rsLatestPosts2
Dim sql2
Dim LastLatestPostsDateTime
Dim LastLatestPostsDate
Dim LastLatestPostsTime

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 Order By " & strDbTable & "Topic.Last_Thread_ID desc"
rsLatestPosts.Open strSQL, adoCon

For intLimit = 1 to 10
if rsLatestPosts.Eof Then Exit For

Set rsLatestPosts2 = Server.CreateObject("ADODB.Recordset")
sql2 = "SELECT " & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Topic_ID, " & strDbTable & "Thread.Message_date, " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_ID FROM (" & strDbTable & "Author INNER JOIN " & strDbTable & "Thread ON " & strDbTable & "Author.Author_ID = " & strDbTable & "Thread.Author_ID) WHERE " & strDbTable & "Thread.Hide = False And Topic_ID= " & rsLatestPosts("Topic_ID") & " order by Message_date desc"
rsLatestPosts2.Open sql2, adoCon

if not rsLatestPosts2.EOF Then
 LastLatestPostsDateTime = rsLatestPosts2("Message_date")
 LastLatestPostsDate = DateFormat(LastLatestPostsDateTime)
 LastLatestPostsTime = TimeFormat(LastLatestPostsDateTime)

Response.Write ("<tr class=""tableRow"">" & _
vbCrLf & "<td><a href=""forum_topics.asp?FID=" & rsLatestPosts("Forum_ID") & strQsSID2 & """ title=""Click To View Forum"">" & rsLatestPosts("Forum_name") & "</a></td>" & _
vbCrLf & "<td><a href=""forum_posts.asp?TID=" & rsLatestPosts("Topic_ID") & strQsSID2 & """><a href=""forum_posts.asp?TID=" & rsLatestPosts("Topic_ID") & "&get=last#" & rsLatestPosts("Last_Thread_ID") & strQsSID2 &""" title=""Click To View Last Post"">" & rsLatestPosts("Subject") & "</a></td>" & _
vbCrLf & "<td>"&rsLatestPosts2("Username") &"</td>" & _                                                               
vbCrLf & "<td>" & LastLatestPostsDate & "-" & LastLatestPostsTime & "</td>" & _
vbCrLf & "<td>" & rsLatestPosts("No_of_views") & "</td></tr>")
end if

rsLatestPosts2.Close

rsLatestPosts.MoveNext
Next

rsLatestPosts.Close

Response.Write ("</table")
%>

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.