https://www.icyphoenix.com/viewtopic.php?f=30&t=361 ----------------------------------- Zuker Sat 16 Sep, 2006 17:38 Enabling Html For Administrator Only ----------------------------------- Are there any possibility of enabling html only for administrator or moderators? There is a mod, but needs multi bbcode to be instaled. I've tryed to installed it, but was impossible for me. Thanks in regard Zuker ----------------------------------- difus Sat 16 Sep, 2006 17:43 Re: Enabling Html For Administrator Only ----------------------------------- can you show results for this and link for mod ? ----------------------------------- Zuker Sat 16 Sep, 2006 17:46 Re: Enabling Html For Administrator Only ----------------------------------- the link for the mod http://www.phpbb.com/phpBB/viewtopic.php?t=235489 ----------------------------------- difus Sat 16 Sep, 2006 17:47 Re: Enabling Html For Administrator Only ----------------------------------- thanks I'll try and let you know ----------------------------------- Zuker Sat 16 Sep, 2006 17:58 Re: Enabling Html For Administrator Only ----------------------------------- Thanks to you difus ----------------------------------- difus Sat 16 Sep, 2006 21:15 Re: Enabling Html For Administrator Only ----------------------------------- I did for you bbcode.php [final for both mods] http://www.digi-sky.net/mums/downloads.php?view=detail&id=24 It is cool mod I like it :D ----------------------------------- Zuker Sat 16 Sep, 2006 21:55 Re: Enabling Html For Administrator Only ----------------------------------- thanks difus, i m going to edit the other files now ;) ----------------------------------- Zuker Sun 17 Sep, 2006 00:18 Re: Enabling Html For Administrator Only ----------------------------------- difus what did you do on this part? [code]#-----[ OPEN ]------------------------------------------------ # # NOTE --- You need to do this for all of your installed template styles # templates/subSilver/posting_body.tpl # #-----[ FIND ]------------------------------------------------ # # NOTE --- the actual line to find is MUCH longer, containing all the bbcode tags # bbtags = new Array( # #-----[ AFTER, ADD ]------------------------------------------ # //+MOD: HTML BBCode MOD bbtags[bbtags.length] = '[html]'; bbtags[bbtags.length] = '[/html]'; //-MOD: HTML BBCode MOD # #-----[ FIND ]------------------------------------------------ #
{POST_PREVIEW_BOX} {ERROR_BOX} # #-----[ REPLACE WITH ]---------------------------------------- # {POST_PREVIEW_BOX} {ERROR_BOX} [/code] ----------------------------------- difus Sun 17 Sep, 2006 00:40 Re: Enabling Html For Administrator Only ----------------------------------- I don't install it fully on XS [my time limits] I think you must do some experiments in this case and you'll solve this installation part I recomend to do nothing with this part now while you finish all install This mod I have had on other phpbb no XS maybe I found time for it ----------------------------------- difus Sun 17 Sep, 2006 01:12 Re: Enabling Html For Administrator Only ----------------------------------- you can study posting_body.tpl in our case it is splited take look at bbcb_mg.tpl, bbcode.tpl and I hope you'll find an answer ----------------------------------- Zuker Sun 17 Sep, 2006 02:34 Re: Enabling Html For Administrator Only ----------------------------------- thanks difus, i will see what i can do ----------------------------------- Mighty Gorgon Sun 01 Oct, 2006 20:10 Re: Enabling Html For Administrator Only ----------------------------------- I think Gomesh already apply a similar mod to XS. Try to contact him. ----------------------------------- Zuker Sun 01 Oct, 2006 20:34 Re: Enabling Html For Administrator Only ----------------------------------- thanks luca, i 'll try to contac him ----------------------------------- Gomesh Mon 02 Oct, 2006 01:06 Re: Enabling Html For Administrator Only ----------------------------------- I apologize me with everybody but I see this alone post in this moment. Well: I have tried to resolve this problem limiting only the use of the code alone html to the Admins and the Moderators (These last solo in the sections in which Moderators result). [code linenumbers=false]# #-----[ 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[/code] If you look well in the code replaced I have used: [b]if ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD) && ( $is_auth['auth_mod'] ))[/b] 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: [b]if ($userdata['user_level'] == ADMIN) && ( $is_auth['auth_mod'] ))[/b] Now: You must add the < table > button in Posting Body: [code linenumbers=false][--OPEN--] forums/templates/templatexxx/bbcb_mg.tpl [--FIND--] {L_BBCB_MG_HIGHLIGHT} [-- AFTER ADD --] {L_BBCB_MG_TABLE}[/code] 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 [b]Profile - Control Panel[/b] (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): [code linenumbers=false][--OPEN--] forums/templates/templatexxx/profile_add_body.tpl [--FIND--] {L_ALWAYS_ALLOW_BBCODE}:    [-- REPLACE WITH --] [/code] 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: [code linenumbers=false][-- OPEN --] forums/templates/templatexxx/posting_body.tpl [--FIND--]
[-- REPLACE WITH --]
-->[/code] These are the changes that I have used for allowing the Admins and the Moderators to use the Code html. Shortly I want to try to use an Option in the ACP to allow the selection of the Users Level for the use of this function. I again apologize me if I have seen now only this Post. Best Regards, Gomesh. ----------------------------------- Mighty Gorgon Mon 02 Oct, 2006 01:10 Re: Enabling Html For Administrator Only ----------------------------------- Thanks for your support Gomesh. You did a good job with BBCodes. :wink: Added to Docs And FAQs ----------------------------------- Zuker Mon 02 Oct, 2006 18:15 Re: Enabling Html For Administrator Only ----------------------------------- The last change must be done on posting_body.tpl, not in bbcb_mg.tpl , right? ----------------------------------- Gomesh Mon 02 Oct, 2006 18:33 Re: Enabling Html For Administrator Only ----------------------------------- [quote user="Zuker" post="3625"]The last change must be done on posting_body.tpl, not in bbcb_mg.tpl , right?[/quote] Yes mate, of course ;) I've correct this error. cYa All. ----------------------------------- Noted_DrAgOn Mon 02 Oct, 2006 18:37 Re: Enabling Html For Administrator Only ----------------------------------- Frau Zucker! This is a good question ----------------------------------- xmenfile Fri 09 Nov, 2007 23:16 Re: Enabling Html For Administrator Only ----------------------------------- How come my turn out insert "Table" bbcode and everyone user can use it. Also, I am missing the icon.