Written below are the changes I made to MaxComment to give users an option to allow BBCode rendering even when the BBCode toolbar is disabled.
/administrator/components/com_maxcomment/admin.maxcomment.html.php -- add in the extra option for rendering
| Code: |
<tr align="center" valign="middle">
<td align="left" valign="top"><?php echo _MXC_BBCODERENDER; ?></td>
<td align="left" valign="top">
<?php
echo mosHTML::yesnoRadioList( 'mxc_bbcoderender', 'class="inputbox"', $mxc_bbcoderender );
?>
</td>
<td align="left" valign="top" width="56%"><?php echo _MXC_EXPL_BBCODERENDER; ?></td>
</tr>
|
/administrator/components/com_maxcomment/maxcomment_config.php -- add in the extra rendering variable - line 76
| Code: |
$mxc_bbcoderender = "1";
|
/administrator/components/com_maxcomment/languages/english.php -- add in the rendering language variable for admin and edit existing variables to make sense
| Code: |
DEFINE("_MXC_BBCODESUPPORT","BB Code Toolbar"«»); //changed
DEFINE("_MXC_EXPL_BBCODESUPPORT","Add BB Code toolbar ?"«»); //changed
DEFINE("_MXC_BBCODERENDER","Parse BB Code"«»);
DEFINE("_MXC_BBCODERENDER_MAN","Note: Standard BBCode can be manually entered. Eg. [B],[I],[img]..."«»);
DEFINE("_MXC_EXPL_BBCODERENDER","Parse BB Codes in comments ?"«»);
|
/components/com_maxcomment/includes/common/maxcomment.parser.php -- change logic statement from original BBcode variable to new render variable - line 13
| Code: |
if ($mxc_bbcoderender) {
|
/components/com_maxcomment/maxcomment.html.php - add logic that shows a note to users that they can use BBCode - line 478
| Code: |
<?php if ( !$mxc_bbcodesupport && $mxc_bbcoderender ) { ?>
<tr>
<td valign="top" align="right"> </td>
<td>
<?php echo _MXC_BBCODERENDER_MAN; ?>
</td>
</tr>
<?php } ?>
|