============================================================================================================================
Title: BB Code Buttons In Quick Reply

Version: 1.1

Author: WormHole

Updated By: John Briggs

Description: This modification will provide BB Code buttons in the Quick Reply box.

Copyright:  2010 XMB Garage. All Rights Reserved.

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

Author Note:
This modification is developed and released for use with XMB 1.9.5 SP1 which is provided by XMBGarage.com.
============================================================================================================================
=======
Step 1:
=======
====================
Edit File: functions.inc.php
====================
========================
Add To End Of File Above  ?>
========================

// BB Code Buttons In Quick Reply Mod Begin
function bbcodeinsert() {
    global $imgdir, $bbinsert, $altbg1, $altbg2, $lang, $SETTINGS, $THEME, $spelling_lang;

    $bbcode = '';
    if ($SETTINGS['bbinsert'] == 'on') {
        eval('$bbcode = "'.template('functions_bbcodeinsert').'";');
    }
    return $bbcode;
}
// BB Code Buttons In Quick Reply Mod End


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

loadtemplates(

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

loadtemplates(
'functions_bbcodeinsert',

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

eval('$bbcodescript = "'.template('functions_bbcode').'";');

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

// BB Code Buttons In Quick Reply Mod Begin
$qrcolspan = 'colspan="2"';
$bbcodeinsert = bbcodeinsert();
// BB Code Buttons In Quick Reply Mod End

============================================================================================================================
=======
Step 3:
=======
===============
Edit File: post.php
===============
==================
Find Code and Delete:
==================

function bbcodeinsert() {
    global $imgdir, $bbinsert, $altbg1, $altbg2, $lang, $SETTINGS, $spelling_lang;

    $bbcode = '';
    if ($bbinsert == 'on') {
        eval('$bbcode = "'.template('functions_bbcodeinsert').'";');
    }
    return $bbcode;
}

============================================================================================================================
=======
Step 4:
=======
===============================
Go To Administration Panel --> Templates
===============================
============================
Edit Template: viewthread_quickreply
============================
==========
Find Code:
==========

<tr bgcolor="$altbg1" class="quickreply">
<td colspan="3" class="tablerow"><div align="left"><strong>&nbsp;&raquo;</strong>&nbsp;$whopost2</div></td>
</tr>

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

$bbcodeinsert

============================================================================================================================
=======
Step 5:
=======
===============================
Go To Administration Panel --> Templates
===============================
============================
Edit Template: functions_bbcodeinsert
============================
==========
Find Code:
==========

<td bgcolor="$altbg2">

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

<td colspan="2" bgcolor="$altbg2">

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