Craig

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: Cant edit a ticket in the backend #1097711
    Craig
    Participant

    Ignore me
    Looking at the wrong installation 😉

    Cheers
    Andy

    in reply to: Hide "Who's Attending" by default #1092901
    Craig
    Participant

    Awesome, that works thanks

    Cheers
    Andy

    in reply to: Next/Prev events on single page not going to correct event #1029373
    Craig
    Participant

    Hi

    Thanks for the reply
    I did a test with adding an equal to the direction but the previous and next come out as the same result
    I’ll keep an eye out for the bug report

    Cheers
    Andy

    in reply to: How do I separate up the tickets and related events? #1017808
    Craig
    Participant

    I have inserted the following in my template for the ticket box

    
    <?php 
    	$ticket_box = new Tribe__Events__Tickets__Woo__Main();
    	$ticket_box->front_end_tickets_form( '' );
    ?>

    And for the related view

    
    <?php 
    	$related_views = Tribe__Events__Pro__Main::instance();
    	$related_views->register_related_events_view();
    ?>

    Would this be the best way, or is there some hooks I can utilise?

    Cheers
    Andy

    in reply to: iCal not exporting the correct days #998437
    Craig
    Participant

    Hi

    Thanks for that
    So in the meantime how do I get it so that whatever is specified as the date of the event (i.e. 2nd-3rd September) is what appears in the users calendar?
    So ideally it’s irrelevant of their timezone as the events the client lists are all over the world so they wouldn’t be set to the same timezone as the website anyway

    Cheers
    Andy

    in reply to: iCal not exporting the correct days #998321
    Craig
    Participant

    Hi

    Thanks for getting back

    That kind of make sense but shouldn’t the conversion somehow allow for this
    If I put a test calendar in iCal I get

    DTSTART;VALUE=DATE:20150902
    DTEND;VALUE=DATE:20150904

    Which is what I would expect
    As it’s saying that start on 2nd and finish the beginning of the 4th so it will be 2nd -3rd inclusive as this is all-day events

    If not how do we get around it as obviously it’s not giving the correct date at present no matter what setting I put in the timezone setting, so users are getting wrong dates

    As you say in essence it’s this line
    $date->setTimezone( new DateTimeZone( 'UTC' ) )
    As this then puts it the day ahead at 23:00, which then iCal sees as the day before

    Cheers
    Andy

    in reply to: iCal not exporting the correct days #997973
    Craig
    Participant

    Hi

    Thanks for getting back
    I am just importing it into my Calendar(OsX)
    My timezone is set as BST

    The client has also had this error as well on machines that he has tried and this is into Outlook

    I ran a few tests on the page, so not downloading the calendar and could see the issue occurring in this function wp_strtotime

    Specifically this line of code in iCal.php line 368

    $date = date_create( $string, new DateTimeZone( $tz ) );
    			if ( ! $date ) {
    				return strtotime( $string );
    			}
    			$date->setTimezone( new DateTimeZone( 'UTC' ) );
    			return $date->format( 'U' );

    Cheers
    Andy

    • This reply was modified 8 years, 8 months ago by Craig.
    in reply to: Queries being overridden by pre_get_posts #995400
    Craig
    Participant

    For anyone interested I had to put a pre_get_post in with a higher priority to override it so in my function I called

    
    // Add a pre_get_posts with a high priority
    		add_action( 'pre_get_posts', array( $this, 'alter_event_query' ), 99 );
    //  Get all events that are upcoming
    		$event_list_args = array(
    			'post_type' => 'tribe_events',
    			'posts_per_page' => -1
    		);
    		$event_list_query = new WP_Query( $event_list_args );
    // Remove the pre_get post
    		remove_action( 'pre_get_posts', array( $this, 'alter_event_query' ) );

    Then just reset my taxonomies in the query in pre_get_posts

    Cheers
    Andy

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