Forum Replies Created
-
AuthorPosts
-
Nico
MemberThanks for following Karly! Glad to see the workaround works for you 🙂
I’ll check on the venue validation and will give you a heads-up about it tomorrow!
Thanks,
NicoNico
MemberThanks for the patience while I worked on this one!
I created a basic shortcode for this: [tribe_venue_map]. Add the code to your theme’s (or child theme’s) functions.php file and then you can put the shortcode in a new page:
/* Tribe [tribe_venue_map] shortcode sample */
function tribe_venue_map_logic ( $atts ){$url = apply_filters( 'tribe_events_google_maps_api', 'https://maps.google.com/maps/api/js' );
$url = $url . '&callback=tribe_venue_map';wp_enqueue_script( 'tribe_events_google_maps_api', $url, array(), false, true );
wp_enqueue_script( 'jquery' );add_action('wp_footer', function () { ?>
<style>
#tribe-venue-map {
width: 100%;
height: 400px;
}
</style>
<script>
function tribe_venue_map() {var map = new google.maps.Map(document.getElementById('tribe-venue-map'), {
center: {lat: 34.5133, lng: -94.1629},
zoom: 4
});<?php
$venues = get_posts( array( 'post_type' => Tribe__Events__Main::VENUE_POST_TYPE, 'posts_per_page' => -1) );
foreach ( $venues as $venue ) {
$coordinates = tribe_get_coordinates ( $venue->ID );
if ( $coordinates['lat'] != 0 && $coordinates['lng'] != 0 ) { ?>
new google.maps.Marker({
position: {lat: <?php echo $coordinates['lat']; ?>, lng: <?php echo $coordinates['lng']; ?>},
map: map,
title: "<?php echo $venue->post_title; ?>"
});
<?php
}
} ?>
}</script>
<?php });
return '<div id="tribe-venue-map"></div>';
}
add_shortcode( 'tribe_venue_map', 'tribe_venue_map_logic' );
The code is pretty basic, and will surely need to be adjusted but I guess it’s a pretty good starting point 🙂
Hope it helps,
NicoNico
MemberThis reply is private.
July 27, 2016 at 8:56 am in reply to: Calendar Search Date Picker Box is Hidden Under Main Navigation Bar #1144687Nico
MemberWooot! Stocked to hear Erinn 🙂
Thanks for the kind words! I’m happy to be of service!
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Best,
NicoNico
MemberBuenisimo Jorge 🙂
Una última pregunta, en caso de querer traducir más string, me imagino que bastaría con meterlos en el array $custom_text, ¿verdad?
Claro!
Asimismo, hay alguna posibilidad de ver todos los strings existentes en castellano para ir traduciéndolos ya en caso de que sea necesario y no esperar a que el cliente o yo lo veamos “algún día”?
Acá poder ver todos los strings del plugin ‘core’: https://translate.wordpress.org/projects/wp-plugins/the-events-calendar/stable/es/default – mientras que las traducciones para nuestros plugins premium viven aquí: http://translations.theeventscalendar.com/projects. Lo mejor seria que si encontras strings sin traducción sugieras una! Todas las traducciones son contribuciones de la comunidad 😉
Slds!
Nico
MemberGlad to hear we are making progress here Yun 🙂
I just tested both links and they work as expected for me. Can you give this another try? Most probably it was a temporary error from Google (at least that’s what the error description indicates).
Please let me know about it,
Best,
NicoNico
MemberThanks for the follow-up Marlene! Thanks for pointing out the issue with the snippet, we just fixed it in the original knowledge base article: Change the wording of any bit of text or string. It should work as expected now, try the following code:
/* override translation strings */
function tribe_custom_theme_text ( $translation, $text, $domain ) {/* sample spanish translations */
$custom_text = array(
'Event' => 'Evento',
'Events' => 'Eventos',
'%s Categories' => 'Categorias de %s',
'Confirm RSVP' => 'Confirmar reserva',
);// If this text domain starts with "tribe-", "the-events-", or "event-" and we have replacement text
if( (strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($translation, $custom_text) ) {
$translation = $custom_text[$translation];
}return $translation;
}
add_filter('gettext', 'tribe_custom_theme_text', 20, 3);
Some translations like ‘Event Categories’ use a placeholder for the event part, so that string can be translated one time and be used in multiple places. Generally finding the part where the code outputs the strings helps to see this!
Please give the code a try and let me know if it works for you,
Best,
NicoNico
MemberHi Stefano,
Thanks for getting in touch! What you are looking for is not possible out of the box, but we can make it work with a bit of custom code.
Can you please indicate where you would like the attendee list to display? Inserting this in an existing page/listing will surely be easier than creating a new view just for this information.
Please let me know about it and I’ll give this a try 🙂
Best,
NicoNico
MemberHi there Joseph,
Thanks for reaching out to us! I can help you here, but I need to see this in action in order to inspect the markup generated by the layout builder.
Can you please provide a link to see this in your site? Also a screenshot/description indicating which font you are trying to resize would be awesome!
Please let me know about it,
Best,
NicoNico
MemberPerfekt! Thanks for confirming Thomas, and for sharing the code 😉
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Best,
NicoNico
MemberJorge,
Podrías probar esta versión actualizada del código:
/* Add custom translation strings */
function tribe_custom_theme_text ( $translation, $text, $domain ) {
$custom_text = array(
'No existe %1$s así listado en %2$s. Favor de intentar ver el calendario completo para ver todos los eventos.' => 'Jorge, No hay %1$s así listado en %2$s. Favor de intentar ver el calendario completo para ver todos los eventos.',
/*...more...*/
);// If this text domain starts with "tribe-", "the-events-", or "event-" and we have replacement text
if( (strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($translation, $custom_text) ) {
$translation = $custom_text[$translation];
}return $translation;
}add_filter('gettext', 'tribe_custom_theme_text', 20, 3);
Gracias!
NicoNico
MemberGracias por la devolución Jorge, lo probé localmente y si tenes razón! Hasta tu reporte siempre funciono bien el código que te pase tanto para ingles como para otros idiomas. Vamos a revisar por que no esta funcionando como antes y te aviso!
July 26, 2016 at 7:50 am in reply to: Calendar Search Date Picker Box is Hidden Under Main Navigation Bar #1144178Nico
MemberThanks Erinn!
Just add this code to the theme (or child theme) stylesheet or via Simple Custom CSS plugin:
/* Force datepicker to show on top of header */
.datepicker {
z-index: 100000 !important;
}
Please let me know if this works for you,
Best,
NicoNico
MemberBuenisimo Jorge, para mi también es mejor seguir en español 😉
Proba de insertar el siguiente código en el archivo functions.php de tu theme (o child theme):
/* Add custom translation strings */
function tribe_custom_theme_text ( $translations, $text, $domain ) {$custom_text = array(
'No existe %1$s así listado en %2$s. Favor de intentar ver el calendario completo para ver todos los eventos.' => 'Jorge, No hay %1$s así listado en %2$s. Favor de intentar ver el calendario completo para ver todos los eventos.',
);// If this text domain starts with "tribe-", "the-events-", or "event-" and we have replacement text
if( (strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($text, $custom_text) ) {
$text = $custom_text[$text];
}return $text;
}
add_filter('gettext', 'tribe_custom_theme_text', 20, 3);
También podes usar el plugin Say What? que provee una interfaz gráfica para introducir estos cambios en las traducciones.
Avisame si funciono el snippet!
Slds,
NicoNico
MemberHi there Thomas,
Thanks for getting in touch! Sure this is doable, just paste the snippet below in your theme (or child theme) stylesheet or via Simple Custom CSS plugin:
/* hide events bar for music category page */
.events-category-music #tribe-events-bar {
display: none;
}
The code above assumes that the event category slug is ‘music’, be sure to change that if it’s not correct!
Please let me know if this works for you,
Best,
Nico -
AuthorPosts
