About HTML Posting By Admin

Support for IntegraMOD 140

Moderator: Integra Moderator

About HTML Posting By Admin

PostAuthor: badboy » Thu Jun 15, 2006 3:55 pm

How can i make it so admins post html?
Last edited by badboy on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://img50.imageshack.us/img50/2371/userbar19iy.gif[/img][/url]
User avatar
badboy
Members
Members
 
Posts: 46
Likes: 0 post
Liked in: 0 post
Joined: Sun May 21, 2006 1:03 am
Cash on hand: 0.00

Re: About HTML Posting By Admin

PostAuthor: Teelk » Fri Jun 16, 2006 9:13 pm

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.
Last edited by Teelk on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 6:25 pm
Cash on hand: 0.00
Location: Canada

Re: About HTML Posting By Admin

PostAuthor: Dr. Bantham » Sat Jun 17, 2006 3:45 am

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.
Last edited by Dr. Bantham on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Dr. Bantham
Integra Member
Integra Member
 
Posts: 152
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 6:25 pm
Cash on hand: 0.00

PostAuthor: badboy » Sat Jun 17, 2006 9:19 am

[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
Last edited by badboy on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://img50.imageshack.us/img50/2371/userbar19iy.gif[/img][/url]
User avatar
badboy
Members
Members
 
Posts: 46
Likes: 0 post
Liked in: 0 post
Joined: Sun May 21, 2006 1:03 am
Cash on hand: 0.00

PostAuthor: Adrian Rea » Sun Jun 18, 2006 2:05 am

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
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

PostAuthor: Teelk » Sun Jun 18, 2006 1:49 pm

"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.
Last edited by Teelk on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 6:25 pm
Cash on hand: 0.00
Location: Canada

Re: About HTML Posting By Admin

PostAuthor: sanji » Thu Jun 22, 2006 4:45 pm

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
Last edited by sanji on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:18 pm
Cash on hand: 0.00


Return to IntegraMOD 140

Who is online

Registered users: Google [Bot], Majestic-12 [Bot], Vendethiel

cron