Skip to:
Content
Pages
Categories
Search
Top
Bottom

Allowing Participants to post “unrestricted HTML”


  • thunksalot
    Participant

    @thunksalot

    I have a private WordPress community in which I am not concerned about members posting malicious code. The site is a dues-paying professional networking site and the profession is non-techie, so it would be really odd for someone to get malicious on it, and I have back-ups I can restore with were that to happen. That said, I don’t want to make everyone an Administrator because that gives users control over other people’s content, which I don’t want to give them. I just want to give all Participants the ability to paste unrestricted HTML content so that they can copy and paste from Word or a website and have it come through looking just fine, the way I can as an Admin with the “unrestricted HTML” permission. How can I achieve this?

Viewing 5 replies - 1 through 5 (of 5 total)

  • Robkk
    Moderator

    @robkk

    You can download this plugin and edit the function and add on to it what html tags you want to allow in your forums.

    https://gist.github.com/ntwb/7797990

    You can also just create a new WordPress user role with the capability, but I think going with the plugin I placed above is the best route.


    Jon Fergus
    Participant

    @jon-fergus

    Hi Robkk. I’m interested in allowing unrestricted html for certain known and approved members. I was able to use a User Role editor to allow specific users to post unrestricted html using the unfiltered_html capability, and when I log in with a test member (participant level), I can see the warning “Your account has the ability to post unrestricted HTML content” but when I make a reply with that member the reply doesn’t show up (after I click “submit” the page reloads but there’s no new reply). Seems like it’s being blocked from posting or something. Do you know what else I need to do in order to allow this member to reply with unrestricted html and have it actually work?

    p.s. I tried this https://gist.github.com/ntwb/7797990 but it didn’t solve the problem of regular members not being able to copy/paste from other programs (like Word) without the code showing up in the reply. See here: example of posting before and after adding code to functions.php to enable html formatting


    Jon Fergus
    Participant

    @jon-fergus

    replies with “unrestricted html” issue: top reply is from regular member, second reply is from admin, third reply is from regular member after adding https://gist.github.com/ntwb/7797990 to child theme’s functions.php.
    examples


    Jon Fergus
    Participant

    @jon-fergus

    Correction from the above: after enabling the unfiltered_html capability for a specific user, that user posted a reply, and the reply was set as “spam” by default. So… looks like all I need is to know how to make those replies not be identified as spam. Any ideas?


    Jon Fergus
    Participant

    @jon-fergus

    Update: if you disable “Allow Akismet to actively prevent forum spam” under Settings > Forums, this will allow members who have been given the unfiltered_html capability to post replies freely without them being marked as spam. Aside from fully disabling it, I haven’t found a way to stop Akismet from marking the replies as spam. If anyone knows how, please share.

    Note: use the wordpress plugin “User Role Editor” to enable the unfiltered_html capability. It can be done on a user-by-user basis, so you can select only those you fully trust, or by member roles, so, for instance, you could use “contributor” for those you trust, instead of “subscriber” and enable unfiltered_html for the contributor role.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar