============================================================================================================================
Modification Title: Calendar System

Version: 1.0

Author: John Briggs

Description: This modification will provide a calendar system which allows events and holidays to be added with full admin controls.

Copyright:  2010 John Briggs. All rights reserved.

Compatibility: XMB 1.9.8 SP4

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

Author Note: This modification is developed and released for use with XMB 1.9.8 SP4 which is provided by XMBGarage.com.
============================================================================================================================
=======
Step 1:
=======

Upload the following files to your "forum" path.

"install.php", "calendar.xmb", "calendar.php"

Upload the following file to your "lang" folder path.

"English.calendar.php"

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

Upload the following image to your forum "images" folder path.

"birthday.gif"

Upload the following images to all of your theme folder paths.

"top_calendar.gif"

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

    'captchaimages',

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

    'calendar',
    'captchaimages',
    'events',

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

    'forums',

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

    'forums',
    'holidays',

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

if (file_exists(ROOT.'lang/'.$langfile.'.lang.php')) {
    require ROOT.'lang/'.$langfile.'.lang.php';
} else {
    require ROOT.'lang/English.lang.php';
}

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

// Calendar System Mod Begin
if (file_exists(ROOT.'lang/'.$langfile.'.calendar.php')) {
    require ROOT.'lang/'.$langfile.'.calendar.php';
} else {
    require ROOT.'lang/English.calendar.php';
}
// Calendar System Mod End

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

if ($SETTINGS['stats'] == 'on') {
    $links[] = '<img src="'.$imgdir.'/top_stats.gif" alt="'.$lang['altstats'].'" border="0" /> <a href="stats.php"><font class="navtd">'.$lang['navstats'].'</font></a>';
}

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

// Calendar System Mod Begin
if ($SETTINGS['calendar_status'] == 'on') {
    $links[] = '<img src="'.$imgdir.'/top_calendar.gif" alt="'.$lang['textcalendar'].'" border="0" /> <a href="calendar.php"><font class="navtd">'.$lang['textcalendar'].'</font></a>';
}
// Calendar System Mod End

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

        $u2uattachstatuson = $u2uattachstatusoff = '';
        settingHTML('u2uattachstatus', $u2uattachstatuson, $u2uattachstatusoff);

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

        // Calendar System Mod Begin
        $calendaron = $calendaroff = '';
        settingHTML('calendar_status', $calendaron, $calendaroff);
        // Calendar System Mod End

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

        printsetting1($lang['textmemliststatus'], 'memliststatusnew', $memliston, $memlistoff);

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

        // Calendar System Mod Begin
        printsetting1($lang['calendarstatus'], 'calendar_statusnew', $calendaron, $calendaroff);
        // Calendar System Mod End

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

        $u2uattachstatusnew = formOnOff('u2uattachstatusnew');

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

        // Calendar System Mod Begin
        $calendar_statusnew = formOnOff('calendar_statusnew');
        // Calendar System Mod End

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

        $db->query("UPDATE ".X_PREFIX."settings SET

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

            calendar_status='$calendar_statusnew',

============================================================================================================================
=======
Step 5:
=======
=======================
Edit File: include/online.inc.php
=======================
==========
Find Code:
==========

    } else if (false !== strpos($url, '/topicadmin.php')) {
        $location = $lang['onlinetopicadmin'];

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

    // Calendar System Mod Begin
    } else if (false !== strpos($url, '/calendar.php')) {
        $location = $lang['onlinecalendar'];
    // Calendar System Mod End

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

Please run install.php from your forum 'root' directory.

============================================================================================================================
========
Step 7:
========

Please delete the following files from your forum 'root' directory.

install.php, calendar.xmb

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