Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 2
Goto page 1, 2  Next
 
Reply with quote Download Post 
Post 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
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
can you show results for this and link for mod ?
 




____________
*VOLVO CLUB*
 
difusSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
the link for the mod

http://www.phpbb.com/phpBB/viewtopic.php?t=235489
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
thanks

I'll try and let you know
 




____________
*VOLVO CLUB*
 
difusSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
Thanks to you difus
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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  
 




____________
*VOLVO CLUB*
 
difusSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
thanks difus, i m going to edit the other files now
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
difus what did you do on this part?

Code: [Download] [Hide]
  1. #-----[ OPEN ]------------------------------------------------  
  2. #  
  3. #  NOTE --- You need to do this for all of your installed template styles  
  4. #  
  5. templates/subSilver/posting_body.tpl  
  6. #  
  7. #-----[ FIND ]------------------------------------------------  
  8. #  
  9. #  NOTE --- the actual line to find is MUCH longer, containing all the bbcode tags  
  10. #  
  11. bbtags = new Array(  
  12. #  
  13. #-----[ AFTER, ADD ]------------------------------------------  
  14. #  
  15. //+MOD: HTML BBCode MOD  
  16. bbtags[bbtags.length] = '[html]';  
  17. bbtags[bbtags.length] = '[/html]';  
  18. //-MOD: HTML BBCode MOD  
  19. #  
  20. #-----[ FIND ]------------------------------------------------  
  21. #  
  22. <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">  
  23.  
  24. {POST_PREVIEW_BOX}  
  25. {ERROR_BOX}  
  26. #  
  27. #-----[ REPLACE WITH ]----------------------------------------  
  28. #  
  29. {POST_PREVIEW_BOX}  
  30. {ERROR_BOX}  
  31.  
  32. <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"> 

 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 




____________
*VOLVO CLUB*
 
difusSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 




____________
*VOLVO CLUB*
 
difusSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
thanks difus, i will see what i can do
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
I think Gomesh already apply a similar mod to XS. Try to contact him.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
thanks luca,
i 'll try to contac him
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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: [Download] [Hide] [Select]
#
#-----[ 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:

Code: [Download] [Hide] [Select]
[--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>


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):

Code: [Download] [Hide] [Select]
[--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">&nbsp;{L_YES}</span></label>&nbsp;&nbsp;
        <label><input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} /><span class="gen">&nbsp;{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">&nbsp;{L_YES}</span></label>&nbsp;&nbsp;
        <label><input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} /><span class="gen">&nbsp;{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:

Code: [Download] [Hide] [Select]
[-- OPEN --]

forums/templates/templatexxx/posting_body.tpl

[--FIND--]

                    <!-- BEGIN switch_html_checkbox -->
                    <label><input type="checkbox" name="disable_html" {S_HTML_CHECKED} />&nbsp;{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} />&nbsp;{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.
 




____________
In Memory of mrTrade

La maturit? della gente si evince da quel dice, non da quello che racconta.
 
Last edited by Gomesh on Mon 02 Oct, 2006 18:30; edited 1 time in total 
GomeshSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Enabling Html For Administrator Only 
 
Thanks for your support Gomesh. You did a good job with BBCodes.

Added to Docs And FAQs
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 2
Goto page 1, 2  Next


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You 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