Change background color for each category

From PunBB Resource Wiki

Jump to: navigation, search

With this trick, you can change the background color (of the 1st line, here "discussions", "releases", "PunBB resource" and "Links") for each different category.

index.php

Find

<h2><span><?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></span></h2>

Replace with

<h2 id="idx<?php echo $cat_count ?>"><span><?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></span></h2>

import/yourstyle_cs.css

Find

.pun H2, #brdmenu {BACKGROUND-COLOR: #xxxxxx; COLOR: #xxxxxx}

(where xxxxxx are the bg-color and color of the board menu, and each categorie)

After, add

.pun H2#idx* {BACKGROUND-COLOR: #xxxxxx; COLOR: #xxxxxx}

where * is the number of the categorie you wanna change the color and xxxxxx the color code you want.


You have to add this line for each categorie you want to change the color of. If you don't know wich idx it is, just show the source page and search "idx", there will be the number after it.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox