Forum Replies Created
-
AuthorPosts
-
CraigParticipant
Ignore me
Looking at the wrong installation 😉Cheers
AndyCraigParticipantAwesome, that works thanks
Cheers
AndyNovember 23, 2015 at 1:28 am in reply to: Next/Prev events on single page not going to correct event #1029373CraigParticipantHi
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 reportCheers
AndyOctober 26, 2015 at 3:36 am in reply to: How do I separate up the tickets and related events? #1017808CraigParticipantI 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
AndyCraigParticipantHi
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 anywayCheers
AndyCraigParticipantHi
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 getDTSTART;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 eventsIf 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 beforeCheers
AndyCraigParticipantHi
Thanks for getting back
I am just importing it into my Calendar(OsX)
My timezone is set as BSTThe 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.
CraigParticipantFor 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 -
AuthorPosts