Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress Forum Posts: how to allow full HTML embed, div and object tags? (no limitations)

  • Hello. I have a controlled network for filmmakers, directors and other audio-visual artists in development over at http://1.subvex.com
    I’m running the very latest Buddypress and WordPress 3.0.1. The network is exclusive to a limited number of people, and accounts are opened by invitation only: I have no trust issues with the userbase, as we all work with each other all the time. To this end, here’s my question:
    rather than run a blog I would like to allow the members to be able to post full-HTML in forum posts: including div, swf, iframe and object/video embed tags (priority is Vimeo) in Group Forum Posts. I would like these forum posts to be visible to the wider web/site visitors.
    Subvex uses group functionality over and above everything else. By keeping all actions visible and centralised in groups, we can manage productions (in early stages) via the website.

    Right now I have HTML functionality set for group members with this addition to FUNCTIONS.PHP

    if( bp_group_is_member()) {
    remove_filter( ‘groups_group_description_before_save’, ‘wp_filter_kses’, 1 );
    remove_filter( ‘bp_get_group_description’, ‘bp_groups_filter_kses’, 1 );
    remove_filter( ‘bp_get_the_topic_post_content’, ‘bp_forums_filter_kses’, 1 );
    }

    but when logged out, the html is stripped again and that defeats the purpose. Non-member visitors can see nothing.

    How can I completely remove the code stripping from Buddypress forums and therefore allow visitors to the site to be able to read, watch and (in the case of the flash animation module embeds) interact with the content members will post?

    Thanks in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • you can add allowed tags via the filter bp_forums_allowed_tags but deep within bbPress there is another hook for `add_filter(‘pre_post’, ‘bb_encode_bad’);` and will convert certain tags. (look at the file bp-forums/bbpress/bb-includes/functions.bb-formatting.php)

    OK that makes sense: except that I am unfamiliar with the exact tags I need to add, and searching about has left me confused:
    am I right in thinking this would be
    $forums_allowedtags = array(); for flash
    $forums_allowedtags = array(); for vimeo …. ( or $forums_allowedtags = array(); )
    $forums_allowedtags = array(); for audio
    $forums_allowedtags = array(); for movs
    ?
    or is it completely wrong (file extensions are not the answer) ? is their a codex somewhere that can show me the exact tags I need to add?
    that’s essentially all we need and I can finish the site…

    the problem exactly can be seen on this post-
    http://1.subvex.com/groups/screening-room/forum/topic/anamnesis-1969-frans-zwartjes/

    when logged in the site displays a vimeo film in the middle space. logged out… well you can see for yourself: de nada.

    thank you for your help,
    T

    I know I can use the oembed plugin btw: but it doesnt allow you to set the exact dimensions or adjust the parameters of the film embedded, so it’s no good for this. and it doesnt do flash.

    Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

    $forums_allowedtags = array();
    $forums_allowedtags = array();
    $forums_allowedtags = array();
    $forums_allowedtags = array();
    $forums_allowedtags = array();
    $forums_allowedtags = array();
    $forums_allowedtags = array();
    $forums_allowedtags = array();
    $forums_allowedtags = array();

    @modemlooper, @etiviti
    THANK YOU!
    perfect, awesome : )
    –you are both stars
    T

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

You must be logged in to reply to this topic.