Cheers StarDust, that's great!
Scotty, cheers for offering to look into it. I've had it running on my forum for quite a while, but it's one of those things you never really check, and forget to check it works after a forum upgrade.
I'm running 9.60 and MS SQL Server.
If anyone requires it, this is the sitemap.asp code:
[code]<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd"><%
'
' ---------- About -------------------
' Google Sitemap Generator for Web Wiz Forums v9.x
' Tested with Web Wiz Forums v9.05
' Coded by: Shahadat Hossen
' Download: http://board.ebizbd.net
' Credits: Original Mod published by Murat Yavuz from http://www.mydesign.gen.tr for WWF v8.x
'
' Web Wiz Forum is an advanced forum system powered by Web Wiz Guide
' http://www.webwiz.net
'
'
' ---------- Instruction -------------
' Just upload this file into the forum directory
' Then type url [www.yoursite.com]/[forum-path]/sitemap.asp
' and save the xml file.
' You can upload this xml file to the root directory of your site.
'
Response.Buffer = True
Response.ContentType = "text/xml"
'On Error Resume Next
%>
<!--#include file="forum/common.asp"-->
<%
' ---------- Start Configuration --------
'
' Valid change frequency values: always, hourly, daily, weekly, monthly, yearly, never
Const txtCategoryChange = "weekly" 'Change frequency of category pages
Const dblCategoryPriority = "0.8" 'Priority of category pages
Const txtForumChange = "weekly" 'Change frequency of forums pages
Const dblForumPriority = "0.6" 'Priority of forum pages
Const txtTopicChange = "daily" 'Change frequency of topic pages
Const dblTopicPriority = "0.4" 'Priority of topic pages
'
' ---------- End Configuration ----------
'**********************************************
'*** Format ISO International Date/Time ****
'**********************************************
'Function to format the present date and time into international formats to prevent systems crashes on foriegn servers
Private Function isoDate(dtmDate)
Dim strYear
Dim strMonth
Dim strDay
Dim strHour
Dim strMinute
Dim strSecound
strYear = Year(dtmDate)
strMonth = Month(dtmDate)
strDay = Day(dtmDate)
'Place 0 infront of minutes under 10
If strMonth < 10 then strMonth = "0" & strMonth
If strDay < 10 then strDay = "0" & strDay
'This function returns the ISO internation date and time formats:- yyyy-mm-dd hh:mm:ss
'Dashes prevent systems that use periods etc. from crashing
isoDate = strYear & "-" & strMonth & "-" & strDay
End Function
Private Function printLastThreadDate(ByVal lngThread)
printLastThreadDate=""
strSQL = "SELECT " & strDbTable & "Thread.Message_Date FROM " & strDbTable & "Thread WHERE " & strDbTable & "Thread.Thread_ID = " & lngThread & " ;"
rsCommon.Open strSQL, adoCon
If Not rsCommon.Eof Then
printLastThreadDate=CDate(rsCommon.Fields("Message_Date").value)
printLastThreadDate=isoDate(printLastThreadDate)
End If
rsCommon.Close
End Function
'Declare variables
Dim intArrayPass
Dim intLoopX
Dim intLoopY
Dim arCategories '(0,intArrayPass): Category ID
Dim arForums '(0,intArrayPass): Forum ID; (1,intArrayPass): Category ID; (2,intArrayPass): Last Post Date
Dim arTopics
Dim rsCategory
Dim rsForums
Dim rsTopics
Dim dtmLastPostCategory
'------------------------
'List Forum Categories
'------------------------
strSQL = "SELECT " & strDbTable & "Category.Cat_ID FROM " & strDbTable & "Category ORDER BY " & strDbTable & "Category.Cat_order ASC ;"
rsCommon.Open strSQL, adoCon
If Not rsCommon.Eof Then arCategories = rsCommon.GetRows()
rsCommon.Close
'Debug
'If isArray(arCategories) Then Response.Write("OK")
'If isArray(arCategories) Then Response.Write(UBound(arCategories,2))
'For intArrayPass=0 to UBound(arCategories,2)
'Response.Write("0,0: " & arCategories(0,0) & "<br />")
'Response.Write("0,intArrayPass: " & arCategories(0,intArrayPass) & "<br />")
'Next
'------------------------
'List All Forums
'------------------------
strSQL = "SELECT " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Cat_ID, " & strDbTable & "Forum.Last_post_date FROM " & strDbTable & "Forum ORDER BY " & strDbTable & "Forum.Forum_Order ASC"
rsCommon.Open strSQL, adoCon
If Not rsCommon.Eof Then arForums = rsCommon.GetRows()
rsCommon.Close
'Debug
'For intArrayPass=0 to