josephmak

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • in reply to: Event guid wrong for recurring events #1006702
    josephmak
    Participant

    Nico, you are the man!

    That worked perfectly. I guess I didn’t explore the API as well as I thought I had. Thanks so much for your solution 🙂

    Amanda

    in reply to: Events apearing slightly out of order #1006550
    josephmak
    Participant

    Hi Josh,

    Perfect! This worked exactly as you said it would I ended up using the event wrapper .tribe-events-photo-event-wrapper instead of the details div you suggested. All I had to be mindful of was how high the highest description was. I ended up using a height of 500px and adjusting some of the excerpts so that they would fit into this defined height. If the combination of the title, price and excerpt was higher than the explicitly set height, it would break the styling for all events after the offending event. Just a bit of a finicky process, but I got it all working.

    This solutions seems to have fixed the other issue of events not showing up in the right order as well! Now the only thing I need to figure out is why some events guid (permalink) is set to the site url as opposed to the event link.

    Thanks again for all your help, you guys are great!

    in reply to: Event guid wrong for recurring events #1006458
    josephmak
    Participant

    Hi Nico,

    I don’t believe I made a custom query for the listing page. I did a custom query for the home page where I am displaying the three random events. Both the event listing page and the individual featured events have incorrect urls and I can’t determine what is making some of them have correct urls and others just have the home url.

    For the three random events that are displayed on the home page and on individual event pages, the code is as follows:

    
     $args = array('start_date' => date('D, d M Y H:i:s'));
     $events = tribe_get_events($args);
     shuffle($events); //randomize the events so they show up differently each time
    

    Then I created a function to display only the necessary information for the featured events:

    
    /* custom event functions */
    
    function output_asba_event($event){
        $title = $event->post_title;
        //get the dates from start and end date
         preg_match_all("/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/",$event->EventStartDate, $start_date);
        preg_match_all("/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/",$event->EventEndDate, $end_date);
    
        $start_month = $start_date[2][0];
        $start_day = ltrim($start_date[3][0], 0);
    
        $v = tribe_get_recurrence_start_dates($post_id);
        var_dump($event->guid);
    
         echo '<a href="'.$event->guid.'">' . tribe_event_featured_image($event->ID, 'thumbnail', false) . '</a>';
        echo '<a href="'.$event->guid.'"><h4 class="asba-teal-title">' . $title . '</h4></a>';
    
        switch ($start_month){
            case '01':
                $start_month = 'January';
                break;
            case '02':
                $start_month = 'February';
                break;
            case '03':
                $start_month = 'March';
                break;
            case '04':
                $start_month = 'April';
                break;
            case '05':
                $start_month = 'May';
                break;
            case '06':
                $start_month = 'June';
                break;
            case '07':
                $start_month = 'July';
                break;
            case '08':
                $start_month = 'August';
                break;
            case '09':
                $start_month = 'September';
                break;
            case '10':
                $start_month = 'October';
                break;
            case '11':
                $start_month = 'November';
                break;
            case '12':
                $start_month = 'December';
                break;
    
        }
        echo '<h5 class="asba-home-event-date">'.$start_month.' '. $start_day . '   ';
         if(tribe_event_is_all_day($event->ID)){
            echo "- All Day</h5>";
        }
        else{
            echo tribe_get_start_date($event, false, $format = 'g:i A') . '-' . tribe_get_end_date($event, false, $format = 'g:i A');
            echo '</h5>';
        }
    
    }
    

    I can’t seem to find the place where the default Events Calendar query is happening, I didn’t look all that hard 😛 I can send you a var_dump of the query from one of the templates if that would help?

    • This reply was modified 10 years, 8 months ago by josephmak.
    • This reply was modified 10 years, 8 months ago by josephmak.
    in reply to: Events apearing slightly out of order #1005710
    josephmak
    Participant

    Any progress on this?

    I am also trying to get the events to line up horizontally on the listing page as opposed to fit in nice and tiled the way it is now. I have tried a few different things (putting three events into a row etc…) with no luck. I think my lack of success on this endeavour is related to the javascript you mentioned above. Is there a good way to achieve the events showing in a nice aligned row with the height of the highest event?

    Thanks so much!

    in reply to: Event guid wrong for recurring events #1005682
    josephmak
    Participant

    The live site might be a better place to test this as there are way more events on there. The url is albertabrewers.ca

    in reply to: Event guid wrong for recurring events #1005676
    josephmak
    Participant

    Looking further into the issue, I am unsure if it is just recurring events or if the problem is completely random. The “Central Alberta Beer Week Party” is not actually a recurring event, I just assumed it was because of the name. So I guess a more appropriate thread title would be “Random events guid wrong” ?

    in reply to: Filter bar has mixed results #1003966
    josephmak
    Participant

    This reply is private.

    in reply to: Filter bar has mixed results #1003773
    josephmak
    Participant

    Hi Brian,

    Thank you for your reply. I went ahead and fixed the error caused by the Google map API script being included more than once on the page. This did not seem to fix the strange functionality we are experiencing with the filter bar. Can you provide another suggestion?

    Amanda

    in reply to: Filter bar has mixed results #1003703
    josephmak
    Participant

    This reply is private.

    in reply to: Custom event listing page only showing 5 events #1003428
    josephmak
    Participant

    Awesome! Brian, thank you so much! This fixed the issue 🙂

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