Author |
Topic |
|
texanman
Junior Member
United States
410 Posts |
Posted - 14 April 2008 : 09:48:12
|
Can this be done just as in post.asp? Any help is appreciated.< |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 14 April 2008 : 10:48:05
|
Find the following on line 440 and add the code in green:else
intI = 0
tT_STATUS = 0
tCAT_ID = 1
tFORUM_ID = 2 Find the following on line 480 and add the code in green: end if
if intI = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""middle""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>" Change the occurrences of strForumCellColor on lines 487, 535, 543, 544, 545, 552 & 554 to CColor.
Find the following on line 568 and add the code in green: rec = rec + 1
intI = intI + 1
if intI = 2 then
intI = 0
end if
next < |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
texanman
Junior Member
United States
410 Posts |
Posted - 14 April 2008 : 11:47:45
|
Shaggy: You are the best. Thank you soooooooooo much. It works very well. < |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 14 April 2008 : 12:13:06
|
You're welcome
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 14 April 2008 : 18:56:26
|
For your second block you could use intI=(intI+1) mod 2 to condense it.< |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 April 2008 : 04:24:04
|
Oh, there's many other ways to achieve this, some, such as your suggestion, more efficient than what I posted but, for the sake of consistency, I provided code that was already in use on other pages
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 15 April 2008 : 07:03:57
|
In that case consistency of efficiency is the best choice.< |
|
|
texanman
Junior Member
United States
410 Posts |
Posted - 15 April 2008 : 15:26:28
|
quote: Originally posted by phy1729
For your second block you could use intI=(intI+1) mod 2 to condense it.
phy1729:
Can you elaborate what you mean? Thanks< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 15 April 2008 : 16:55:32
|
He's talking about using modulus division. I tend to use a similar (but not quite the same ) technique when doing this sort of thing in my work. While he's right that that approach is more elegant and probably more efficient, IMHO it probably won't make a noticeable difference.
Ask 10 programmers how to do something and you'll often get 20 different options at minimum. < |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 15 April 2008 : 17:27:57
|
As AnonJr said it's a diffrent way to do the same thing +1 adds one and %2 divides by two and takes the remainder.
My personal favorite way to do this is i=i?0:1 which mean is i is true (1) i=0 else (0) i=1 Unfortunately that approach doesn't work in ASP.< |
|
|
texanman
Junior Member
United States
410 Posts |
Posted - 15 April 2008 : 18:02:23
|
quote: Originally posted by AnonJr
Ask 10 programmers how to do something and you'll often get 20 different options at minimum.
Ah!! Programers are far better than Economists then. 50 economists will give you 50 different answers to the same question.
Have you heard about the old professor of Macroeconomics who year after year gave the same exam. Only the answer changed year after year!
Thanks for the explanation.< |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 20 April 2008 : 07:42:30
|
Cool tweak,,, installed and all works satisfactorily.. I have observed with the alternate colour cell (strAltForumCellColor) if the number of post causes the thread to pagenate, the page links background colour remains as the original colour (strForumCellColor) see image below. However if the original cell background has additional pages it stays as the same colour ie both strForumCellColor. I am sure a genius will provide a simple solution..
kindest regards andy< |
Edited by - Andy Humm on 20 April 2008 08:16:12 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 21 April 2008 : 05:07:18
|
Find the following on line 792 of forum.asp (may be a couple of lines further down if you've already applied the changes above) and change the strForumCellColor to CColor or just delete the bgcolor attribute completely:ref = " <td align=""right"" valign=""bottom"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" < |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 21 April 2008 : 05:16:23
|
Perfick... Thank you as always..< |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 21 April 2008 : 05:26:05
|
You're welcome
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
|
Topic |
|