• Hey Stephen,

    I was wondering if you’ve seen anything or know anything about setting up private events. I would like users to be able to set up events with the option of visibility of the event being either publicly visible, visible to friends, or invite only. Any idea on how to do this?

    I assume I can hide the content by simply checking friends, or checking if an invite was sent (I set up my own custom invites system, though I may have to fine tune it more as of right now as it is just piggy backing off of buddypress notifications).

    If it helps at all, I am currently using your “Front-end” post creation snippet so users create events through that and never see the wp-admin screen.

    https://wordpress.org/plugins/event-organiser/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    Hi godavid33,

    You mentioned you purchased Pro, so can I ask you to post any future questions on these forums. You can post questions (as long as they relate to the free version), but the customer forums allow me to prioritise customers, and they get a more attention (I’ve been unusually active here in the last few days).

    This is an interesting problem though :). And I’m not overly familiar with BuddyPress, but here’s an outline of what I’d do:

    1. Register additional post status to include ‘invite only’ and ‘friends only’. Unfortunately WordPress’ UI won’t recognise these, so you’d either need to replace it, or you could use custom fields (but this is not as efficient), albeit slightly easier to implement.

    2. Modify the SQL query (posts_request hook is good for this) to include events of ‘friends_only’ if the organiser (post_author column!) is a friend of the current user.
    … or if the event ID is in a list of events the current user has been invited to.

    Without digging into BuddyPress I can’t fill in the details of the how to retrieve the current user’s friends and/or invited events. But it should be fairly straightforward. Modifying the SQL query maybe tricky, so as mentioned you could use custom fields and add a meta_query at pre_get_posts (as opposed to modifying SQL at posts_request). But querying by metadata can be slow.

    Depending on how much architecture you want to throw at the problem you could have a user-event table used for linking a user with the ‘invite only’ and ‘friends only’ events that they can see.

    If you don’t register custom statuses, you should be sure to make ‘invite only’ and ‘friends only’ events private so they don’t show by default.

    Thread Starter godavid33

    (@godavid33)

    “Depending on how much architecture” Always the question my friend. Thanks for your input, this is similar to what I was leaning towards but your answer definitely fills in the gaps.

    I will post to the paid customer plugins from now on (unless it pertains specifically to the free version)! As you said, I noticed you were particularly active here so I figured this was as good a place as any and it would also help anyone w/ similar questions out, given wordpress support forum indexes relatively quickly and well by google.

    See you on the paid forums!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Setting up private events?’ is closed to new replies.