============================================================================================================================
Modification Title: Theme Based Cell Rollover Effects

Version: 1.1

Author: John Briggs

Description:
This modification will add add the ability to set cell rollover effects on or off per each theme.
This modification will add add the ability to scroll over forums with your cursor and get a rollover effect.

Copyright:  2010 John Briggs. All Rights Reserved.

Compatability: XMB 1.9.5 SP1

Install Note: Before adding this modification to your forum, you should back up all files related to this modification.

License Note: This modification is released under the GPL License v3. A copy is provided with this software package.

Author Note:
You downloaded this modification from XMBGarage.com, the #1 source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.
============================================================================================================================
=======
Step 1:
=======
====================================
Go To Administration Panel --> Insert Raw SQL
====================================

Upload provided file named "SQL.txt" & click "Submit Changes" button.

=======================================================================================================================================
=======
Step 2:
=======
=======================
Edit File: lang/English.lang.php
=======================
=============================
Add Code To End Of File ABOVE  ?>
=============================

// Theme Based Cell Rollover Effects Mod Begin
$lang['themecell'] = "Cell Rollover Effects:";
// Theme Based Cell Rollover Effects Mod End

============================================================================================================================
=======
Step 3:
=======
===============
Edit File: cp2.php
===============
==========
Find Code:
==========

        $themestuff = $db->fetch_array($query);

===============
Add Code Below:
===============

        // Theme Based Cell Rollover Effects Mod Begin
        $celloverfxon = $celloverfxoff = '';
        switch ($themestuff['celloverfx']) {
            case 'on':
                $celloverfxon = $selHTML;
                break;
            default:
                $celloverfxoff = $selHTML;
                break;
        }
        // Theme Based Cell Rollover Effects Mod End

==========
Find Code:
==========

        <tr bgcolor="<?php echo $altbg2?>" class="tablerow">
        <td><?php echo $lang['texthemename']?></td>
        <td colspan="2"><input type="text" name="namenew" value="<?php echo $themestuff['name']?>" /></td>
        </tr>

===============
Add Code Below:
===============

        <!-- Theme Based Cell Rollover Effects Mod Begin -->
        <tr bgcolor="<?php echo $altbg2?>" class="tablerow">
        <td><?php echo $lang['themecell']?></td>
        <td colspan="2">
        <select name="celloverfxnew">
        <option value="on" <?php echo $celloverfxon?>><?php echo $lang['texton']?></option>
        <option value="off" <?php echo $celloverfxoff?>><?php echo $lang['textoff']?></option>
        </select>
        </td>
        </tr>
        <!-- Theme Based Cell Rollover Effects Mod End -->

==========
Find Code:
==========

        <tr bgcolor="<?php echo $altbg2?>" class="tablerow">
        <td><?php echo $lang['texthemename']?></td>
        <td><input type="text" name="namenew" /></td>
        </tr>

===============
Add Code Below:
===============

        <!-- Theme Based Cell Rollover Effects Mod Begin -->
        <tr bgcolor="<?php echo $altbg2?>" class="tablerow">
        <td><?php echo $lang['themecell']?></td>
        <td colspan="2">
        <select name="celloverfxnew">
        <option value="on"><?php echo $lang['texton']?></option>
        <option value="off"><?php echo $lang['textoff']?></option>
        </select>
        </td>
        </tr>
        <!-- Theme Based Cell Rollover Effects Mod End -->

==========
Find Code:
==========

 WHERE themeid='$orig'");

================
Replace Code With:
================

, celloverfx='$celloverfxnew' WHERE themeid='$orig'");

==========
Find Code:
==========

) VALUES('', '$namenew'

================
Replace Code With:
================

, celloverfx) VALUES('', '$namenew'

============================
Find Code At End Of The Same Line:
============================

)");

================
Replace Code With:
================

, '$celloverfxnew')");

============================================================================================================================
=======
Step 4:
=======
====================
Edit File: forumdisplay.php
====================
==========
Find Code:
==========

    eval('$threadlist .= "'.template($forumdisplay_thread).'";');

===============
Add Code Above:
===============

    // Theme Based Cell Rollover Effects Mod Begin
    $mouseover = celloverfx('viewthread.php?tid='.$thread['tid']);
    // Theme Based Cell Rollover Effects Mod End

============================================================================================================================
=======
Step 5:
=======
=================
Edit File: header.php
=================
==========
Find Code:
==========

$bbcodescript = '';

===============
Add Code Above:
===============

// Theme Based Cell Rollover Effects Mod Begin
$mouseover = '';
// Theme Based Cell Rollover Effects Mod End

============================================================================================================================
=======
Step 6:
=======
==================
Edit File: functions.php
==================
==========
Find Code:
==========

        eval('$foruminfo = stripslashes("'.template($template).'");');

===============
Add Code Above:
===============

        // Theme Based Cell Rollover Effects Mod Begin
        $mouseover = celloverfx('forumdisplay.php?fid='.$forum['fid']);
        // Theme Based Cell Rollover Effects Mod End

==========
Find Code:
==========

function altMail($to, $subject, $message, $additional_headers='', $additional_parameters=null) {

===============
Add Code Above:
===============

// Theme Based Cell Rollover Effects Mod Begin
function celloverfx($url) {
    global $THEME, $altbg1, $altbg2, $celloverfx;

    $mouseover = '';
    if ($THEME['celloverfx'] == 'on') {
        $mouseover = "onclick=\"location.href='$url'\" style=\"cursor:hand\" onmouseover=\"this.style.backgroundColor='$altbg1'\" onmouseout=\"this.style.backgroundColor='$altbg2'\"";
    }
    return $mouseover;
}
// Theme Based Cell Rollover Effects Mod End

============================================================================================================================
=======
Step 7:
=======
================
Edit File: today.php
================
==========
Find Code:
==========

    eval('$today2[] = "'.template('today2').'";');

===============
Add Code Above:
===============

    // Theme Based Cell Rollover Effects Mod Begin
    $mouseover = celloverfx('viewthread.php?tid='.$thread['tid']);
    // Theme Based Cell Rollover Effects Mod End

============================================================================================================================
=======
Step 8:
=======
===============
Edit File: misc.php
===============
==========
Find Code:
==========

                                eval('$searchresults .= "'.template('misc_search_results_row').'";');

===============
Add Code Above:
===============

                                // Theme Based Cell Rollover Effects Mod Begin
                                $mouseover = celloverfx('viewthread.php?tid='.$post['ttid'].'#pid'.$post['pid']);
                                // Theme Based Cell Rollover Effects Mod End

==========
Find Code:
==========

                            eval('$searchresults .= "'.template('misc_search_results_row').'";');

===============
Add Code Above:
===============

                            // Theme Based Cell Rollover Effects Mod Begin
                            $mouseover = celloverfx('viewthread.php?tid='.$post['ttid'].'#pid'.$post['pid']);
                            // Theme Based Cell Rollover Effects Mod End

==========
Find Code:
==========

                $memurl = rawurlencode($member['username']);

===============
Add Code Below:
===============

                // Theme Based Cell Rollover Effects Mod Begin
                $mouseover = celloverfx('member.php?action=viewpro&amp;member='.rawurlencode($member['username']));
                // Theme Based Cell Rollover Effects Mod End

==================================
Use this code if User Rank Icons is installed
==================================

                // Theme Based Cell Rollover Effects Mod Begin
                $mouseover = celloverfx('.$memurl.');
                // Theme Based Cell Rollover Effects Mod End

============================================================================================================================
=======
Step 9:
=======
===============
Edit File: index.php
===============
==========
Find Code:
==========

        eval('$welcome = "'.template('index_welcome_member').'";');

===============
Add Code Above:
===============

        // Theme Based Cell Rollover Effects Mod Begin
        $mouseover = celloverfx('memcp.php');
        $u2umsover = $buddymsover = '';
        if ($THEME['celloverfx'] == 'on') {
            $u2umsover = "onClick=\"Popup('u2u.php', 'Window', 700, 450);\" style=\"cursor:hand\" onmouseover=\"this.style.backgroundColor='$altbg1';\" onmouseout=\"this.style.backgroundColor='$altbg2';\"";
            $buddymsover = "onClick=\"Popup('buddy.php?', 'Window', 450, 400);\" style=\"cursor:hand\" onmouseover=\"this.style.backgroundColor='$altbg1';\" onmouseout=\"this.style.backgroundColor='$altbg2';\"";
        }
        // Theme Based Cell Rollover Effects Mod End

============================================================================================================================
========
Step 10:
========
===============================
Go To Administration Panel --> Templates
===============================
=================================================
Edit Templates: forumdisplay_thread and forumdisplay_thread_admin
=================================================
==========
Find Code:
==========

<td bgcolor="$altbg2" class="tablerow"><font class="mediumtxt">$prefix<a href="viewthread.php?tid=$thread[tid]">$thread[subject]</a>  $multipage2</font></td>

==================
Replace Code With:
==================

<td bgcolor="$altbg2" class="tablerow" $mouseover><font class="mediumtxt">$prefix<a href="viewthread.php?tid=$thread[tid]">$thread[subject]</a> $multipage2</font></td>

=======================================================================================================================================
========
Step 11:
========
===============================
Go To Administration Panel --> Templates
===============================
============================
Edit Template: forumdisplay_subforum
============================
==========
Find Code:
==========

<td bgcolor="$altbg2" class="tablerow"><font class="mediumtxt"><a href="forumdisplay.php?fid=$forum[fid]">

==================
Replace Code With:
==================

<td bgcolor="$altbg2" class="tablerow" $mouseover><font class="mediumtxt"><a href="forumdisplay.php?fid=$forum[fid]">

============================================================================================================================
========
Step 12:
========
===============================
Go To Administration Panel --> Templates
===============================
=====================
Edit Template: index_forum
=====================
==========
Find Code:
==========

<td bgcolor="$altbg2" class="tablerow" width="54%">

==================
Replace Code With:
==================

<td bgcolor="$altbg2" class="tablerow" width="54%" $mouseover>

============================================================================================================================
========
Step 13:
========
===============================
Go To Administration Panel --> Templates
===============================
=================
Edit Template: today2
=================
==========
Find Code:
==========

<td width="43%" bgcolor="$altbg2">

==================
Replace Code With:
==================

<td width="43%" bgcolor="$altbg2" $mouseover>

============================================================================================================================
========
Step 14:
========
===============================
Go To Administration Panel --> Templates
===============================
==============================
Edit Template: misc_search_results_row
==============================
==========
Find Code:
==========

<td bgcolor="$altbg1"><strong><a href="viewthread.php?tid=$post[ttid]#pid$post[pid]">$post[tsubject]</a></strong><br />$add_pre $show $add_post</td>

==================
Replace Code With:
==================

<td bgcolor="$altbg2" $mouseover><strong><a href="viewthread.php?tid=$post[ttid]#pid$post[pid]">$post[tsubject]</a></strong><br />$add_pre $show $add_post</td>

============================================================================================================================
========
Step 15:
========
===============================
Go To Administration Panel --> Templates
===============================
=============================
Edit Template: index_welcome_member
=============================
==========
Find Code:
==========

<td align="center" width="33%"><a href="memcp.php"><strong>$lang[textusercp]</strong></a></td>

================
Replace Code With:
================

<td align="center" width="33%" $mouseover><a href="memcp.php"><strong>$lang[textusercp]</strong></a></td>

==========
Find Code:
==========

<td align="center" width="33%"><a href="#" onclick="Popup('u2u.php','Window', 700, 450);"><strong>$lang[textu2umessenger]</strong></a></td>

================
Replace Code With:
================

<td align="center" width="33%" $u2umsover><a href="#" onclick="Popup('u2u.php','Window', 700, 450);"><strong>$lang[textu2umessenger]</strong></a></td>

==========
Find Code:
==========

<td align="center" width="33%"><a href="#" onclick="Popup('buddy.php', 'Window', 450, 400);"><strong>$lang[launchbuddylist]</strong></a></td>

================
Replace Code With:
================

<td align="center" width="33%" $buddymsover><a href="#" onclick="Popup('buddy.php', 'Window', 450, 400);"><strong>$lang[launchbuddylist]</strong></a></td>

============================================================================================================================
========
Step 16:
========
===============================
Go To Administration Panel --> Templates
===============================
=======================
Edit Template: misc_mlist_row
=======================
==========
Find Code:
==========

<td bgcolor="$altbg2" class="tablerow"><a href="member.php?action=viewpro&amp;member=$memurl">$member[username]</a></td>

==================
Replace Code With:
==================

<td bgcolor="$altbg2" class="tablerow" $mouseover><a href="member.php?action=viewpro&amp;member=$memurl">$member[username]</a></td>

============================================================================================================================
========
Step 17:
========
=======================================================
Note: If you're using the "Topic Activity" modification then use the code below.
=======================================================
===============================
Go To Administration Panel --> Templates
===============================
===========================
Edit Template: topic_activity_threads
===========================
==========
Find Code:
==========

<td class="tablerow" bgcolor="$THEME[altbg2]">$prefix

================
Replace Code With:
================

<td class="tablerow" bgcolor="$THEME[altbg2]" $mouseover>$prefix

============================================================================================================================
========
Step 18:
========
=======================================================
Note: If you're using the "Topic Activity" modification then use the code below.
=======================================================
=================
Edit File: activity.php
=================
==========
Find Code:
==========

    eval('$threads .= "'.template('topic_activity_threads').'";');

===============
Add Code Above:
===============

    // Theme Based Cell Rollover Effects Mod Begin
    $mouseover = celloverfx('viewthread.php?tid='.$thread['tid']);
    // Theme Based Cell Rollover Effects Mod End

============================================================================================================================
Enjoy!