Alternating Background ROWS
===========================
This MOD changes the default grey/white background to messages, in Flat List View, Threaded List 
View & Threaded Message View.

With grateful thanks & acknowledgement to Maurice Makaay, for his help with certain coding issues 
I had in the development of this.

This was tested on Phorum 5.1.20 with MSIE 7.0 & Mozilla Firefox 2.0.0.3, using the Default 
Template, so as such, I cannot guarantee it's results on lower versions on Phorum, or other 
Browsers.  If you use a different Template set, adjust your template files accordingly.  I would 
suggest you make a complete back-up of your Forum Files & Database, prior to attempting this 
Installation.

As yet, I have not been able to configure the Forum Index list to alternate in colours, this is 
going to be the next item on the To-do List, but as for the moment, it is complete, as is.

NOTE: I have tested this in Flat View, Threaded View, as well as logged in as Admin, Mod, User, 
& as a Guest, & I cannot find any Bugs/Issues with it.  My Test Forum is only small, so I am 
limited on what issues I can correctly identify.  If anyone would like to test this for 
compatibility on other Browsers/Phorum Versions, etc, then let me know your results.




To install, just follow these detailed instructions.

1) Edit the css.tpl file.
   (e.g. - http://www.yourdomainname.com/phorum/templates/default/css.tpl)

Look for this

    .PhorumTableRow
    {
        background-color: {backcolor};
        border-bottom-style: solid;
        border-bottom-color: {listlinecolor};

Insert these 4 classes before it.

    .PhorumMessageRow
    {
        background-color: {backmessagecolor};
        border-bottom-style: solid;
        border-bottom-color: {listlinecolor};
        border-bottom-width: 0px;
        color: {defaulttextcolor};
        font-size: {defaultfontsize};
        font-family: {defaultfont};
        height: 15px;
        margin: 0;
        padding: 0 0 0 5px;
    }

    .PhorumMessageRowAlt
    {
        background-color: {altbackmessagecolor};
        border-bottom-style: solid;
        border-bottom-color: {listlinecolor};
        border-bottom-width: 0px;
        color: {defaulttextcolor};
        font-size: {defaultfontsize};
        font-family: {defaultfont};
        height: 15px;
        margin: 0;
        padding: 0 0 0 5px;
    }

    .PhorumThreadRow
    {
        background-color: {backthreadcolor};
        border-bottom-style: solid;
        border-bottom-color: {listlinecolor};
        border-bottom-width: 0px;
        color: {defaulttextcolor};
        font-size: {defaultfontsize};
        font-family: {defaultfont};
        height: 15px;
        margin: 0;
        padding: 0 0 0 5px;
    }

    .PhorumThreadRowAlt
    {
        background-color: {altbackthreadcolor};
        border-bottom-style: solid;
        border-bottom-color: {listlinecolor};
        border-bottom-width: 0px;
        color: {defaulttextcolor};
        font-size: {defaultfontsize};
        font-family: {defaultfont};
        height: 15px;
        margin: 0;
        padding: 0 0 0 5px;
    }




2) Edit the settings.tpl file.
   (e.g. - http://www.yourdomainname.com/phorum/templates/default/settings.tpl)

Look for this

{! --- for the forum-list ... alternating colors --- }
{var altbackcolor #EEEEEE}
{var altlisttextcolor #000000}

Insert these 6 variables just after it.

{! --- for the forum-index, forum-list & message-list ... alternating colors --- }
{var forumcolor #FFCCCC}
{var altforumcolor #FFFF33}
{var backthreadcolor #FFCCCC}
{var altbackthreadcolor #FFFF33}
{var backmessagecolor #FFCCCC}
{var altbackmessagecolor #FFFF33}

These colours are just an example I used to test the colour change, you can supplement your own 
colour names, or hex codes.




3) Edit the list.tpl file.
   (e.g. - http://www.yourdomainname.com/phorum/templates/default/list.tpl)

search for ALL instances of this

PhorumTableRow

replace that with this.

PhorumThreadRow




4) Edit the list_threads.tpl file.
   (e.g. - http://www.yourdomainname.com/phorum/templates/default/list_threads.tpl)

Search for these lines

  </tr>
  <?php $oldthread=0; $rclass=""; ?>
  {LOOP ROWS}
    <?php
      if($oldthread != $PHORUM['TMP']['ROWS']['thread']){
        if($rclass=="Alt") $rclass=""; else $rclass="Alt";
        $oldthread=$PHORUM['TMP']['ROWS']['thread'];
      }
    ?>
    <tr>

replace that entire section with this.

  </tr>
  <?php $rclass=""; ?>
  {LOOP ROWS}
    <?php if($rclass=="Alt") $rclass=""; else $rclass="Alt"; ?>
    <tr>

Next, search for ALL instances of this

PhorumTableRow

replace that with this.

PhorumThreadRow




5) Edit the read_threads.tpl file.
   (e.g. - http://www.yourdomainname.com/phorum/templates/default/read_threads.tpl)

Search for ALL instances of this

PhorumTableRow

replace that with this.

PhorumMessageRow




6) Once these changes have been made, refresh your browser, (in some circumstances, you might 
   need to clear your cache folder, then refresh the browser again), upon checking your forums, 
   you should see it all working perfectly.


Enjoy.
