Page 1 of 1

About HTML Posting By Admin

PostPosted: Thu Jun 15, 2006 3:55 pm
Author: badboy
How can i make it so admins post html?

Re: About HTML Posting By Admin

PostPosted: Fri Jun 16, 2006 9:13 pm
Author: Teelk
I was sure there was this feature using configuration+, but I can't find it. So, I think it would require a MOD... you can try something like this, but it's untested and taken from "admins allowed html" by mitsubishi.

Open viewtopic.php
FIND
Code: Select all
    //     // If the board has HTML off but the post has HTML     // on then we process it, else leave it alone     //     if ( !$board_config['allow_html'] || !$userdata['user_allowhtml'])  

REPLACE WITH
Code: Select all
    //     // If the board has HTML off but the post has HTML     // on then we process it, else leave it alone     //     if ( !$board_config['allow_html'] && $postrow[$i]['user_level'] != ADMIN || !$userdata['user_allowhtml'] && $postrow[$i]['user_level'] != ADMIN)

Open posting.php
FIND
Code: Select all
//// End session management//

AFTER ADD
Code: Select all
if ($userdata['user_level'] == ADMIN){         $board_config['allow_html'] = 1;}

Open includes/topic_review.php
FIND
Code: Select all
    $sql = "SELECT u.username, u.user_id, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid  

REPLACE WITH
Code: Select all
$sql = "SELECT u.username, u.user_id, u.user_level, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid

FIND
Code: Select all
            //             // If the board has HTML off but the post has HTML             // on then we process it, else leave it alone             //             if ( !$board_config['allow_html'] && $row['enable_html'] )

REPLACE WITH
Code: Select all
                 // If the board has HTML off but the post has HTML                         // on then we process it, else leave it alone                         //                         if ( !$board_config['allow_html'] && $row['enable_html'] && $row['user_level'] != ADMIN )


But, as I said, this is untested so if you want to use it backup these three files first.

EDIT: I should also mention that HTML needs to be turned off for this MOD to work and you also need to fill out the allowed HTML tags in ACP>Configuration.

Re: About HTML Posting By Admin

PostPosted: Sat Jun 17, 2006 3:45 am
Author: Dr. Bantham
There appear to be multiple MOD solutions for this out there:
[url=http]HTML BBcode MOD[/url]
[url=http]HTML enable for ADMINs and MODs only[/url]
[url=http]HTML Enabled for Administrators Only[/url]

I believe the last two are listed as "In Development". I understand there may be security issues with allowing HTML. I am not certain how well each of these MODS may address this concern.

PostPosted: Sat Jun 17, 2006 9:19 am
Author: badboy
[quote=""Teelk";p="9594""]
I was sure there was this feature using configuration+, but I can't find it. So, I think it would require a MOD... you can try something like this, but it's untested and taken from "admins allowed html" by mitsubishi.

Open viewtopic.php
FIND
Code: Select all
    //     // If the board has HTML off but the post has HTML     // on then we process it, else leave it alone     //     if ( !$board_config['allow_html'] || !$userdata['user_allowhtml'])  

REPLACE WITH
Code: Select all
    //     // If the board has HTML off but the post has HTML     // on then we process it, else leave it alone     //     if ( !$board_config['allow_html'] && $postrow[$i]['user_level'] != ADMIN || !$userdata['user_allowhtml'] && $postrow[$i]['user_level'] != ADMIN)

Open posting.php
FIND
Code: Select all
//// End session management//

AFTER ADD
Code: Select all
if ($userdata['user_level'] == ADMIN){         $board_config['allow_html'] = 1;}

Open includes/topic_review.php
FIND
Code: Select all
    $sql = "SELECT u.username, u.user_id, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid  

REPLACE WITH
Code: Select all
$sql = "SELECT u.username, u.user_id, u.user_level, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid

FIND
Code: Select all
            //             // If the board has HTML off but the post has HTML             // on then we process it, else leave it alone             //             if ( !$board_config['allow_html'] && $row['enable_html'] )

REPLACE WITH
Code: Select all
                 // If the board has HTML off but the post has HTML                         // on then we process it, else leave it alone                         //                         if ( !$board_config['allow_html'] && $row['enable_html'] && $row['user_level'] != ADMIN )


But, as I said, this is untested so if you want to use it backup these three files first.

EDIT]

if i wanna add something like this
[code]<a href="http]

what tag should i add to the list

PostPosted: Sun Jun 18, 2006 2:05 am
Author: Adrian Rea
Also please be aware that recent phpbb updates have caused a big headache for those wanting to post HTNL. phpBB have tried to restrict HTML posting to the point that it often does not work.

The team are looking into it but it will probably come down to whether the gain outweighs the risk.

A

PostPosted: Sun Jun 18, 2006 1:49 pm
Author: Teelk
"badboy";p="9628" wrote:if i wanna add something like this
Code: Select all
<a><embed></embed><br>Get Music Video Codes by VideoCodeLibrary.com</a>


what tag should i add to the list
You'll need a and embed I believe.

Re: About HTML Posting By Admin

PostPosted: Thu Jun 22, 2006 4:45 pm
Author: sanji
I too am trying to allow the use of some specific html code in posts (cf http://www.integramod.com/forum/viewtop ... highlight=).

The mods mentionned above can be used, but they do not allow to select which html tags can be used. In fact, "HTML BBcode MOD" would be perfect, except that I need all members to be able to post with some html tags. Some one, allowing all tags is probably too dangerous...

I would like to be able to post the following code:

Code: Select all
 NOTE ]

Is there any way to do things simple? For example, it seems impossible to get the first line working. Every time I post it, I only get :

[code](div class="GMapEZ")


And the rest of the line disappeared...

I understand the safety issues with html code, but it is really a pity not to have a simple way to allow some html.

Any advice very welcomed.

sanji