#
#-----[ OPEN ]--------------------------------------------------
#
posting.php
#
#-----[ FIND ]--------------------------------------------------
#
// Set toggles for various options
if ( !$board_config['allow_html'] )
{
$html_on = 0;
}
else
{
$html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
}
#
#-----[ REPLACE ]--------------------------------------------
#
// Mod for ALLOW HTML to Admins and Moderators - This Mod esclude HTML code for Users and Anonymous - BEGIN
if ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD) && ( $is_auth['auth_mod'] ))
{
// Set toggles for various options
if ( !$board_config['allow_html'] )
{
$html_on = 0;
}
else
{
$html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
}
}
else
{
if ( !$board_config['allow_html'] )
{
$html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
}
else
{
$html_on = 0;
}
}
// Mod for ALLOW HTML to Admins and Moderators - This Mod exlude HTML code for Users and Anonymous - END
#-----[ OPEN ]--------------------------------------------------
#
posting.php
#
#-----[ FIND ]--------------------------------------------------
#
// Set toggles for various options
if ( !$board_config['allow_html'] )
{
$html_on = 0;
}
else
{
$html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
}
#
#-----[ REPLACE ]--------------------------------------------
#
// Mod for ALLOW HTML to Admins and Moderators - This Mod esclude HTML code for Users and Anonymous - BEGIN
if ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD) && ( $is_auth['auth_mod'] ))
{
// Set toggles for various options
if ( !$board_config['allow_html'] )
{
$html_on = 0;
}
else
{
$html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
}
}
else
{
if ( !$board_config['allow_html'] )
{
$html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
}
else
{
$html_on = 0;
}
}
// Mod for ALLOW HTML to Admins and Moderators - This Mod exlude HTML code for Users and Anonymous - END
If you look well in the code replaced it's used:
if ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD) && ( $is_auth['auth_mod'] ))
This trains Admins and Moderators to the use of the html. If you want that only the Admins can use the html you must change this line in:
if ($userdata['user_level'] == ADMIN) && ( $is_auth['auth_mod'] ))
Now: You must add the < table > button in Posting Body:
[--OPEN--]
templates/mg_themes/bbcb_mg.tpl
[--FIND--]
<a href="javascript:BBChl()" ><img border="0" src="{BBCB_MG_IMG_PATH}highlight{BBCB_MG_IMG_EXT}" name="highlight" onMouseOver="helpline('highlight')" alt="{L_BBCB_MG_HIGHLIGHT}" title="{L_BBCB_MG_HIGHLIGHT}" class="bbimages" /></a>
[-- AFTER ADD --]
<a href="javascript:BBCtable()" ><img border="0" src="{BBCB_MG_IMG_PATH}table{BBCB_MG_IMG_EXT}" name="highlight" onMouseOver="helpline('table')" alt="{L_BBCB_MG_TABLE}" title="{L_BBCB_MG_TABLE}" class="bbimages" /></a>
templates/mg_themes/bbcb_mg.tpl
[--FIND--]
<a href="javascript:BBChl()" ><img border="0" src="{BBCB_MG_IMG_PATH}highlight{BBCB_MG_IMG_EXT}" name="highlight" onMouseOver="helpline('highlight')" alt="{L_BBCB_MG_HIGHLIGHT}" title="{L_BBCB_MG_HIGHLIGHT}" class="bbimages" /></a>
[-- AFTER ADD --]
<a href="javascript:BBCtable()" ><img border="0" src="{BBCB_MG_IMG_PATH}table{BBCB_MG_IMG_EXT}" name="highlight" onMouseOver="helpline('table')" alt="{L_BBCB_MG_TABLE}" title="{L_BBCB_MG_TABLE}" class="bbimages" /></a>
Now it needs to remove from all the users the possibility to be able to choose whether to use or I lead the code html in Profile - Control Panel (It's only a matter not to see the function because, if it were also present and the Users choose "Yes" to use him/it, the Code won't work for the change effected in posting.php.
[--OPEN--]
templates/mg_themes/profile_add_body.ypl
[--FIND--]
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td>
<td class="row2">
<label><input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} /><span class="gen"> {L_YES}</span></label>
<label><input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} /><span class="gen"> {L_NO}</span></label>
</td>
</tr>
[-- REPLACE WITH --]
<!--
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td>
<td class="row2">
<label><input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} /><span class="gen"> {L_YES}</span></label>
<label><input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} /><span class="gen"> {L_NO}</span></label>
</td>
</tr>
-->
templates/mg_themes/profile_add_body.ypl
[--FIND--]
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td>
<td class="row2">
<label><input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} /><span class="gen"> {L_YES}</span></label>
<label><input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} /><span class="gen"> {L_NO}</span></label>
</td>
</tr>
[-- REPLACE WITH --]
<!--
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td>
<td class="row2">
<label><input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} /><span class="gen"> {L_YES}</span></label>
<label><input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} /><span class="gen"> {L_NO}</span></label>
</td>
</tr>
-->
Last Chage: Now it needs to remove from the Posting Body the possibility from the consumers to be able to choose whether to use or I lead the code html in a determined Post:
[-- OPEN --]
templates/mg_themes/posting_body.tpl
[--FIND--]
<!-- BEGIN switch_html_checkbox -->
<label><input type="checkbox" name="disable_html" {S_HTML_CHECKED} /> {L_DISABLE_HTML}</label><br />
<!-- END switch_html_checkbox -->
[-- REPLACE WITH --]
<!--
<!-- BEGIN switch_html_checkbox -->
<label><input type="checkbox" name="disable_html" {S_HTML_CHECKED} /> {L_DISABLE_HTML}</label><br />
<!-- END switch_html_checkbox -->
-->
templates/mg_themes/posting_body.tpl
[--FIND--]
<!-- BEGIN switch_html_checkbox -->
<label><input type="checkbox" name="disable_html" {S_HTML_CHECKED} /> {L_DISABLE_HTML}</label><br />
<!-- END switch_html_checkbox -->
[-- REPLACE WITH --]
<!--
<!-- BEGIN switch_html_checkbox -->
<label><input type="checkbox" name="disable_html" {S_HTML_CHECKED} /> {L_DISABLE_HTML}</label><br />
<!-- END switch_html_checkbox -->
-->
These are the changes that may have used for allowing the Admins and the Moderators to use the Code html.