Software Information
    Document Software:	XMB Version 1.9.8 SP2 Engage
    Author: The XMBGroup
    Reference: http://xmbforum.com

Modification Information
    Branch Title: Banner Ad Rotator
    Version: 2.2
    Build ID:	 6647-JF3/200801311320

Description
    This modification will add Advertisments to your board in the header and footer.

Document Information
    Author: Peter Eltringham
    Updated: John Briggs 1.9.5	2.1
                   Train (Michael Fraker)	1.9.8	2.2
                   WormHole (XMB Garage) 1.9.8 SP2	2.2
	 Referral URL: http://svn.otakuscion.com
	 Last Updated: June 22, 2009 at 08:22 AM EDT

===============================================================================================================
=======
Step 1:
=======
==============================
Go To Admin Panel --> Insert Raw SQL
==============================

Go to your admin panel at this time, and click "Insert RAW SQL".
You will have an option to browse and upload SQL, please find the SQL.txt file which was included with this zip folder and select it.

You may also copy and paste the contents of the sql.txt file into the upgrade field, whichever you prefer, click submit to continue.

================================================================================================================
=======
Step 2:
=======
=============================================================================================
Edit File: include/admin.inc.php
Note: This step may be different depending on if you have installed previous modifications. You should place this in the "Extra" category.
=============================================================================================
======
Find:
======

    <td class="tablerow" align="left" valign="top" width="20%" bgcolor="<?php echo $THEME['altbg2']?>">
    </td>

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

    <td class="tablerow" align="left" valign="top" width="20%" bgcolor="<?php echo $THEME['altbg2']?>">
    <!-- Banner Ad Rotator Mod Begin -->
    &raquo;&nbsp;<a href="ad_cp.php"><?php echo $lang['ads']?></a><br />
    <!-- Banner Ad Rotator Mod End -->
    </td>

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

// Banner Ad Rotator Mod Begin
$lang['ads'] = "Advertisments";
$lang['ads_name'] = "Client:";
$lang['ads_url'] = "Url:";
$lang['ads_img'] = "Image:";
$lang['ads_option'] = "Options:";
$lang['ads_status'] = "Status:";
$lang['ads_header'] = "Header";
$lang['ads_footer'] = "Footer";
$lang['ads_both'] = "Both";
$lang['ads_updatesuccess'] = "Ads Updated Successfully!";
$lang['ads_addedsuccess'] = "Ads Added Successfully!";
$lang['ads_create'] = "Create";
$lang['ads_notfound'] = "There are no ads to display.";
$lang['ads_create'] = "Create New Ad:";
// Banner Ad Rotator Mod End

==========================================================================================================
Note Before Continuing:
Upload the included file: bar.inc.php file located in the Contents folder to your /include/ folder at this time. Failure to do so may cause an error down the line.
===========================================================================================================
=======
Step 4:
=======
=================
Edit File: header.php
=================
======
Find:
======

$tables = array(

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

    'adrecord',
    'ads',

======
Find:
======

// Checks for the possibility to register

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

// Banner Ad Rotator Mod Begin
require ROOT.'include/bar.inc.php';
// Banner Ad Rotator Mod End

=======
Step 5:
=======
==============
Edit File: cp.php
==============
======
Find:
======

        $onlinetoday_statuson = $onlinetoday_statusoff = '';
        settingHTML('onlinetoday_status', $onlinetoday_statuson, $onlinetoday_statusoff);

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

        // Banner Ad Rotator Mod Begin
        $adson = $adsoff = '';
        settingHTML('ads', $adson, $adsoff);
        // Banner Ad Rotator Mod End

======
Find:
======

        printsetting1($lang['reportpoststatus'], 'reportpostnew', $reportposton, $reportpostoff);

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

        // Banner Ad Rotator Mod Begin
        printsetting1($lang['ads'], 'adsnew', $adson, $adsoff);
        // Banner Ad Rotator Mod End

======
Find:
======

        $smileyinsertnew = formOnOff('smileyinsertnew');

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

        // Banner Ad Rotator Switch: Starts
        $adsnew = formOnOff('adsnew');
        // Banner Ad Rotator Switch: Ends

======
Find:
======

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

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

        $db->query("UPDATE ".X_PREFIX."settings SET
            ads='$adsnew',

===============================================================================================================
Note Before Continuing:

Save and upload these affected files at this time. Once you are done, go to your forums, and then to the administration panel. From there select templates and follow the instructions below.
Upload the included ads.php and ad_cp.php files located in the Contents folder to your forum directory.
===============================================================================================================
=======
Step 6:
=======
==========================
Go To Admin Panel --> Templates
==========================
=================
Edit Template: header
=================
=========================
Add Code To End Of Template:
=========================

$headerads

===============================================================================================================
=======
Step 7:
=======
==========================
Go To Admin Panel --> Templates
==========================
=================
Edit Template: footer
=================
======
Find:
======

<br />
<table cellspacing="0" cellpadding="0" border="0" width="$tablewidth" align="center">
<tr>
<td bgcolor="$bordercolor">
<table border="0" cellspacing="$borderwidth" cellpadding="$tablespace" width="100%">
<tr class="ctrtablerow">


================================
Add Above (Or Add To Top Of Template):
================================

$footerads

===============================================================================================================
Note Before Continuing:

You now will need to upload the folder called /ads/ located in the Contents folder to your forums /images/
directory (absolute /yourforum/images/ads/), make sure it is CHMOD to 755 for
best performance.

All advertisments should be saved and uploaded here. The script will automatically select these ads to link outbound.
===========================
INSTALLATION COMPLETE !!!
===========================
The installation of this modification is now complete. You can modify the settings in your admin cp.
===============================================================================================================
Enjoy!