[wp-hackers] Regional Author Groups and Permission

Stephen Harris contact at stephenharris.info
Sun Aug 11 18:18:58 UTC 2013


Event Organiser Pro doesn't support mu integration with regards to 
sharing events across sites (but Event Manager does). At the request of 
someone I did add support for ThreeWP broadcast ( 
http://wordpress.org/plugins/threewp-broadcast/) - but I never say that 
anywhere outside of the sourcecode :), and it's not something I actively 
support for reasons below. Pro comes with its owns booking management, 
so there's no WooCommerce integration.

Personally I think using multisite to 'divide' a site is the wrong 
approach to use for the simple reason that multisite is very much 
intended for situations where you have completely independent sites 
which may share a user base. I think the typical example is usually 
WordPress.com - and if that's not similar to what you're trying to 
achieve, you'll be going against the grain and probably find you'll end 
up with 'hacky' code or low performance or both. Unfortunately it was 
not designed to, and cannot in a particularly 'clean' way, share content 
between network sites.

I would use pre_get_posts to filter the admin pages so that only users 
with the appropriate permissions can view the posts - that is restrict 
events to those in regions to which the user belongs. With regards to 
editing posts you can use the map_meta_cap ( 
http://codex.wordpress.org/Function_Reference/map_meta_cap) filter to 
essentially allow/disallow a user to edit a post. For example create a 
capability 'edit_other_regions_events', and when the user's permission 
to edit an event is being determined, check the region of the event's 
venue and if the user does not belong to that region add that capability 
as a requirement. Or if in your context 'region' is its  own taxonomy, 
that would work just as well.

If the drop-down selection of the event author needs to be limited 
depending on the event's region, that is not impossible, but 
considerably more fiddly.

I hope that helps in some way :)
Stephen

> ----- Original Message -----
> From: "David Churchill" <davinian at mac.com>
> To: <wp-hackers at lists.automattic.com>
> Sent: Friday, August 09, 2013 6:17 PM
> Subject: [wp-hackers] Regional Author Groups and Permission
>
>
> 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
> booking/tickets/payments.
>
> 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,
> David
>
>
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
> ------------------------------
>
> End of wp-hackers Digest, Vol 103, Issue 14
> *******************************************



More information about the wp-hackers mailing list