Author |
Topic  |
wii
Free ASP Hosts Moderator
    
Denmark
2632 Posts |
Posted - 14 March 2003 : 03:04:10
|
dayve, I rather keep the forum private, but I can see the same in your forum:
here´s an example:
213 of 595 Members have made 34729 posts in 13 forums, with the last post on 14 Mar 2003 08:34:47 by: wii.
There´s an extra lineshift after on
it should show like this:
213 of 595 Members have made 34729 posts in 13 forums, with the last post on 14 Mar 2003 08:34:47 by: wii. |
 |
|
Image
Average Member
  
Canada
574 Posts |
Posted - 14 March 2003 : 19:05:56
|
quote: Originally posted by dayve
Image, that is a little redudant, David showed where the optimal placement for the code was in his previous post.
I don't think it is redundant because if I apply only to ForumLastPostReplyID then the 16 chrs won't apply to ForumLastPostTopicID, but with the change I posted both the topic and the reply will limit to 16 chrs. |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 14 March 2003 : 19:14:37
|
quote: Originally posted by OneWayMule
It doesn't work when there are no replies. You could use this:
Function DoLastPostLink(showicon)
if len(ForumTopicSubject) > 35 then
ForumTopicSubject = left(ForumTopicSubject,35) & "..."
end if
if ForumLastPostReplyID <> 0 then
PageLink = "whichpage=-1&"
AnchorLink = "&REPLY_ID="
DoLastPostLink = "<br><a href=""topic.asp?" & PageLink & "TOPIC_ID=" & ForumLastPostTopicID & AnchorLink & ForumLastPostReplyID & """>"
if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""absmiddle""") & " <i>" & ForumTopicSubject & "</i></a><br>"
elseif ForumLastPostTopicID <> 0 then
DoLastPostLink = "<br><a href=""topic.asp?TOPIC_ID=" & ForumLastPostTopicID & """>"
if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""absmiddle""") & " <i>" & ForumTopicSubject & "</i></a><br>"
else
DoLastPostLink = ""
end if
end function
^^^^^
Image, your coding is redundant, but I was more referring to the fact that OneWayMule already pointed out this issue. As you can see it is resolved in less lines of code as well (above code). |
|
Edited by - dayve on 14 March 2003 19:15:24 |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 14 March 2003 : 19:17:10
|
quote: Originally posted by wii
dayve, I rather keep the forum private, but I can see the same in your forum:
here´s an example:
213 of 595 Members have made 34729 posts in 13 forums, with the last post on 14 Mar 2003 08:34:47 by: wii.
There´s an extra lineshift after on
it should show like this:
213 of 595 Members have made 34729 posts in 13 forums, with the last post on 14 Mar 2003 08:34:47 by: wii.
that's weird, because this code should have nothing to do with the statistics area. I will take a closer look. |
|
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 14 March 2003 : 19:27:16
|
The last poster info shown in the statistics area is retrieved while the category/forum tables are being built, so if you are modifying that info there, it will be modified in the statistics area also. |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 14 March 2003 : 22:50:54
|
quote: Originally posted by RichardKinser
The last poster info shown in the statistics area is retrieved while the category/forum tables are being built, so if you are modifying that info there, it will be modified in the statistics area also.
ahhh, you Sneaky Snitzers!!!
okay, this will fix it
replacement code:
Function DoLastPostLink(showicon)
if len(ForumTopicSubject) > 35 then
ForumTopicSubject = left(ForumTopicSubject,35) & "..."
end if
if ForumLastPostReplyID <> 0 then
PageLink = "whichpage=-1&"
AnchorLink = "&REPLY_ID="
DoLastPostLink = "<a href=""topic.asp?" & PageLink & "TOPIC_ID=" & ForumLastPostTopicID & AnchorLink & ForumLastPostReplyID & """>"
if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""middle""") & " <font color='orange'>" & ForumTopicSubject & "</font></a><br>"
elseif ForumLastPostTopicID <> 0 then
DoLastPostLink = "<a href=""topic.asp?TOPIC_ID=" & ForumLastPostTopicID & """>"
if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""middle""") & " <font color='orange'>" & ForumTopicSubject & "</font></a><br>"
else
DoLastPostLink = ""
end if
end function
then find this line:
if strJumpLastPost = "1" then strLastUser = strLastUser & " " & DoLastPostLink(true)
and change it to this:
if strJumpLastPost = "1" then strLastUser = strLastUser & " <br />" & DoLastPostLink(true) |
|
Edited by - dayve on 14 March 2003 23:58:53 |
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 14 March 2003 : 22:51:47
|
sneaky, yes, but it does reduce the hits to the database by doing it that way... |
 |
|
PeeWee.Inc
Senior Member
   
United Kingdom
1893 Posts |
Posted - 15 March 2003 : 04:40:47
|
It's fixed it on your forum dayve so, thats a good sign  |
De Priofundus Calmo Ad Te Damine |
 |
|
wii
Free ASP Hosts Moderator
    
Denmark
2632 Posts |
Posted - 15 March 2003 : 06:28:35
|
Yeah, just one thing:
<font color='orange'>
how do I change it to default link color? |
 |
|
PeeWee.Inc
Senior Member
   
United Kingdom
1893 Posts |
Posted - 15 March 2003 : 06:36:37
|
Use strLinkColor
Response.Write "<font color=""" & strLinkColor & """>" & vbNewline & _
|
De Priofundus Calmo Ad Te Damine |
Edited by - PeeWee.Inc on 15 March 2003 06:47:23 |
 |
|
wii
Free ASP Hosts Moderator
    
Denmark
2632 Posts |
Posted - 15 March 2003 : 06:49:17
|
Hmm, that will mess it up, how should the line look exactly? |
 |
|
PeeWee.Inc
Senior Member
   
United Kingdom
1893 Posts |
Posted - 15 March 2003 : 06:52:42
|
I am not sure where the code is you are looking to edit. Can you post the code? (about 20 lines of code that are around it) |
De Priofundus Calmo Ad Te Damine |
 |
|
wii
Free ASP Hosts Moderator
    
Denmark
2632 Posts |
Posted - 15 March 2003 : 06:55:46
|
Function DoLastPostLink(showicon) if len(ForumTopicSubject) > 35 then ForumTopicSubject = left(ForumTopicSubject,35) & "..." end if if ForumLastPostReplyID <> 0 then PageLink = "whichpage=-1&" AnchorLink = "&REPLY_ID=" DoLastPostLink = "<a href=""topic.asp?" & PageLink & "TOPIC_ID=" & ForumLastPostTopicID & AnchorLink & ForumLastPostReplyID & """>" if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""middle""") & " <font color='orange'>" & ForumTopicSubject & "</font></a><br>" elseif ForumLastPostTopicID <> 0 then DoLastPostLink = "<a href=""topic.asp?TOPIC_ID=" & ForumLastPostTopicID & """>" if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""middle""") & " <font color='orange'>" & ForumTopicSubject & "</font></a><br>" else DoLastPostLink = "" end if end function |
 |
|
PeeWee.Inc
Senior Member
   
United Kingdom
1893 Posts |
Posted - 15 March 2003 : 06:59:25
|
Function DoLastPostLink(showicon)
if len(ForumTopicSubject) > 35 then
ForumTopicSubject = left(ForumTopicSubject,35) & "..."
end if
if ForumLastPostReplyID <> 0 then
PageLink = "whichpage=-1&"
AnchorLink = "&REPLY_ID="
DoLastPostLink = "<a href=""topic.asp?" & PageLink & "TOPIC_ID=" & ForumLastPostTopicID & AnchorLink & ForumLastPostReplyID & """>"
if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""middle""") & " <font color=""" & strLinkColor & """>" & ForumTopicSubject & "</font></a><br>"
elseif ForumLastPostTopicID <> 0 then
DoLastPostLink = "<a href=""topic.asp?TOPIC_ID=" & ForumLastPostTopicID & """>"
if (showicon = true) then DoLastPostLink = DoLastPostLink & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""middle""") & " <font color=""" & strLinkColor & """>" & ForumTopicSubject & "</font></a><br>"
else
DoLastPostLink = ""
end if
end function
It should work. |
De Priofundus Calmo Ad Te Damine |
Edited by - PeeWee.Inc on 15 March 2003 07:06:18 |
 |
|
wii
Free ASP Hosts Moderator
    
Denmark
2632 Posts |
Posted - 15 March 2003 : 07:04:11
|
Thanks... |
 |
|
Topic  |
|