David

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • David
    Participant

    It’s a bit rough, but this looks like it’ll work for what I need. Just need to replace everywhere I’m using “tribe_get_events” with “digitalsix_get_events”.

    function digitalsix_get_events($args) {
        $args['posts_per_page'] = -1;
        if (class_exists('Sensei_Course')) {
            $defaults = array(
                'post_type' => Tribe__Events__Main::POSTTYPE,
                'orderby' => 'event_date',
                'order' => 'ASC',
                'tribe_render_context' => 'default',
            );
            $args = wp_parse_args($args, $defaults);
            $events = get_posts($args);
            $return = array();
            foreach ($events as $event) {
                if (isset($args['start_date'])) {
                    if (Tribe__Events__Timezones::event_end_timestamp($event->ID, null) < strtotime($args['start_date'])) {
                        continue;
                    }
                }
                if (isset($args['end_date'])) {
                    if (Tribe__Events__Timezones::event_start_timestamp($event->ID, null) > strtotime($args['end_date'])) {
                        continue;
                    }
                }
                $return[Tribe__Events__Timezones::event_start_timestamp($event->ID, null) . '-' . $event->ID] = $event;
            }
            if ($args['orderby'] == 'event_date') {
                if ($args['order'] == 'ASC') {
                    ksort($return);
                } else {
                    krsort($return);
                }
            }
            return $return;
        } else if (function_exists('tribe_get_events')) {
            return tribe_get_events($args);
        } else {
            return array();
        }
    }
    David
    Participant

    I’ve recently started a development project with Sensei and don’t have the ability to download an earlier version of their plugin, but the May release (the latest Sensei release) explicitly says “Fixed an issue prevent Modern Tribe’s The Event Calendar from functioning properly.” which would indicate to me that they have made an effort to fix this.

    The site I’m working on relies heavily on tribe_get_events working and it doesn’t because of this incompatibility. I’m currently in the middle of rewriting my website to make do without that wrapper because it’s the only way I can make it work.

    in reply to: Saving attendee information in session #1122902
    David
    Participant

    And I cracked it. Some creative hacking involved, but it is all working.

    Thanks for the help, got me pointed in the right direction.

    in reply to: Saving attendee information in session #1122885
    David
    Participant

    That was one of my thoughts – capturing the data post-submission by potentially overwriting the code that currently does it. However, I can’t find the code that currently handles the form submission data. This might just be me being an idiot, but any pointers at where that code is handled would be helpful.

    As a developer, I don’t have a problem sorting out my own customisations, and this project is currently full of custom rewrites of TEC functions as it’s using 4 of them at the moment, but I’m struggling to find where the plugin handles the form submissions for this point.

Viewing 4 posts - 1 through 4 (of 4 total)