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
Enabling Html For Administrator Only
Subject: 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
http://www.digi-sky.net/mums/downloads.php?view=detail&id=24
It is cool mod I like it :D
Subject: Re: Enabling Html For Administrator Only
thanks difus, i m going to edit the other files now ;)
Subject: Re: Enabling Html For Administrator Only
difus what did you do on this part?
- #-----[ 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 ]------------------------------------------------
- #
- <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">
- {POST_PREVIEW_BOX}
- {ERROR_BOX}
- #
- #-----[ REPLACE WITH ]----------------------------------------
- #
- {POST_PREVIEW_BOX}
- {ERROR_BOX}
- <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">
Subject: 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
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
Subject: 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
in our case it is splited
take look at bbcb_mg.tpl, bbcode.tpl and I hope you'll find an answer
Subject: Re: Enabling Html For Administrator Only
I think Gomesh already apply a similar mod to XS. Try to contact him.
Subject: Re: Enabling Html For Administrator Only
Last edited by Gomesh on Mon 02 Oct, 2006 18:30; edited 1 time in total
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).
If you look well in the code replaced I have 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:
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):
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:
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.
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).
#
#-----[ 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 I have 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--]
forums/templates/templatexxx/bbcb_mg.tpl
[--FIND--]
<a href="javascript:BBChl()" ><img border="0" src="{BBCB_MG_IMG_PATH}spoil.gif" name="highlight" type="image" onMouseOver="helpline('highlight')" alt="{L_BBCB_MG_HIGHLIGHT}" title="{L_BBCB_MG_HIGHLIGHT}" /></a>
[-- AFTER ADD --]
<a href="javascript:BBCtable()"><img border="0" src="{BBCB_MG_IMG_PATH}table.gif" name="table" type="image" onMouseOver="helpline('table')" alt="{L_BBCB_MG_TABLE}" title="{L_BBCB_MG_TABLE}" /></a>
forums/templates/templatexxx/bbcb_mg.tpl
[--FIND--]
<a href="javascript:BBChl()" ><img border="0" src="{BBCB_MG_IMG_PATH}spoil.gif" name="highlight" type="image" onMouseOver="helpline('highlight')" alt="{L_BBCB_MG_HIGHLIGHT}" title="{L_BBCB_MG_HIGHLIGHT}" /></a>
[-- AFTER ADD --]
<a href="javascript:BBCtable()"><img border="0" src="{BBCB_MG_IMG_PATH}table.gif" name="table" type="image" onMouseOver="helpline('table')" alt="{L_BBCB_MG_TABLE}" title="{L_BBCB_MG_TABLE}" /></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--]
forums/templates/templatexxx/profile_add_body.tpl
[--FIND--]
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td>
<td class="row2">
<label><input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} /><span class="gen"> {L_YES}</span></label>
<label><input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} /><span class="gen"> {L_NO}</span></label>
</td>
</tr>
[-- REPLACE WITH --]
<!--
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td>
<td class="row2">
<label><input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} /><span class="gen"> {L_YES}</span></label>
<label><input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} /><span class="gen"> {L_NO}</span></label>
</td>
</tr>
-->
forums/templates/templatexxx/profile_add_body.tpl
[--FIND--]
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td>
<td class="row2">
<label><input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} /><span class="gen"> {L_YES}</span></label>
<label><input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} /><span class="gen"> {L_NO}</span></label>
</td>
</tr>
[-- REPLACE WITH --]
<!--
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td>
<td class="row2">
<label><input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} /><span class="gen"> {L_YES}</span></label>
<label><input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_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 --]
forums/templates/templatexxx/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 -->
-->
forums/templates/templatexxx/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 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.
Last edited by Gomesh on Mon 02 Oct, 2006 18:30; edited 1 time in total
Subject: Re: Enabling Html For Administrator Only
Thanks for your support Gomesh. You did a good job with BBCodes. :wink:
Added to Docs And FAQs
Added to Docs And FAQs
Page 1 of 2
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.1019s (PHP: 22% SQL: 78%)
SQL queries: 13 - Debug Off - GZIP Enabled