Title: Mark All Threads Read v1.0

Author: John Briggs

Description:
This mod will provide the option to mark all threads as read through out the forum.

Copyright:  2006 John Briggs. All rights reserved.

Compatability: XMB 1.9.5 Final

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

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

Author Note:
You downloaded this hack from XMBMods.com, the #1 source for XMB related downloads.
Please visit http://www.xmbmods.com/ for support.

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

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

================================
Add Code At Very Bottom Of File:
================================

// Mark All Threads Read Mod Begin
$lang['markread'] = "Mark All Threads Read";
// Mark All Threads Read Mod End

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

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

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

    $lastvisit2 = $lastvisit - 540;

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

    // Mark Threads As Read Mod Begin
    if (isset($oldtopics)) {
        put_cookie('oldtopics', $oldtopics, ($onlinetime + 600), $cookiepath, $cookiedomain);
    }
    // Mark Threads As Read Mod End

=======================================================================================================================================
=======
Step 3:
=======

===================
Edit File: misc.php
===================

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

        case 'smilies':
            $header = '';
            eval("\$css = \"".template("css")."\";");
            eval("\$header = \"".template("popup_header")."\";");
            eval("\$footer = \"".template("popup_footer")."\";");
            $smtotal = 0;   // makes sure that the total # of smilies ins't limited here!
            $smilies = smilieinsert();

            eval("\$misc = \"".template("misc_smilies")."\";");

            echo $header;
            echo $misc;
            echo $footer;
            exit();

            break;

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

         // Mark Threads As Read Mod Begin
        case 'markread':
            if (X_GUEST) {
                error($lang['textnoaction']);
            }

            $xmblvb = $onlinetime;
            put_cookie('xmblvb', $xmblvb, $expire1, $cookiepath, $cookiedomain);
            $lastvisit = $onlinetime;
            $lastvisit2 = $onlinetime;
            redirect('index.php', 0);
            break;
         // Mark Threads As Read Mod End

=======================================================================================================================================
=======
Step 4:
=======

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

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

<td colspan="3">

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

<td colspan="4">

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

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

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

<tr class="ctrtablerow" bgcolor="$altbg2">
<td width="25%"><a href="memcp.php"><strong>$lang[textusercp]</strong></a></td>
<td width="25%"><a href="#" onclick="Popup('u2u.php','Window', 700, 450);"><strong>$lang[textu2umessenger]</strong></a></td>
<td width="25%"><a href="#" onclick="Popup('buddy.php', 'Window', 450, 400);"><strong>$lang[launchbuddylist]</strong></a></td>
<td width="25%"><a href="misc.php?action=markread"><strong>$lang[markread]</strong></a></td>
</tr>

=======================================================================================================================================