1

Topic: How to add multi colour forums? (Example inside)

Firstly, i'd like to say im very imprest with PunBB. Although its not the best forum system, its definatly the top of the list for what it does. It's simple, easy to customize.

Anyways, I installed it and made a custom skin/css. Everytime you post, I want the previous post to be light, then dark, light, then dark etc. Different colours for stickies and normal posts. For example;

Sticky (light green)
sticky (dark green)
sticky (light green)
sticky (dark green)
normal post (dark grey)
normal post (light grey
etc...

I hope you understand what you mean, just to give the forums more of a look... How/where do I do this.. NOT THE TEXT, THE BACKGROUND STRIP BEHIDE THE TEXT..

If you dont understand what I mean plz post, or give examples if you think you know what i mean and ill say yes thats it..

2

Re: How to add multi colour forums? (Example inside)

You will need to alter viewtopic.php. You can search on google for the php or ask Mr. Inman:

http://www.haveamint.com/forum/viewforum.php?id=4

3

Re: How to add multi colour forums? (Example inside)

Actually its viewforum.php you need to alter. Just put a counter on the loop that outputs the rows and then use the modulus operator to assign a class to the alternate rows. Sticky rows already have a class on them which is "isticky".

If you want to alternate the colour of posts in viewtopic then they already have classes rowodd and roweven assigned to alternate posts which can be used to set the background colours.

4

Re: How to add multi colour forums? (Example inside)

thanks, would you be so kind to tell me exactly how to do this.. im not the best at PHP and would like code for this counter. please? everything i need for this, i have done the CSS though:

isticky
isticky alt

5

Re: How to add multi colour forums? (Example inside)

please help, im having trouble doing this.. i need the code and where to edit plz?

thanks..

haveamint just deleted my topic on that :S

6

Re: How to add multi colour forums? (Example inside)

bump plz help!

7 (edited by shauninman 2006-05-19 16:46)

Re: How to add multi colour forums? (Example inside)

The Mint Troubleshooting Forum was not the right place:
http://www.shauninman.com/plete/2006/05 … s-in-punbb