Skip to:
Content
Pages
Categories
Search
Top
Bottom

Needing a return variable for the group forum topic !


  • victor
    Participant

    @krazin

    Hello everyone.

    I am doing a filter for forums topics and posts wich denies a user of posting a content with badwords that were previously registered with the WP Content Plugin.
    I set the error message when a bad word is found, but i cant send the user back cause BP Forums dont have an identifier for the location !

    So in my filter-function in file bp-forums/bp-forums-filters.php , whe a badword is found :

    bp_core_add_message(utf8_encode(“The word $word is forbidden in this site. “),”error”);
    bp_core_redirect( $bp->root_domain . ‘/’ . $bp->groups->slug . ‘/’ . $bp->groups->current_group->slug . ‘/’ . ‘forum/topic’ . ???? ; );

    What to use in ” ???? ” ?

    And other question is:
    Is there an automatted way to recover the content entered by the user in these posts, so he doesnt have to type it all over again ?

Viewing 1 replies (of 1 total)
  • For the first question, I don’t know where you are hooking your code into. Are you able to use bp_get_the_topic_permalink()?
    For the second, no. You’d have to pass along that text with the page redirect in, i.e. $_GET, and then hook into an action so you can squirt the text back into reply_text textbox with Javascript.

    If you submit an enhancement ticket for this on https://trac.buddypress.org/, we could add such an action in to make it easier.

Viewing 1 replies (of 1 total)
  • The topic ‘Needing a return variable for the group forum topic !’ is closed to new replies.
Skip to toolbar