MyBB Community Forums

Full Version: Changing the default "row1", "row2" layout...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently trying to edit my theme. I'm not a huge fan of how MyBB is layed out with alternative rows, I'd actually like to be able to theme my board via alternating columns (at least on the index page).

What I mean by this is on the index page, "Forum" would be one color, and "Threads" would be a different color. "Posts" would be the same color as "Forum", and "Last Post" would be the same color as "Threads".

I was looking to edit the template to fix this, but I got very confused by something in there.

I went to Templates, then went to "Forum Bit Templates". Finally I ended up in "forumbit_depth1_forum"...I assume that and "forumbit_depth2_forum" are what I'd want to edit to do so.

So I went to edit the classes on the different <td>'s, and I found this:

Quote:<td class="$bgcolor" valign="top" align="center" nowrap="nowrap">$threads</td>

What in the world is the $bgcolor there for? Anyway, if someone could help me out with how I'd edit the templates to do what I'm wanting to, I'd really appreciate it.

I really need some help.
I just noticed that this is a great example:

http://forum.teamxbox.com/

Notice how every row is the exact same but the columns are different colors?
I'm not really sure how you'd do it globally. You can see on my mybb that I've got it how you mean, but I had to give both alt1 and alt2 the same background and then go through all the templates giving every other column the slightly lighter background with a style="background:#hex url(images/bg.gif);" in the appropriate <td> tags. An inline style tag will always override what's in the css file.

It took a while, but since the modification to my template was so heavy (don't think I left a single one untouched) I just did it as I went along.
I think the alternating row colors is hard coded into the file. So for starters make row1 and row2 on the theme modification page have the same background. That'll get rid of the alernating rows. Then you need to go into the templates and for each <td> in the proper template do alternating col1 col2. Then go into the theme editing page again and go down to the bottom and add the custom css for col1 and col2 so they have their own colors.

Sorry for the really simple explanation. If you can't figure it out still let me know and I'll write up something more detailed.