Actually, I managed to hack something together for the first part of my question above. It's a painful UNION ALL statement. The SELECT statement on 407 (??) of forum_topics needs to be changed toL
strSQL = "SELECT " & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Author_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Author.Username, " & strDbTable & "GuestName.Name "
strSQL = strSQL & "FROM " & strDbTable & "Author, " & strDbTable & "Thread, " & strDbTable & "GuestName "
strSQL = strSQL & "WHERE " & strDbTable & "Author.Author_ID = " & strDbTable & "Thread.Author_ID AND "& strDbTable & "GuestName.Thread_ID = " & strDbTable & "Thread.Thread_ID AND " & strDbTable & "Thread.Topic_ID = " & lngTopicID & " "
strSQL = strSQL & "UNION ALL "
strSQL = strSQL & "SELECT " & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Author_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Author.Username, NULL "
strSQL = strSQL & "FROM " & strDbTable & "Author, " & strDbTable & "Thread "
strSQL = strSQL & "WHERE " & strDbTable & "Author.Author_ID = " & strDbTable & "Thread.Author_ID AND "& strDbTable & "Thread.Topic_ID = " & lngTopicID & " AND " & strDbTable & "Thread.Thread_ID NOT IN (SELECT thread_id from " & strDbTable & "GuestName) "
strSQL = strSQL & "ORDER BY " & strDbTable & "Thread.Message_date ASC;"
then this line:
strTopicStartUsername = rsTopic("Username")
needs to be changed to
If rsTopic("Username") = "Guests" Then
strTopicStartUsername = rsTopic("Name")
Else
strTopicStartUsername = rsTopic("Username")
End If
Same for
strLastEntryUsername= rsTopic("Username")
which becomes
If rsTopic("Username") = "Guests" Then
strLastEntryUsername= rsTopic("Name")
Else
strLastEntryUsername= rsTopic("Username")
End If
There are still a few more places that I'd like to fix it, such as on the 'Last Post' section on the main screen, and down the bottom (ie "The Newest Forum Member is Guests ")
Of course, if there is already a mod, it could save me a couple of hours... :)
RC