Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Topic Border
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Border

 Post Reply Post Reply Page  123>
Author
suedechaser View Drop Down
Groupie
Groupie


Joined: 25 February 2006
Location: USA
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote suedechaser Quote  Post ReplyReply Direct Link To This Post Topic: Topic Border
    Posted: 26 September 2006 at 7:08am
Hi all,

Is it possible to put a border around just the first topic of a thread?

regards

suede
Back to Top
Hades View Drop Down
Newbie
Newbie


Joined: 17 January 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hades Quote  Post ReplyReply Direct Link To This Post Posted: 26 September 2006 at 5:46pm
An easy way to do that would be to add a condition like

  'Calculate the post number
intThreadNo = (intRecordPositionPageNum - 1) * intThreadsPerPage <= insert AFTER this line, or intThreadNo won't be defined..
 
If intRecordPositionPageNum = 1 Then
    <Include Border Code>
    [include the full code to display one message]
    <Include border code>
    intThreadNo = intThreadNo + 1
    [include the full Loop code here]
Else
    [include the complete original code here]
End If
What this does (or should do) is check wether it is the first page of your thread. If it's the case, it will write down the first message, add 1 to intThreadNo, then go on with the standard message layout. You have to add 1 to intThreadNo, because the loop normally starts at "0" and adds 1 at the beginning. You want it to start at 2..
 
 
Back to Top
suedechaser View Drop Down
Groupie
Groupie


Joined: 25 February 2006
Location: USA
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote suedechaser Quote  Post ReplyReply Direct Link To This Post Posted: 27 September 2006 at 1:30am
Hi Hades,

I understand what you are suggesting here.

I cannot work out where the different sections start and finish ie full code to display one message, full loop code and complete original code tht you indicated.

If you find a moment, could you please suggest where these lines may be in the code.

Thank you so far!

regards

suede

Back to Top
Hades View Drop Down
Newbie
Newbie


Joined: 17 January 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hades Quote  Post ReplyReply Direct Link To This Post Posted: 27 September 2006 at 11:07am
Right.. I took a clean version of WWF to do this, because mine has so many changes in it that the lines won't mean anything on yours..
 
Paste the following code between lines 731, below this code :
If intTotalRecords > 0 Then
And line 1006, above this code :
'Else display there are no posts to display so display error message
Else

 
This is the Mod :
 
Before using, do a "replace" with your editing program, to replace *QUOTE* by QUOTE and *CODE* by CODE , this is because WWF uses the Quote and code tag, messing up the code below[code]'*******************************************************************************
'************  Mod Add a border around the first post only..
'************  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;">
 <tr class="tableLedger">
  <td style="width:140px;" align="center"><% = strTxtAuthor %></td>
  <td align="center"><% = strTxtMessage %></td>
 </tr>
 <%
  '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 rowspan="<% = intPostRowsSpan %>" valign="top" class="<% = strPostTableSideClass %>">
   <a name="<% = lngMessageID %>"></a>
   <a href="member_profile.asp?PF=<% =lngUserID %>&FID=<% = intForumID & strQsSID2 %>"><% = strUsername %></a>
   <br /><% = strGroupName %>
   <br /><img src="<% If strRankCustomStars <> "" Then Response.Write(strRankCustomStars) Else Response.Write(strImagePath & intRankStars & "_star_rating.gif") %>" alt="<% = strGroupName %>"/>
   <br /><%

         'If the user has an avatar then display it
         If blnAvatar = True AND strAuthorAvatar <> "" Then Response.Write("<img src=""" & strAuthorAvatar & """ alt=""" & strTxtAvatar & """ class=""avatar"" onError=""this.src='avatars/blank_avatar.jpg';""/>")
         'If there is a title for this member then display it
         If strMemberTitle <> "" Then Response.Writ
Back to Top
suedechaser View Drop Down
Groupie
Groupie


Joined: 25 February 2006
Location: USA
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote suedechaser Quote  Post ReplyReply Direct Link To This Post Posted: 27 September 2006 at 8:10pm
Hi Hades,

This looks very nice. Thank you!

You have been very kind with your time so far. If I may ask another question, is there also a way to remove the Author column from just the first post so only the message shows?

regards

suede

Back to Top
Hades View Drop Down
Newbie
Newbie


Joined: 17 January 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hades Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2006 at 12:03pm
Hi!
This shouldnae be a problem.. You'll have to remove the first line of the table and paste it on the second one (the one with "Author" and "message")..
So.. cut these lines (~line 748) :

 <tr class="tableLedger">
  <td style="width:140px;" align="center"><% = strTxtAuthor %></td>
  <td align="center"><% = strTxtMessage %></td>
 </tr>
 
And paste it below the seond table code (the one for the rest of the messages).
 
Then remove these lines :
  <td rowspan="<% = intPostRowsSpan %>" valign="top" class="<% = strPostTableSideClass %>">
   <a name="<% = lngMessageID %>"></a>
   <a href="member_profile.asp?PF=<% =lngUserID %>&FID=<% = intForumID & strQsSID2 %>"><% = strUsername %></a>
   <br /><% = strGroupName %>
   <br /><img src="<% If strRankCustomStars <> "" Then Response.Write(strRankCustomStars) Else Response.Write(strImagePath & intRankStars & "_star_rating.gif") %>" alt="<% = strGroupName %>"/>
   <br /><%

         'If the user has an avatar then display it
         If blnAvatar = True AND strAuthorAvatar <> "" Then Response.Write("<img src=""" & strAuthorAvatar & """ alt=""" & strTxtAvatar & """ class=""avatar"" onError=""this.src='avatars/blank_avatar.jpg';""/>")
         'If there is a title for this member then display it
         If strMemberTitle <> "" Then Response.Write(vbCrLf & "   <br />" & strMemberTitle)
         'If not a guest post then display some details
         If lngUserID <> 2 Then
           'Show the joined date
           Response.Write(vbCrLf & "   <br /><br />" & strTxtJoined & ": " & DateFormat(dtmAuthorRegistration))
           'If the is a location display it
           If strAuthorLocation <> "" Then Response.Write(vbCrLf & "   <br />" & strTxtLocation & ": " & strAuthorLocation)

   'If active users is enabled see if the user is online
   If blnActiveUsers Then
    'Display if the user is online
    blnIsUserOnline = False
    'Loop through the active users array
    For intLoop = 1 To UBound(saryActiveUsers, 2)
     If saryActiveUsers(1, intLoop) = lngUserID Then blnIsUserOnline = True
    Next
    'Display if the user is online
    If blnIsUserOnline Then Response.Write(vbCrLf & "   <br />" & strTxtOnlineStatus & ": " & strTxtOnLine2) Else Response.Write(vbCrLf & "      <br />" & strTxtOnlineStatus & ": " & strTxtOffLine)
   End If

           'Display the num of posts
           Response.Write(vbCrLf & "   <br />" & strTxtPosts & ": " & lngAuthorNumOfPosts)
  End If
%>
   <br />
  </td>
(Still on the first part of the mod)
and change "<td colspan="2">" to "<td>" on what should now be around line 951..
 
Cheers..


Edited by Hades - 28 September 2006 at 12:05pm
Back to Top
suedechaser View Drop Down
Groupie
Groupie


Joined: 25 February 2006
Location: USA
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote suedechaser Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2006 at 1:46pm
Sorry Hades, I'm a little confused by :

...And paste it below the second table code (the one for the rest of the messages).

At what line number do I find the second table code you are referring to?

regards

suede
Back to Top
Hades View Drop Down
Newbie
Newbie


Joined: 17 January 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hades Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2006 at 2:38pm
Search for this line
<table class="tableBorder" align="center" cellspacing="1" cellpadding="3" style="table-layout: fixed;">
the first one is the one on line 748, where you have to cut the code. The second one you'll find isn't followed by code for cells (<tr>etc...). That's where you paste it.
Back to Top
 Post Reply Post Reply Page  123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.