I was searching for something like that when I found ( after many searches ) this topic. As it was something I found useful, I thought it could be great to adapt it to the latest version of IP.
First of all, Thanks to the author, Zuker, for his mod. I just adapted his own mod ( wasn't difficult at all ).
Well that's just a little mod but I hope it will help some guys.
PS : I did not check the code of Zuker but it seems right because I tested it on my board with some other mods and I had nothing wrong.
Ps² : If someone could check if everything is right ( in the code ) and is secured, it would be fine, thx.
EDIT : I just modified a bit the code of Zuker : after some lessons in php, I just compiled his code to make it faster.
Changed :
- #
- #-----[ REPLACE BY ]--------------------------------------------
- #
- # If you want to allow only Administrators to use HTML on your board,
- # find ( in the following part ) :
- # if ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD) && ( $is_auth['auth_mod'] ))
- # and replace by :
- # if ($userdata['user_level'] == ADMIN) && ( $is_auth['auth_mod'] ))
- // 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
TO :
- #
- #-----[ REPLACE BY ]--------------------------------------------
- #
- # If you want to allow only Administrators to use HTML on your board,
- # find ( in the following part ) :
- # $userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD)
- # and replace by :
- # $userdata['user_level'] == ADMIN)
- // Set toggles for various options
- // Mod for ALLOW HTML to Admins and Moderators - This Mod esclude HTML code for Users and Anonymous - BEGIN
- if ( !$board_config['allow_html'] )
- {
- $html_on = 0;
- }
- elseif ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD) && ( $is_auth['auth_mod'] ))
- {
- $html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : true ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
- }
- // Mod for ALLOW HTML to Admins and Moderators - This Mod exlude HTML code for Users and Anonymous - END
HTML for Admins.rar | ||
Description: | Mod HTML for Admins | ![]() Download |
Filename: | HTML for Admins.rar | |
Filesize: | 1.81 KB | |
Downloaded: | 239 Time(s) |