Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Simple hack for alternating bg color in topic list
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

matsd
Starting Member

Sweden
26 Posts

Posted - 21 September 2002 :  18:59:37  Show Profile  Visit matsd's Homepage
Since you can have alternating colors for every other post in individual topics, it seemed as a good idea to have that for every other topic in the topic list as well. I've seen it done in some forums, but in what I suspect to be a regular mod and with hover effects and other stuff.

If you just want the alternating color feature you can try this:

Open your forum.asp in a text editor.
Find the code line:
	for iTopic = 0 to iTopicCount

Above this line add:
	CColor = strAltForumCellColor

and below this line add:
		if CColor = strAltForumCellColor then
			CColor = strForumCellColor
		else
			CColor = strAltForumCellColor
		end if

The section now looks like this:
	CColor = strAltForumCellColor

	for iTopic = 0 to iTopicCount

		if CColor = strAltForumCellColor then
			CColor = strForumCellColor
		else
			CColor = strAltForumCellColor
		end if


Then find all instances of:
strForumCellColor

BELOW this section and change them to:
CColor

There's at least one instance of strForumCellColor above this section, don't change that one!

Now the colors you assign to first and second alternating cell color for topics also aplies to the topic list.

I just want to stress that this might be done in a more elegant way and perhaps it's not a good thing to introduce the variable CColor without defining/dimensioning it, I don't know, since I don't have a clue about ASP programming. Use this hack on your own risk. I've tried it on my forum, running with an Access database, and it seems to work. I'm not sure if any sql code in there can make this hack non working. I'm quite sure some asp guru reading this will holler if he consider this hack to be bad programming.

You can look at it here:
http://www.dirtylobsters.com/forum3/forum.asp?FORUM_ID=1

Next step would be to implement this for the forum list in default.asp as well.

Mats D

Edited by - matsd on 22 September 2002 00:46:41

billbitsmart©
Starting Member

9 Posts

Posted - 23 September 2002 :  11:05:13  Show Profile
Nice one, thanks.
But shouldn't it be dimmed as well? (it is in topic.asp)

Forum.asp line 42:
Dim ArchiveView, CColor

greetz,
bill
Go to Top of Page

kwhipp
Junior Member

USA
407 Posts

Posted - 24 September 2002 :  15:23:10  Show Profile  Visit kwhipp's Homepage  Send kwhipp an AOL message  Send kwhipp an ICQ Message  Send kwhipp a Yahoo! Message
This is an excellent little MOD. I took the same logic and applied it to default.asp and default_group.asp.

Even if I do say so myself, it does look good.

Thanks!

- Kevin
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 24 September 2002 :  18:40:10  Show Profile  Visit richfed's Homepage
Can this be applied on version 3.3.05? If so, how?

Thanks!

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

german
Starting Member

23 Posts

Posted - 16 October 2002 :  16:49:41  Show Profile  Visit german's Homepage
works great. thanks!

www.deeko.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07