[wp-hackers] Regional Author Groups and Permission
jonathanbrinley at gmail.com
Fri Aug 9 14:55:23 UTC 2013
For your purposes, I would definitely discourage using multi-site (see
many reasons why). But you'll definitely need to write some code to
make all this happen with Events Calendar Pro.
Here's how I would probably go about it:
1. Have a way to assign users to groups (one of the groups plugins you've
tried probably does this reasonably well). You don't really need this to
manage permissions, jut manage the assignment of users to groups.
2. To prevent users from editing events from other groups: Write some code
that hooks into 'user_has_cap'. If the current user isn't in the same group
as the author of the event, remove caps like 'edit_tribe_event',
3. To only show events for the current user's group: Add in a
'pre_get_posts' filter in the admin. You'll get a list of users in the
current user's group, and add their IDs to the 'author' query var.
Have a nice day,
On Fri, Aug 9, 2013 at 6:17 AM, David Churchill <davinian at mac.com> wrote:
> Hi, I need some advice on the best way to approach building an
> event/booking website with multi author support.
> The idea is one website listing lots of regional events. Users can
> geo-search events based on name, town, city and zip/post code with a
> distance radius in miles (5,10,25 etc). Then book the event online via
> PayPal and other payment gateways.
> I have all of this working using Events Calendar Pro (Modern Tribe), Geo
> my WP (free plugin) for the geo-search, WooCommerce and WooTickets for the
> What I am struggling with is how best to setup regional authors. I would
> ideally like to create regional groups with a main coordinator and a number
> of event publishers under the each region.
> Each publisher will be able to create/publish edit/delete their own
> events, but not any other publishers (ideally other publishers events need
> to be hidden in the backend). The coordinators will be able to
> create/publish and edit/delete their own events and those belonging to the
> publishers in the same group (so see all events by all publishers in the
> same regional group). They will be able to publish events on behalf of the
> publishers, so will need to be able to select the author in the Author
> drop-down list. There will be a number of regional groups and all the
> events in each group will need to be hidden from the other groups. Hope
> this is making sense?
> I have looked at a number of group based plugins, but they all appear to
> work by setting the permissions on a per event (post) based system which
> will not work as it will rely on publishers setting this very time.
> I have also looked at a network/mu install of WordPress and think this is
> probably the best approach, but Events Calendar Pro currently doesn't
> support sharing the events back to the main network site — ideally all mu
> sites will only be used for adding content and not visible by the end user.
> There is another event plugin called Events Organiser Pro which does
> support mu integration and saves all events in the main network sites db
> but doesn't support WooCommerce.
> Another possible idea would be to create front-end templates for
> publishers so that they can add/edit and view their own events.
> So (apologies for long-winded question), but does anybody have any
> recommendations or suggestions for managing groups and users where their
> content is ring-fenced/hidden from other groups/users. I'm happy to hack
> code if this is something that could be done in code.
> Thanks in advance,
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
Jonathan M. Brinley
jonathanbrinley at gmail.com
More information about the wp-hackers