Need to be able to parse calendar based on login credentials

Home Forums Calendar Products Events Calendar PRO Need to be able to parse calendar based on login credentials

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1090412
    Craig Grant
    Participant

    I have a multi-site license for Events Calendar Pro and one of the sites we have it installed on wants to be able to show 2 different versions of the calendar. One version will only display classes will be accessible on the public site. The other version will include classes, events and meetings they want only accessible on the private intranet (which is only available to members who have logged in which we can verify based on credentials and session cookie). We would like to be able to have the calendar widget which links to the full calendar page on the home page (public) and intranet welcome screen (private/logged in) but again only filtered to the type of calendar item it is and filtered by user type (public versus private/logged in).

    So Is it possible to filter the Events Calendar Pro plugin to do this and if so please provide instructions or documentation for us to follow to do this or any alternative method of pulling off what we are trying to achieve.

    #1090521
    George
    Participant

    Hey Craig,

    Thanks for reaching out. What you describe is unfortunately not possible through any default, or “out-of-the-box”, means with our plugins.

    To any extent that it is possible, custom code will be required. We unfortunately cannot help with custom coding, so you essentially have to take the reins on implementing this “dual calendar” configuration on your site.

    There are numerous ways to go about doing this. I will write another reply here showing the simplest method, which essentially just relies on custom CSS. This is the only method I can share here, as it’s the simplest. The other methods are very complex and require much PHP-level code-customizing. If you’re interested in these more complex/complete solutions, you would have to write that custom code or hire a professional developer to write the code for you. We have a list of great developers here → http://m.tri.be/18k1 (and have no affiliation with any of these folks—they’re simply some well-respected names in the community that we’ve compiled to share in situations like this one).

    Stay tuned for my next reply, which will cover the basic method of doing this with CSS and event categories.

    Thank you,
    George

    #1090534
    George
    Participant

    A Simple Method for Achieving Two Calendars

    There is a simple way to selectively hide events from non-logged-in users, but have those events displayed everywhere on your site for users who are logged-in.

    It works in three parts:

    Part 1. Make an Event Category site that all “hidden for non-logged-in users” Events will be categorized in. If an event should be hidden from non-logged-in users, put it in this category.

    Part 2. Write some CSS to hide all events in that category on your site by default.

    Part 3. Write some more CSS to SHOW the events in that category IF the current user is logged in.


    Part 1: Make an Event Category

    This is the category that will help identify which events should be visible only to logged-in users on the front end. Here are two screenshots, where the first one shows the creation screen of my “Members Only” example category, and the second one shows the application of this Category to an example event:


    Part 2: Write CSS to Universally Hide That Category

    Once you publish that event, it will, of course, show up on the day on which it will occur:

    The Event Category I created was called “members only”, with the slug “members-only”, so to hide these events with CSS you just add CSS like this:


    .type-tribe_events.tribe_events_cat-members-only {
    display: none !important;
    }

    Now those events are hidden:

    And not just in the month view, either! The events in that category will be hidden from all front-end views.


    Part 3: Write CSS to Selectively Show That Category if the User is Logged In

    Now we just add another bit of CSS below the CSS shared above—this additional section of CSS will keep the “display: none;” rule by default, but IF the user is logged on, the events will show like normal:


    body.logged-in .type-tribe_events.tribe_events_cat-members-only {
    display: inline-block !important;
    }


    There you go! You can do this MULTIPLE categories if you’d like, as well.

    You will have to take the reins from here, completely, but I hope this is enough to get you started. If you need some help writing the custom CSS on your site, definitely check out a [free!] tool like Firebug if you use FireFox, or the Developer Tools for either Safari or Chrome. They have “Inspector” tools that let you zoom right over the element whose styles you want to modify and so on.

    Cheers,
    George

    #1097066
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Need to be able to parse calendar based on login credentials’ is closed to new replies.