Google map toggle on community events submission?

Home Forums Calendar Products Community Events Google map toggle on community events submission?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1295667
    Abigail Marshall
    Participant

    I don’t see the Google Maps embed toggle on the Community events submission form any more.

    Is this function still available for community submissions?

    If so, how to I add it back in?

    I tried adding this code to the venue.php file (taken from the template file for a previous version):
    <?php
    if ( ! tribe_community_events_is_venue_edit_screen() ) {
    ?>
    <tr id="google_map_link_toggle">
    <td>
    <label for="EventShowMapLink">
    <?php esc_html_e( 'Show Google Maps Link', 'tribe-events-community' ); ?>:
    </label>
    </td>
    <td>
    <input type="checkbox" id="EventShowMapLink" name="EventShowMapLink" value="1" <?php checked( $venue_show_map_link ); ?> />
    </td>
    </tr><!-- #google_map_link_toggle -->

    But it completely broke the events submission page, so obviously something there is not compatible.

    #1296992
    Cliff
    Member

    Hi, Abigail.

    We’re planning to release this as part of our Extension Library in the next week or two.

    I’ll update this post once it’s available.

    Thanks for your patience.

    #1296997
    Abigail Marshall
    Participant

    Thank you. I have request as long as your developers are working on it–

    I would like to be able to set the toggle to default for the google map embed to “on” — and for the google map link “off” — and ideally the ability to make the fields hidden on the community form – so submissions automatically invoke the embedded map, without the user having to click anything.

    In other words, I want every event page on my site to have an embedded map, without needing to rely on user interaction.

    I’d expect others might have different preferences — but the ability to set which options are available and to set a default will be helpful in the extension.

    #1297003
    Cliff
    Member

    The extension is already overdue based on when we wanted it released so I’m not sure if they’ll be able to implement this, but I’ve passed along your request 🙂

    #1299429
    Cliff
    Member

    Actually, I thought about this more… you can use this snippet:

    https://gist.github.com/cliffordp/d420a5f952ef3b91e6db2b4104b6f28b

    And then just not have these checkboxes on the Community Events form (since they’re always going to be overridden with TRUE).

    Please let me know how this goes for you.

    #1299446
    Abigail Marshall
    Participant

    Would this just go in my child theme’s function.php file?

    #1299520
    Abigail Marshall
    Participant

    OK, got it now — I wanted to have the Google embed map shown on all pages, but NOT the separate link to the Google map, so I entered this in my functions.php file:

    // Event Pages always show Google map but not link, regardless of individual Event or Venue settings
    add_filter( 'tribe_embed_google_map', '__return_true' );
    add_filter( 'tribe_show_google_map_link', '__return_false' );

    It seems to be working — my site didn’t break (always a good sign when messing with functions.php); and as I browse through the various pages all look like I want them to look — so thank you!

    #1300198
    Cliff
    Member

    Awesome! 🙂

    Thanks for reporting back.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Google map toggle on community events submission?’ is closed to new replies.