Skip to:

non-group-member message to group

  • stefwilliams


    I need to allow non-members of a group to post to a group’s message board so as to allow incoming requests from non-members.

    My original plan was to remove the home tab and avoid using the group messaging functionality as it stands, so as to have a new ‘Email group’ form in the widget area of each group, which would be visible to everyone who had access to that page (group-members and non-group members).

    This would then fire an email to all the registered users of the group. The more I think about it though, the more work this approach would involve, ie, to be able to see past emails, and reply to emails, etc…

    So, I’ve since decided that it would probably be easier to enable the group messaging option, but then have a messaging form visible to non-members of the group, with the form simply inserting the content into the bp_activity table, as per a registered group member (maybe highlighting it as an external message).

    I guess I could probably do a straight wpdb insert off the form, but is there a bp function that would allow me to do this more sensibly?

    Also, would there be any problem with this approach? ie, are there any checks in place that would only show messages posted by members of the group?

    If there is no option other than the wpdb insert, I guess then my only question is what to insert in some of the fields:

    item_id: I assume this is the id of the group that the message is aimed at?
    secondary_item_id: what’s that?
    mptt_left and mptt_right: something to do with table traversing? If I insert default value of 0 will that be ok, or do I need to do more?

    Any help very much appreciated 🙂

Viewing 1 replies (of 1 total)

  • stefwilliams


    Actually, to answer some of my own questions, it seems item_id is only the group id for a first message (which these types of message will always be).

    secondary_id is used if there’s a reply/comment to a message, so for these purposes I can keep it as 0.

    And the mptt values get updated with new replies and comments, so, again, for first messages such as the ones I’ll be inserting, a value of 0 for everything should be fine.

    Would still like to know if there’s a BP function I can use to do the job though – and any potential pitfalls I might be missing. I am by no means an experienced coder…


Viewing 1 replies (of 1 total)
  • The topic ‘non-group-member message to group’ is closed to new replies.
Skip to toolbar