To jest tylko wersja do druku, aby zobaczyć pełną wersję tematu, kliknij TUTAJ
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

F.A.Q. - Read it first! - HTML on forum - how to enable it?

Matteo - 05-09-2010, 15:54
Temat postu: HTML on forum - how to enable it?
To enable the ability to use html in posts, you should:
in AP > General Admin > Configuration > Posting > set:
Allow HTML: Yes
Allow HTML for Admin's: Yes
Allow HTML for JuniorAdmin's: Yes
Allow HTML for Moderator's: Yes


At the same time, these settings should be dependent on whom we want to use html in the forum. If only to admin's Allow HTML for Admin's: Yes etc.

Now you must determine to which tags we give this permission. Default are already entered:
Kod:
b,i,u,pre

If you want to use other, you must add, separated by commas, no spaces.
Ex. to had possibility to use codes from youtube, you need tags:
Kod:
embed,object

You must added this by code, which we want to apply.

Next in AP > General Admin > Configuration > Profile > set:
Always allow HTML
Whether during registration as well as edition of profile, to show the field "Always allow HTML" ?(It be engaged significantly): [b]Yes


Next step is enable HTML when you making a post. You can do this during the posting - unmark option Disable HTML in this post, or by modify file posting.php.
FIND:
Kod:
$s_html_checked = (($html_on && $mode == 'editpost') || ($preview && !isset($HTTP_POST_VARS['disable_html'])) ) ? '' : 'checked="checked"';
REPLACE WITH:
Kod:
$s_html_checked = (($html_on && $mode == 'editpost') || ($preview && !isset($HTTP_POST_VARS['disable_html'])) ) ? '' : '';

After this operation, this field been automaticly unmarked.
You can do this also with quick reply.
templates/name_of_template/quick_reply.tpl
FIND:
Kod:
<input type="hidden" name="disable_html" value="1" />
REPLACE WITH:
Kod:
<input type="hidden" name="disable_html" value="0" />
and in posting.php
FIND:
Kod:
if ( !$HTTP_POST_VARS['disable_html'] )
{
    $s_html_checked = (($html_on && $mode == 'editpost') || ($preview && !isset($HTTP_POST_VARS['disable_html'])) ) ? '' : 'checked="checked"';
}
else
{
    $s_html_checked = 'checked="checked"';
}
REPLACE WITH:
Kod:
if ( !$HTTP_POST_VARS['disable_html'] )
{
    $s_html_checked = (($html_on && $mode == 'editpost') || ($preview && !isset($HTTP_POST_VARS['disable_html'])) ) ? '' : '';
}
else
{
    $s_html_checked = '';
}


(original content)



Powered by phpBB modified by Przemo © 2003 phpBB Group