Title: Mark All Threads Read v1.0

Author: John Briggs

Description:
This modification will provide the option to mark all threads as read throughout the forum.

Copyright:  2009 John Briggs. All rights reserved.

Compatability: XMB 1.9.11

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. A copy is provided with this software package.

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

/* Set Up HTML Templates and Themes */

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

// Mark All Threads Read Mod Begin
if (!isset($lang['markread'])) {
    require_once(ROOT.'include/translation.inc.php');
    setNewLangValue('markread', 'Mark All Threads Read');
    loadLang($langfile);
}
// Mark All Threads Read Mod End

=======================================================================================================================================
=======
Step 2:
=======
===============
Edit File: misc.php
===============
====================
Find Code (1st Instance):
====================

    case 'captchaimage':

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

    // Mark All Threads Read Mod Begin
    case 'markread':
        nav($lang['markread']);
        break;
    // Mark All Threads Read Mod End

====================
Find Code (2nd Instance):
====================

    case 'captchaimage':

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

    // Mark All Threads Read Mod Begin
    case 'markread':
        $xmblvb = $onlinetime;
        put_cookie('xmblvb', '', 0, $cookiepath, $cookiedomain);
        put_cookie('oldtopics', '', 0, $cookiepath, $cookiedomain);
        $lastvisit = $onlinetime;
        $lastvisit2 = $onlinetime;
        redirect('index.php', 0);
        break;
    // Mark All Threads Read Mod End

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

<td colspan="3">

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

<td colspan="4">

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

<tr class="ctrtablerow" bgcolor="$altbg2">
<td width="33%"><a href="memcp.php"><strong>$lang[textusercp]</strong></a></td>
<td width="33%"><a href="u2u.php" onclick="Popup(this.href,'Window', 700, 450); return false;"><strong>{$lang['textu2umessenger']}</strong></a></td>
<td width="33%"><a href="buddy.php" onclick="Popup(this.href, 'Window', 450, 400); return false;"><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="u2u.php" onclick="Popup(this.href,'Window', 700, 450); return false;"><strong>{$lang['textu2umessenger']}</strong></a></td>
<td width="25%"><a href="buddy.php" onclick="Popup(this.href, 'Window', 450, 400); return false;"><strong>{$lang['launchbuddylist']}</strong></a></td>
<td width="25%"><a href="misc.php?action=markread"><strong>$lang[markread]</strong></a></td>
</tr>

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