Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Alternate colors for topic cells in forum.asp

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
texanman Posted - 14 April 2008 : 09:48:12
Can this be done just as in post.asp?
Any help is appreciated.<
14   L A T E S T    R E P L I E S    (Newest First)
Shaggy Posted - 21 April 2008 : 05:26:05
You're welcome

<
Andy Humm Posted - 21 April 2008 : 05:16:23
Perfick... Thank you as always..<
Shaggy 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 & """>" 
<
Andy Humm 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<
texanman 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.<
phy1729 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.<
AnonJr 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. <
texanman 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<
phy1729 Posted - 15 April 2008 : 07:03:57
In that case consistency of efficiency is the best choice.<
Shaggy 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

<
phy1729 Posted - 14 April 2008 : 18:56:26
For your second block you could use
intI=(intI+1) mod 2
to condense it.<
Shaggy Posted - 14 April 2008 : 12:13:06
You're welcome

<
texanman Posted - 14 April 2008 : 11:47:45
Shaggy:
You are the best. Thank you soooooooooo much.
It works very well. <
Shaggy 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
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07