• Resolved bluesoul

    (@bluesoul)


    I’m trying to implement this for a church that would basically be using one category for logistics (who’s in what room at what time, etc.) The other categories are public and correspond to locations in the church. I need to do one of two things:

    1.) Be able to set up two calendar pages, one for the private category and one for everything else.
    or 2.) Be able to set a filter as default when the Calendar page is loaded, that shows all categories but the private category.

    Anyone needed to do something like this in the past? Any suggestions?

    http://wordpress.org/extend/plugins/all-in-one-event-calendar/

Viewing 12 replies - 1 through 12 (of 12 total)
  • There isn’t a specific way to have events as private, unless the users viewing are logged in as a specific user group – you could have the events for example set to Draft and only they would be able to see those.

    For having a default category selected, you could modify a link to link directly to the calendar with a category ID specified. We are going to implement a shortcode feature so you can load calendars with specific category/tags/etc on pages

    Thread Starter bluesoul

    (@bluesoul)

    If I understand how the plugin works correctly, the events are a type of post, so I need to lower the threshold to allow a certain usergroup to be able to save/read drafts? And then they’d be able to see it and not publish? That would be ideal, take the possibility of them inadvertently publishing it to the public calendar out. Is that what you’re telling me?

    Thread Starter bluesoul

    (@bluesoul)

    Missed the edit deadline, so…

    According to the codex article, I can just make the relevant users contributors? That will work in place of multiple calendars for now. Thanks for the tip.

    Yes, that is the idea I would follow. I haven’t tested exactly something like this, but it should be possible.

    Thread Starter bluesoul

    (@bluesoul)

    Okay, it halfway works. The draft still shows up in the widget and in the calendar page, but when you click the event it goes to a 404 page. I don’t know of that’s really going to be sufficient in this case, though.

    Please make sure you are using the newest version – 1.2.2

    Thread Starter bluesoul

    (@bluesoul)

    I’ve updated to 1.2.2 and now the problem is that draft events don’t show up in the widget or on the calendar page at all, even when logged in as an Admin. I see them in the “All Events” menu but that’s not going to be sufficient in this use case. Any other ideas?

    Thread Starter bluesoul

    (@bluesoul)

    Any ideas?

    Hi,

    To followup, we are now ensuring Events follow the normal WP permissions for draft/private, so your use case won’t work without some customization

    For example, you could modify:
    _get_post_status_sql()
    in app/helper/class-ai1ec-calendar-helper.php

    We could offer paid customization through:
    theseednetwork.com/get-supported/

    Thread Starter bluesoul

    (@bluesoul)

    Okay, looking at that page I see this snippet:

    if( current_user_can( 'administrator' ) || current_user_can( 'editor' ) )
    		{
    			// User has privilege of seeing all published and private posts
    
    			$post_status_where = "AND ( post_status = %s OR post_status = %s ) ";
    			$args[]            = 'publish';
    			$args[]            = 'private';

    Appending another || current_user_can( 'contributor' ) gives the appropriate permission set for my use case, since the blog aspect of it is really not being used and the private posts are not necessary for anything else.

    Thanks for the follow up, I now have the behaviors I need. Will be recommending your plugin to future clients!

    @bluesoul
    If you still need help with this task you may get in touch with me via our premium support.

    Hi I did just that and changed the code to ‘subscriber’ but when I checked the subscriber can see the event in the calendar but when you click read more it takes you to a page that says:

    No Results Found

    The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.

    Therefore my subscriber cannot see the event, and most of the event is already public.

    Additionally I added the widget page restrict, which does not restrict the calendar from being viewed, only text inside of the calendar page before your calendar is added. If I want to read more it will ask for a password, but by then most of the even ti s already shown.

    Can you help??

    I can PM the web address.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] Default filter on main calendar page?’ is closed to new replies.