Ok.. this is the modified version. Again, change *CODE* to CODE and *QUOTE* to QUOTE
[code]'*******************************************************************************
'************ Mod Add a border around the first post only..
'************ 1st post without author
'************ Mod by Hades, 2006
'*******************************************************************************
'Calculate the post number
intThreadNo = (intRecordPositionPageNum - 1) * intThreadsPerPage
If intRecordPositionPageNum = 1 Then
'Calculate the thread number
intThreadNo = intThreadNo + 1
' This is the *CODE* for the first post of a thread. If you want a border,
' add *CODE* somewhere around here
%>
<table class="tableBorder" align="center" cellspacing="1" cellpadding="3" style="table-layout: fixed;">
<%
'SQL Query Array Look Up table
'0 = tblThread.Thread_ID,
'1 = tblThread.Message,
'2 = tblThread.Message_date,
'3 = tblThread.Show_signature,
'4 = tblThread.IP_addr,
'5 = tblThread.Hide,
'6 = tblAuthor.Author_ID,
'7 = tblAuthor.Username,
'8 = tblAuthor.Homepage,
'9 = tblAuthor.Location,
'10 = tblAuthor.No_of_posts,
'11 = tblAuthor.Join_date,
'12 = tblAuthor.Signature,
'13 = tblAuthor.Active,
'14 = tblAuthor.Avatar,
'15 = tblAuthor.Avatar_title,
'16 = tblGroup.Name,
'17 = tblGroup.Stars,
'18 = tblGroup.Custom_stars
'19 = tblGuestName.Name
'Read in threads details for the topic from the database
lngMessageID = CLng(sarryPosts(0,intCurrentRecord))
strMessage = sarryPosts(1,intCurrentRecord)
dtmPostDate = CDate(sarryPosts(2,intCurrentRecord))
strAuthorIP = sarryPosts(4,intCurrentRecord)
blnHidePost = CBool(sarryPosts(5,intCurrentRecord))
lngUserID = CLng(sarryPosts(6,intCurrentRecord))
strUsername = sarryPosts(7,intCurrentRecord)
strAuthorHomepage = sarryPosts(8,intCurrentRecord)
strAuthorLocation = sarryPosts(9,intCurrentRecord)
lngAuthorNumOfPosts = CLng(sarryPosts(10,intCurrentRecord))
dtmAuthorRegistration = CDate(sarryPosts(11,intCurrentRecord))
strAuthorSignature = sarryPosts(12,intCurrentRecord)
strAuthorAvatar = sarryPosts(14,intCurrentRecord)
strMemberTitle = sarryPosts(15,intCurrentRecord)
strGroupName = sarryPosts(16,intCurrentRecord)
intRankStars = CInt(sarryPosts(17,intCurrentRecord))
strRankCustomStars = sarryPosts(18,intCurrentRecord)
strGuestUsername = sarryPosts(19,intCurrentRecord)
'Calculate the row colour
If intCurrentRecord MOD 2 = 0 Then
strPostTableRowClass = "msgEvenTableRow"
strPostTableSideClass = "msgEvenTableSide"
Else
strPostTableRowClass = "msgOddTableRow"
strPostTableSideClass = "msgOddTableSide"
End If
'If this is a hidden post then change the row colour to highlight it
If blnHidePost Then strPostTableRowClass = "msgHiddenTableRow"
'If the poster is a guest see if they have entered their name in the GuestName table and get it
If lngUserID = 2 AND strGuestUsername <> "" Then strUsername = strGuestUsername
'If the post contains a *QUOTE* or *CODE* block then format it
If InStr(1, strMessage, "[*QUOTE*=", 1) > 0 AND InStr(1, strMessage, "[/*QUOTE*]", 1) > 0 Then strMessage = formatUser*QUOTE*(strMessage)
If InStr(1, strMessage, "[*QUOTE*]", 1) > 0 AND InStr(1, strMessage, "[/*QUOTE*]", 1) > 0 Then strMessage = format*QUOTE*(strMessage)
If InStr(1, strMessage, "[*CODE*]", 1) > 0 AND InStr(1, strMessage, "[/*CODE*]", 1) > 0 Then strMessage = format*CODE*(strMessage)
'If the post contains a flash link then format it
If blnFlashFiles Then
If InStr(1, strMessage, "[FLASH", 1) > 0 AND InStr(1, strMessage, "[/FLASH]", 1) > 0 Then strMessage = formatFlash(strMessage)
If InStr(1, strAuthorSignature, "[FLASH", 1) > 0 AND InStr(1, strAuthorSignature, "[/FLASH]", 1) > 0 Then strAuthorSignature = formatFlash(strAuthorSignature)
End If
'If the message has been edited parse the 'edited by' XML into HTML for the post
If InStr(1, strMessage, "<edited>", 1) Then strMessage = editedXMLParser(strMessage)
'Call the function to highlight search words if coming froma search page
If strSearchKeywords <> "" Then strMessage = searchHighlighter(strMessage, sarySearchWord)
'Calulate rowspan amount for table below side bar
If CBool(sarryPosts(3,intCurrentRecord)) AND strAuthorSignature <> "" Then
intPostRowsSpan = 4
Else
intPostRowsSpan = 3
End If
'If we are showing ads increase by 1
If intCurrentRecord = 0 AND blnL*CODE* Then intPostRowsSpan = intPostRowsSpan + 1
%>
<tr>
<td valign="top" class="<% = strPostTableRowClass %>"><%
'If the topic is not locked put in a link for someone to *QUOTE* this message
If blnTopicLocked = False AND blnPollNoReply = False AND blnHidePost = False Then Response.Write("<span style=""float:right""><a href=""new_reply_form.asp?M=Q&PID=" & lngMessageID & "&PN=" & intTotalRecordsPages & "&TR=" & intTotalRecords & strQsSID2 & """><img src=""" & strImagePath & "*QUOTE*_icon.gif"" align=""absmiddle"" border=""0"" alt=""" & strTxt*QUOTE* & " " & strUsername & """/></a> <a href=""new_reply_form.asp?PID=" & lngMessageID & "&PN=" & intTotalRecordsPages & "&TR=" & intTotalRecords & strQsSID2 & """><img src=""" & strImagePath & "reply.gif"" align=""absmiddle"" border=""0"" alt=""" & strTxtReply & """/></a></span>")
'Display direct link to post
Response.Write("<a href=""forum_posts.asp?TID=" & lngTopicID & "&PID=" & lngMessageID & strQsSID2 & "#" & lngMessageID & """ alt=""" & strTxtDirectLinkToThisPost & """><img src=""" & strImagePath & "bullet.gif"" border=""0"" align=""absmiddle"" alt=""bullet""/></a> ")
'If first record display topic title
If intCurrentRecord = 0 Then
Response.Write("<strong>")
'If a calendar event then display so
If isDate(dtmEventDate) Then Response.Write(strTxtCalendarEvent & ": ") Else Response.Write(strTxtTopic & ": ")
Response.Write(strSubject & "</strong><br /> &