============================================================================================================================
Modification Title: Forum Based Forum Information

Version: 1.1

Author: John Briggs

Description:
This modification will give you the option in forum options to set information per each forum off or on.
This modification will give you the option in forum options to set information per each forum.
This modification will show the forum information in forums and threads.
This modification will allow bbcode in the forum information display.

Copyright:  2010 John Briggs. All Rights Reserved.

Compatability: XMB 1.9.5 SP1

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

Author Note:
You downloaded this modificatioin from XMBGarage.com, the #1 source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.
============================================================================================================================
=======
Step 1:
=======
====================================
Go To Administration Panel --> Insert Raw SQL
====================================

Upload provided file named "SQL.txt" & click "Submit Changes" button.

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

        $type31 = $type32 = $type33 = $type34 = '';
        if ($forum['private'] == 2) {
            $type32 = $selHTML;
        } elseif ($forum['private'] == 3) {
            $type33 = $selHTML;
        } elseif ($forum['private'] == 4) {
            $type34 = $selHTML;
        } elseif ($forum['private'] == 1) {
            $type31 = $selHTML;
        }

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

        // Forum Based Forum Information Mod Begin
        $finfoon = $finfooff = '';
        switch ($forum['finfo_status']) {
            case 'on':
                $finfoon = $selHTML;
                break;
            default:
                $finfooff = $selHTML;
                break;
        }
        // Forum Based Forum Information Mod End

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

        $forum['description'] = stripslashes($forum['description']);

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

        // Forum Based Forum Information Mod Begin
        $forum['finfo'] = stripslashes($forum['finfo']);
        // Forum Based Forum Information Mod End

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

        <tr class="tablerow">
        <td bgcolor="<?php echo $altbg1?>"><?php echo $lang['textdesc']?></td>
        <td bgcolor="<?php echo $altbg2?>"><textarea rows="4" cols="30" name="descnew"><?php echo htmlspecialchars($forum['description'])?></textarea></td>
        </tr>

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

        <!-- Forum Based Forum Information Mod Begin -->
        <?php
        printsetting1($lang['finfo_status'], 'finfo_statusnew', $finfoon, $finfooff);
        ?>
        <tr class="tablerow">
        <td bgcolor="<?php echo $altbg1?>" valign="top"><?php echo $lang['finfo']?></td>
        <td bgcolor="<?php echo $altbg2?>"><textarea rows="4" cols="30" name="finfonew"><?php echo $forum['finfo']?></textarea></td>
        </tr>
        <!-- Forum Based Forum Information Mod End -->

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

            if ($newfname != $lang['textnewforum']) {
                $newfname = addslashes($newfname);
                $db->query("INSERT INTO $table_forums ( type, fid, name, status, lastpost, moderator, displayorder, private, description, allowhtml, allowsmilies, allowbbcode, userlist, theme, posts, threads, fup, postperm, allowimgcode, attachstatus, pollstatus, password, guestposting ) VALUES ('forum', '', '$newfname', '$newfstatus', '', '', '$newforder', '1', '', 'no', 'yes', 'yes', '', '', '0', '0', '$newffup', '1|1', 'yes', 'on', 'on', '', 'off')");
            }

===============================
Find Code IN-LINE in Above Statement:
===============================

) VALUES ('forum',

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

, finfostatus, finfo ) VALUES ('forum',

==============================
Find Code At End Of Above Statement:
==============================

)");

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

, 'off', '')");

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

            if ($newgname != $lang['textnewgroup']) {
                $newgname = addslashes($newgname);
                $db->query("INSERT INTO $table_forums ( type, fid, name, status, lastpost, moderator, displayorder, private, description, allowhtml, allowsmilies, allowbbcode, userlist, theme, posts, threads, fup, postperm, allowimgcode, attachstatus, pollstatus, password, guestposting ) VALUES ('group', '', '$newgname', '$newgstatus', '', '', '$newgorder', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', 'off')");
            }

===============================
Find Code IN-LINE in Above Statement:
===============================

) VALUES ('group',

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

, finfostatus, finfo ) VALUES ('group',

==============================
Find Code At End Of Above Statement:
==============================

)");

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

, 'off', '')");

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

            if ($newsubname != $lang['textnewsubf']) {
                $newsubname = addslashes($newsubname);
                $db->query("INSERT INTO $table_forums ( type, fid, name, status, lastpost, moderator, displayorder, private, description, allowhtml, allowsmilies, allowbbcode, userlist, theme, posts, threads, fup, postperm, allowimgcode, attachstatus, pollstatus, password, guestposting ) VALUES ('sub', '', '$newsubname', '$newsubstatus', '', '', '$newsuborder', '1', '', 'no', 'yes', 'yes', '', '', '0', '0', '$newsubfup', '1|1', 'yes', 'on', 'on', '', 'off')");
            }

===============================
Find Code IN-LINE in Above Statement:
===============================

) VALUES ('sub',

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

, finfo_status, finfo ) VALUES ('sub',

==============================
Find Code At End Of Above Statement:
==============================

)");

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

, 'off', '')");

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

            $guestpostingnew = (isset($guestpostingnew) && $guestpostingnew == 'on') ? 'on' : 'off';

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

            // Forum Based Forum Information Mod Begin
            $finfo_statusnew = (isset($finfo_statusnew) && $finfo_statusnew == 'on') ? 'on' : 'off';
            // Forum Based Forum Information Mod End

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

            $descnew = addslashes($descnew);

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

            // Forum Based Forum Information Mod Begin
            $finfonew = addslashes($finfonew);
            // Forum Based Forum Information Mod End

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

$db->query("UPDATE $table_forums SET name='$namenew',

====================================
Find Code At End Of Above Statement:
====================================

 WHERE fid='$fdetails'");

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

, finfo_status='$finfo_statusnew', finfo='$finfonew' WHERE fid='$fdetails'");

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

// Forum Based Forum Information Mod Begin
$lang['finfo'] = "Forum Information";
$lang['finfo_status'] = "Forum Information Status:";
// Forum Based Forum Information Mod End

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

loadtemplates(

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

loadtemplates(
'forumdisplay_information',

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

eval('echo "'.template('header').'";');

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

// Forum Based Forum Information Mod Begin
$foruminfo = '';
if (isset($forum['finfo_status']) && $forum['finfo_status'] == 'on' && $forum['finfo'] != '') {
    $forum['finfo'] = postify($forum['finfo'], 'no', 'no', 'yes', 'no', 'yes', 'yes', false, 'no', 'no');
    $forum['finfo'] = stripslashes($forum['finfo']);
    eval('$foruminfo = "'.template('forumdisplay_information').'";');
}
// Forum Based Forum Information Mod End

============================================================================================================================
=======
Step 5:
=======
===================
Edit File: viewthread.php
===================
==========
Find Code:
==========

loadtemplates(

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

loadtemplates(
'forumdisplay_information',

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

    $modoptions = '';
    if ('Moderator' == $status1) {
        eval('$modoptions = "'.template('viewthread_modoptions').'";');
    }

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

    // Forum Based Forum Information Mod Begin
    $foruminfo = '';
    if (isset($forum['finfo_status']) && $forum['finfo_status'] == 'on' && $forum['finfo'] != '') {
        $forum['finfo'] = postify($forum['finfo'], 'no', 'no', 'yes', 'no', 'yes', 'yes', false, 'no', 'no');
        $forum['finfo'] = stripslashes($forum['finfo']);
        eval('$foruminfo = "'.template('forumdisplay_information').'";');
    }
    // Forum Based Forum Information Mod End

============================================================================================================================
=======
Step 6:
=======
===============================
Go To Administration Panel --> Templates
===============================
===================================
Create New Template: forumdisplay_information
===================================
========================
Add Code and Submit Changes:
========================

<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="category">
<td><font color="$cattext"><strong>$lang[finfo]</strong></font></td>
</tr>
<tr class="tablerow">
<td bgcolor="$altbg2">$forum[finfo]</td>
</tr>
</table>
</td>
</tr>
</table>
<br />

============================================================================================================================
=======
Step 7:
=======
===============================
Go To Administration Panel --> Templates
===============================
=======================================
Edit Templates: forumdisplay and forumdisplay_admin
=======================================
==========
Find Code:
==========

$subforums

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

$foruminfo

============================================================================================================================
=======
Step 8:
=======
===============================
Go To Administration Panel --> Templates
===============================
====================
Edit Template: viewthread
====================
==========
Find Code:
==========

$poll

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

$foruminfo

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