============================================================================================================================
Modification Name: Mass Edit Forum Access Lists v1.0

Author: GuldantheWarlock (GuldantheWarlock@xmbgarage.com)

Last Updated: March 29, 2010

Description:
This modification will add a new feature in the admin panel where you can manage all your forums user access lists on page instead of having to go into each forum 
and editing the lists manually.
As new forums are added they will be automatically added to the list page.
This modification also feature a Clear List link for each access list for deletion of usernames.

Supported Version: XMB 1.9.5 SP1

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

Please backup your files before installing this modification.
Neither XMBGarage nor the author can be held responsible if your board stops functioning properly due to you installing this modification.
============================================================================================================================
=======
Step 1:
=======
=============
Edit File: cp.php
=============
==========
Find Code:
==========

if ($action == "mods") {

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

// Mass Edit Forum Access Lists Mod Begin
if ($action == 'accesslists') {
    if (isset($acupdate)) {
        $query = $db->query("SELECT fid FROM $table_forums WHERE type != 'group'");
        while($forum = $db->fetch_array($query)) {
            $userlist = "userlist$forum[fid]";
            $userlist = "${$userlist}";
            
            $db->query("UPDATE $table_forums SET userlist='".trim($userlist)."' WHERE fid='$forum[fid]'");
        }
        echo "<tr bgcolor=\"$altbg2\" class=\"tablerow\"><td align=\"center\">$lang[textforumupdate]</td></tr>";
    } else {
        $query = $db->query("SELECT fid, name, userlist FROM $table_forums WHERE type != 'group' ORDER BY fup ASC, displayorder ASC");
        ?>
        <script language="JavaScript">
        function clearBox(id) {
            document.getElementById('userlist'+id).value = '';
        }
        </script>
        <tr bgcolor="<?php echo $altbg2?>">
        <td>
        <form method="post" action="cp.php?action=accesslists">
        <table cellspacing="0" cellpadding="0" border="0" width="90%" align="center">
        <tr>
        <td bgcolor="<?php echo $bordercolor?>">
        <table border="0" cellspacing="<?php echo $borderwidth?>" cellpadding="<?php echo $tablespace?>" width="100%">
        <tr>
        <td class="category" colspan="2"><font color="<?php echo $cattext?>"><strong><?php echo $lang['mefal1']?></strong></font></td>
        </tr>
        <tr>
        <td class="header" width="50%"><?php echo $lang['textforumnew']?></td>
        <td class="header" width="50%"><?php echo $lang['textuserlist']?></td>
        </tr>
        <?php
        while($forum = $db->fetch_array($query)) {
            ?>
            <tr bgcolor="<?php echo $altbg1?>" class="tablerow">
            <td><?php echo stripslashes($forum['name'])?></td>
            <td><textarea rows="4" cols="30" id="userlist<?php echo $forum['fid']?>" name="userlist<?php echo $forum['fid']?>"><?php echo $forum['userlist']?></textarea>&nbsp;
            <a onClick="clearBox('<?php echo $forum['fid']?>');" style="cursor:hand"><?php echo $lang['mefal2']?></a></td>
            </tr>
            <?php
        }
        ?>
        <tr class="tablerow">
        <td bgcolor="<?php echo $altbg2?>" align="center" colspan="2"><input type="submit" name="acupdate" value="<?php echo $lang['textsubmitchanges']?>" class="submit" /></td>
        </tr>
        </table>
        </td>
        </tr>
        </table>
        </form>
        </td>
        </tr>
        <?php
    }
}
// Mass Edit Forum Access Lists Mod End

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

// Mass Edit Forum Access Lists Mod Begin
$lang['mefal1'] = 'Access Lists';
$lang['mefal2'] = 'Clear List';
$lang['mefal3'] = 'Access Lists successfully updated!';
$lang['mefal4'] = 'Mass Edit Access Lists';
// Mass Edit Forum Access Lists Mod End

============================================================================================================================
=======
Step 3:
=======
===========================
Edit File: include/admin.user.inc.php
===========================
==========
Find Code:
==========

    &raquo;&nbsp;<a href="cp.php?action=forum"><?php echo $lang['textforums']?></a><br />
    
===============
Add Code Below:
===============

    <!-- Mass Edit Forum Access Lists Mod Begin -->
    &raquo;&nbsp;<a href="cp.php?action=accesslists"><?php echo $lang['mefal4']?></a><br />
    <!-- Mass Edit Forum Access Lists Mod End -->
    
============================================================================================================================
Enjoy!