Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem with a group forum dice roller


  • vulneratum
    Participant

    @vulnertum

    I installed the BuddyPress Group Dice plugin before buddypress 1.6.1 and it worked fine… then I upgraded.

    In a new Group Forum Post the dice roller works perfectly once. When I try and run it again, I get: “It looks like you’ve already said that!”

    I’m not sure if this plugin is supported anymore but I love it…. is there anything I can do to fix this?

    I have found the function that the dice roller is triggering:

    // Don’t allow reply flooding
    if ( bp_forums_reply_exists( $_POST, $topic_id, bp_loggedin_user_id() ) ) {
    bp_core_add_message( __( ‘It looks like you’ve already said that!’, ‘buddypress’ ), ‘error’ );

    Now I don’t want to allow flooding… but I would like it to ignore my dice roller… now what?

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

  • grafics
    Participant

    @grafics

    It appears that the check for this is coming from bp-groups-screens.php. The dice roller produces the same “Dice Roll” text each time so it’s being seen as a duplicate.
    There has to be some way to add another check for the dice roller text, but not sure how to do that.
    Perhaps a function that would override? Anyone have ideas?


    grafics
    Participant

    @grafics

    This is crude and requires hacking core file, but until a better fix is found this seems to be working.
    In the file, bp-forums-functions.php (located in buddypress>bp-forums) I added $text = ‘dice roll’
    to line 354. So it now looks like
    `function bp_forums_reply_exists( $text = ”, $text = ‘dice roll’, $topic_id = 0, $user_id = 0 ) {
    $reply_exists = false;`

    Tried several successive dice rolls and they posted correctly. You’re mileage may vary! It also seems to allow duplication of regular text replies as well, so that’s not ideal.
    I’d much rather have a function or better yet, an update to the plugin, but this seems to work for now.


    vulneratum
    Participant

    @vulnertum

    Thanks!!!! this fixed it!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with a group forum dice roller’ is closed to new replies.
Skip to toolbar