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

Mod Version: 1.1

Mod Author: John Briggs

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

Mod Copyright:  2007-2008 XMBMods.com. All rights reserved.

Mod Compatibility: XMB 1.9.8 Engage Final SP2

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

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

Mod Author Note:
This modification is developed and released for use with XMB 1.9.8 Engage Final SP1 which is provided by XMBMods.com.

=======================================================================================================================================
=======
Step 1:
=======

===================================
Go To Admin Panel -> Insert Raw SQL
===================================

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

=======================================================================================================================================
=======
Step 2:
=======

================================
Edit File: lang/English.lang.php
================================

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

?>

===============
Add Code 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 = 'selected="selected"';
                break;
            default:
                $celloverfxoff = 'selected="selected"';
                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 class="tablerow" bgcolor="<?php echo $THEME[altbg2]?>">
        <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 -->

==========
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 -->
        <tr class="tablerow" bgcolor="<?php echo $THEME[altbg2]?>">
        <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 -->

==========
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 On 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='.intval($thread['tid']));
    // Theme Based Cell Rollover Effects Mod End

=======================================================================================================================================
=======
Step 5:
=======

=====================
Edit File: header.php
=====================

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

$quickjump = '';

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

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

=======================================================================================================================================
=======
Step 6:
=======

====================================
Edit File: include/functions.inc.php
====================================

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

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

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

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

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

function readFileAsINI($filename) {
    $lines = file($filename);
    foreach($lines as $line_num => $line) {
        $temp = explode("=",$line);
        if ($temp[0] != 'dummy') {
            $key = trim($temp[0]);
            $val = trim($temp[1]);
            $thefile[$key] = $val;
        }
    }
    return $thefile;
}

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

// 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: pointer; 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('$today_row[] = "'.template('today_row').'";');

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

        // Theme Based Cell Rollover Effects Mod Begin
        $mouseover = celloverfx('viewthread.php?tid='.intval($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='.intval($post['ttid']).'#pid'.intval($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='.intval($post['ttid']).'#pid'.intval($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='.$memurl);
                // 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 Admin Panel -> 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 Admin Panel -> Templates -> 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 Admin Panel -> Templates -> 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 Admin Panel -> Templates -> today_row
===========================================

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

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

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

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

=======================================================================================================================================
========
Step 14:
========

==========================================================
Go To Admin Panel -> Templates ->  misc_search_results_row
==========================================================

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

<tr class="tablerow">
<td bgcolor="$altbg1"><strong><a href="viewthread.php?tid=$post[ttid]&amp;page=$page#pid$post[pid]">$post[tsubject]</a></strong><br />$add_pre $show $add_post</td>
<td bgcolor="$altbg1">$poston<br />$lang[textby]: $postby</td>
</tr>

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

<tr class="tablerow">
<td bgcolor="$altbg2" $mouseover><strong><a href="viewthread.php?tid=$post[ttid]&amp;page=$page#pid$post[pid]">$post[tsubject]</a></strong><br />$add_pre $show $add_post</td>
<td bgcolor="$altbg1">$poston<br />$lang[textby]: $postby</td>
</tr>

=======================================================================================================================================
========
Step 16:
========

======================================================
Go To Admin Panel -> Templates -> index_welcome_member
======================================================

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

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

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

<td width="33%" $mouseover><a href="memcp.php"><strong>$lang[textusercp]</strong></a></td>
<td width="33%" $u2umsover><a href="#" onclick="Popup('u2u.php','Window', 700, 450);"><strong>$lang[textu2umessenger]</strong></a></td>
<td width="33%" $buddymsover><a href="#" onclick="Popup('buddy.php', 'Window', 450, 400);"><strong>$lang[launchbuddylist]</strong></a></td>

=======================================================================================================================================
========
Step 17:
========

================================================
Go To Admin Panel -> Templates -> misc_mlist_row
================================================

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

<tr>
<td bgcolor="$altbg1" class="tablerow"><a href="member.php?action=viewpro&amp;member=$memurl">$member[username]</a></td>
<td bgcolor="$altbg2" class="ctrtablerow">$member[status]</td>
<td bgcolor="$altbg1" class="ctrtablerow">$email</td>
<td bgcolor="$altbg2" class="ctrtablerow">$site</td>
<td bgcolor="$altbg1" class="tablerow">$member[location]</td>
<td bgcolor="$altbg2" class="ctrtablerow">$member[regdate]</td>
<td bgcolor="$altbg1" class="ctrtablerow">$member[postnum]</td>
</tr>

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

<tr>
<td bgcolor="$altbg2" class="tablerow" $mouseover><a href="member.php?action=viewpro&amp;member=$memurl">$member[username]</a></td>
<td bgcolor="$altbg1" class="ctrtablerow">$member[status]</td>
<td bgcolor="$altbg2" class="ctrtablerow">$email</td>
<td bgcolor="$altbg1" class="ctrtablerow">$site</td>
<td bgcolor="$altbg2" class="tablerow">$member[location]</td>
<td bgcolor="$altbg1" class="ctrtablerow">$member[regdate]</td>
<td bgcolor="$altbg2" class="ctrtablerow">$member[postnum]</td>
</tr>

=======================================================================================================================================
========
Step 18:
========

=================================================================
Note: If you're using the "Topic Activity" hack then use this code.
=================================================================

========================================================
Go To Admin Panel -> Templates -> topic_activity_threads
========================================================

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

<td class="tablerow" bgcolor="$altbg2">$prefix

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

<td class="tablerow" bgcolor="$altbg2" $mouseover>$prefix
=======================================================================================================================================
========
Step 19:
========

=================================================================
Note: If your using the "Topic Activity" hack then use this code.
=================================================================

=======================
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