Forum Replies Created
-
AuthorPosts
-
Chris ChungParticipant
I switched the timezone to UTC-4, and it seems to be working correctly now.
That is strange why New York is off and was working fine up until recently.- This reply was modified 7 years, 11 months ago by Chris Chung.
Chris ChungParticipantWorked! I and I set the div inside the category div to not display as well.
Thanks again!
– Chris
Chris ChungParticipantThanks a bunch George!
I didn’t think about looking at the css, I will play around with it and let you know how it goes.
– Chris
Chris ChungParticipantThanks for your response George.
That is correct, if an event is categorized as “x” then echo the title otherwise echo the link/title.
For example I am importing a csv with the US holidays. which I want to just be text.
My idea was to declare a variable, initialize it to the tribe_events_cat, and then if else or switch case.Cheers,
Chris
Chris ChungParticipantThanks, already got it with this:
$date = new DateTime($event->post_date); echo $date->format('l F j , Y');
Chris ChungParticipantThanks a bunch Barry! That page you linked is what I was looking for.
Now I just need to find the date field and post that as well.Chris ChungParticipantAttempting:
<?php $cat = 75; $args = array( 'post_type'=> 'tribe_events', 'category__in' => array($cat)); $posts = get_posts($args); if ($posts) { foreach($posts as $post) { setup_postdata($catposts); ?> <article> <p> <?php echo '<a href="' . get_permalink() . '">' . get_the_title() . '</a>'; ?> </p> </article> <?php } } ?>
Chris ChungParticipantI see the notifications are being sent on an event with no organizer, I am looking over my if and case statements to try and figure out why. Check who is the organizer of the event ie check the organizer field in the post_type tribe_events.
Chris ChungParticipantOk so now I got somewhere, part of it is from other plug-ins I use “gravity forms” “event registration”,
the switch case doesn’t seem to be working as now both organizers/users are receiving the notification.
Banging my head to figure out why 😛function tribe_event_test($notification, $form, $entry)
{
$args_e = array(
‘post_type’ => ‘tribe_events’
);
$post_query_e = new WP_Query($args_e);if($post_query_e->have_posts() ) {
while($post_query_e->have_posts() ) {
$i = sp_get_organizer();
switch ($i) {
case “Joe”:
if ( $notification[‘name’] == ‘Joe’ ) {
$notification[‘toType’] = ’email’;
$notification[‘to’] = ‘[email protected]’;
}
break;
case “Tom”:
if ( $notification[‘name’] == ‘Tom’ ) {
$notification[‘toType’] = ’email’;
$notification[‘to’] = ‘[email protected]’;
}
break;
}
}
return $notification;
}
add_filter( ‘gform_notification_1’, ‘tribe_event_test’, 10, 3 );Chris ChungParticipantThanks again Brian!
Would it work to use this in conjunction with tribe_is_event function to check if an event has a certain organizer, I know you mentioned “_OrganizerOrganizer” earlier
if ( tribe_is_event == true && tribe_get_organizer(123456) == true) do the following
Thanks!
Chris
Chris ChungParticipantThanks for the response! I don’t think I have fully understood how the functions and hooks work yet.
As a test I tried to get the organizers name and then use it in another function, for example:
//Here I attempt to grab the organizer function tribe_get_organizer1( $postId = 23864 ) { $postId = TribeEvents::postIdHelper( $postId ); $organizer_id = (int) tribe_get_organizer_id( $postId ); $output = ''; if ( $organizer_id > 0 ) { $output = esc_html( get_the_title( $organizer_id ) ); return apply_filters( 'tribe_get_organizer1', $output ); } return $output; }
Did I use the function correctly? Trying to reference $output in another function like echo $output or something like It seems like it should be made as a global variable.
Thanks again,
Chris
Chris ChungParticipantAdding the ?cal was simple, does what we needed. Thanks again! You guys have a great support team with quick response time!
Chris ChungParticipantThanks Barry! Adding that to the link seems simpler, just have it generate the single-event link with ?ical appended to it. I was initially looking at the function to see if it could dynamically do this for each event. Trying it now, I’ll let you know how it goes.
-
AuthorPosts