Seth

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • in reply to: Getting List of Event Categories #1189632
    Seth
    Participant

    Thanks for the reply Cliff. However, in my specific case that might not work.

    I’m making a custom Beaver Builder module to display events, and their framework requires dropdown questions to be defined a certain way in their settings.

    Here’s an example of the output I need to create for the module settings:

    'event_categories' => array(
        'type'          => 'select',
        'label'         => __( 'Choose a Category', 'fl-builder' ),
        'default'       => 'all',
        'options'       => array(
            'all'      => __( 'All Events', 'fl-builder' ),
            'public'      => __( 'Public', 'fl-builder' ),
            'students'      => __( 'Students', 'fl-builder' ),
            'faculty'      => __( 'Faculty', 'fl-builder' ),
            [... rest of categories ...]
        ),
    ),

    So I think I need to get an array of the categories so that I can output them in this specific way.

    in reply to: Assigning an organizer and venue #989309
    Seth
    Participant

    I’m also wondering this.

    Also if an event is updated (time, location, etc) on the iCal feed will the changes be reflected on the next recurring import?

    in reply to: List View Next/Previous not working properly #201218
    Seth
    Participant

    I think I have a similar issue but I haven’t been able to resolve it.

    The next/prev links don’t seem to work with the ajax load and displays a “No matching events” error even though there are events. A quick refresh of the page ends up displaying the events properly.

    Here’s an example page – http://www.dmu.edu/calendar/category/continuing-medical-education/ (hit next)

    Some additional details: Next/Prev buttons don’t seem to work at all on IE. Next/Prev buttons DO work when logged in as Admin.

    in reply to: Incorrect recurring event info from custom loop #15627
    Seth
    Participant

    Small correction with the else statement:
    } else {
    $event_date = strtotime(tribe_get_start_date());
    }

    But like I said, this is a poor hack and hopefully not a long term solution 🙂

    in reply to: Incorrect recurring event info from custom loop #15626
    Seth
    Participant

    It seems as if the date functions don’t work when passed a recurring event post ID if called from functions.php or a custom plugin. However, the same code works when I pass a recurring event post ID to tribe_get_start_date() in a page template like front-page.php. Could it be something with how the post is set up that is not able to happen in functions.php?

    This baffles me further because both in the source code and the documentation it still states that the date functions are not supposed to work with recurring event post IDs, so I’m not sure why it’s working on my front-page.php.

    For the time being, I realized that the permalink for each recurring event has the correct starting date in it. So I hacked together some code to retrieve the correct date from the permalink. I realize that this is definitely not the best way to do it, but until tribe_get_start_date() and tribe_get_end_date() are able to accept recurring post IDs I don’t see any other way.

    if(tribe_is_recurring_event($post->ID)) {
    $event_link = get_permalink($post->ID);
    $event_date = strtotime(substr($event_link, $event_link.length-10, 10));
    } else {
    $event_date = tribe_get_start_date();
    }

    in reply to: Incorrect recurring event info from custom loop #15549
    Seth
    Participant

    I’m still looking for a solution to this myself. I have broken events showing up on a few of my pages because of this. For example on this page, http://www.dmu.edu/cme/, in the “Regular Scheduled Series” section they all say “May 26” which is the date of the original event and not the next upcoming date.

    in reply to: Incorrect recurring event info from custom loop #15548
    Seth
    Participant

    This problem goes back to my original post. In these custom loops there are errors with recurring events. I believe because some of the functions don’t allow an ID from an instance of a recurring event.

    For example if you call tribe_get_start_date($ID, false, ‘M’) on a recurring event you will get the month of the original.

    If I look at the function tribe_get_start_date there are comments before it that confirm this:


    /**
    * Start Date
    *
    * Returns the event start date and time
    *
    * @param int $postId (optional) This only works for non recurring events
    * @param bool $displayTime If true shows date and time, if false only shows date
    * @param string $dateFormat Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php)
    * @return string Date
    * @todo support $postId for recurring events.
    * @since 2.0
    */

    in reply to: Incorrect recurring event info from custom loop #14542
    Seth
    Participant

    Actually I think it should work with multiple categories just how you put it.

    in reply to: Incorrect recurring event info from custom loop #14540
    Seth
    Participant

    You’re welcome. I never even thought of other people using it, since it’s customized to my own setup. 🙂

    You’ve probably noticed but you can pass options into the shortcode like [events limit=”10″ category=”Category name”]

    If you use recurring events on your site could you let me know if the dates for those work using this shortcode? The dates show up incorrectly on my site and I’ve been trying to fix it.

    Seth
    Participant

    I also comment out that line in my setup so that it only adds a single event rather than a whole new calendar.

    I think it would be good to add this as an option in the ECP settings page.

    Seth
    Participant

    Sure – http://www.dmu.edu/calendar/upcoming/

    I also made sure this wasn’t due to my custom template list.php. I tried the code with the default list.php and no luck.

    If I remove the code (http://pastebin.com/PPLCicug) from list.php the Next/Previous links come back.

    Here is my full list.php if you need to view that – http://pastebin.com/PXQc8yFn

    Seth
    Participant

    Actually, the code added to list.php seems to break the Next/Previous Events links on the page.

    Seth
    Participant

    Worked like a charm, thanks so much!

    in reply to: Bug: Editing single recurring events #13697
    Seth
    Participant

    It seems like you should be able to edit one event in a series and still have it be a part of that series.

    If I change the location of one event in a series then it doesn’t show up in the “See all” link anymore which kind of stinks.

    in reply to: Incorrect recurring event info from custom loop #13638
    Seth
    Participant

    Pasted a bit weird, here’s the same thing in pastebin – http://pastebin.com/ek5Uj3uD

Viewing 15 posts - 1 through 15 (of 30 total)