Changing tooltip to display location

Home Forums Calendar Products Events Calendar PRO Changing tooltip to display location

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1282020
    Chuck
    Participant

    I’ve been trying to edit files following the Themer’s Guide, but I cannot figure out how to remove the excerpt and instead display the location in the tooltip under calendar view. Can you please help me out with this? Thanks!

    #1282569
    Andras
    Keymaster

    Hello again Chuck,

    Thanks for reaching out!

    I can try to help out here, but I am limited in supporting customizations. Per our terms and conditions we support features of the plugins and although we try to help get you started on customizations for the most part you are going to have to take it on to complete.

    To be able to do this you will probably need a bit of php and javascript.

    You will need to create a template override for the wp-content\plugins\the-events-calendar\src\views\month\tooltip.php file in here:

    wp-content\themes\your-child-theme\tribe-events\month\tooltip.php

    You can find instructions on how our tooltips work at the beginning of this file:

    wp-content\plugins\the-events-calendar\src\views\month\single-event.php

    I hope this can get you started. Let me know if you need further guidance.

    Cheers,
    Andras

    #1289203
    Chuck
    Participant

    I followed the instruction per this thread:

    add venue to month tooltip

    But, I’m still not getting the venue to list on the tooltip. What am I missing?

    #1290503
    Andras
    Keymaster

    Hi Chuck,

    So if you have this in place in the month/single-event.php

    $venue = array();
    $getvenue = tribe_get_venue();
    $venue['venue'] = $getvenue;

    and

    <span class="pl-e">data-tribejson</span>=<span class="pl-s"><span class="pl-pds">'</span><span class="pl-pse"><?php</span><span class="pl-s1"> <span class="pl-c1">echo</span> tribe_events_template_data( <span class="pl-smi">$post</span>, <span class="pl-smi">$venue</span> ); </span><span class="pl-pse"><span class="pl-s1">?</span>></span><span class="pl-pds">'</span></span>

    then all you need is

    [[=venue]]

    in your month/tooltip.php file at the place where you want to show it.

    I tested it now and it works.

    Let me know where you get stuck.

    Cheers,
    Andras

    #1291397
    Chuck
    Participant

    I tried your code with no success. I actually had success after I reworked the code from this post:

    Include venue details and Additional custom field in month/mobile.php

    I’m still having issues though as it isn’t listing the address with city and state which is what I really need. What am I missing here?

    • This reply was modified 8 years, 10 months ago by Chuck. Reason: add words
    #1291419
    Chuck
    Participant

    I tried adding this code to my tooltip.php:

    			[[ } ]]
    			[[ if(venue.length) { ]]
    				<div class="tribe-event-venue">[[= venue]]</div>
    			[[ } ]]
    			[[ if(VenueAddress.length) { ]]
    				<div class="tribe-event-venue">[[= VenueAddress]]</div>
    			[[ } ]]
    			[[ if(VenueCity.length) { ]]
    				<div class="tribe-event-venue">[[= VenueCity]]</div>
    			[[ } ]]
    			[[ if(VenueState.length) { ]]
    				<div class="tribe-event-venue">[[= VenueState]]</div>
    			[[ } ]]
    			[[ if(VenueZip.length) { ]]
    				<div class="tribe-event-venue">[[= VenueZip]]</div>
    			[[ } ]]

    Then I tried adding this code to my single-event.php:

    $venue 	  = array();
    $getvenue = tribe_get_venue();
    $venue['venue'] = $getvenue;
    $address 	  = array();
    $getaddress = tribe_get_address();
    $address['VenueAddress'] = $getaddress;
    $city 	  = array();
    $getcity = tribe_get_city();
    $city['VenueCity'] = $getcity;
    $state 	  = array();
    $getstate = tribe_get_state();
    $state['VenueState'] = $getstate;
    $zip 	  = array();
    $getzip = tribe_get_zip();
    $zip['VenueZip'] = $getzip;

    I’m clearly doing something wrong.

    #1291452
    Andras
    Keymaster

    Hi Chuck,

    You are almost there, good job so far.

    In the single-event.php you create the “$venue” array and you need to use that for all of the data. So something like this:

    $venue = array();
    
    $getvenue    = tribe_get_venue();
    $getaddress = tribe_get_address();
    $getcity    = tribe_get_city();
    $getstate    = tribe_get_state();
    $getzip        = tribe_get_zip();
    
    $venue['venue']            = $getvenue;
    $venue['VenueAddress']    = $getaddress;
    $venue['VenueCity']        = $getcity;
    $venue['VenueState']    = $getstate;
    $venue['VenueZip']        = $getzip;

    Then you should be able to use the shortcodes, though you might need to remove that space after the “=”, I’m not sure.

    I’d suggest give that a try. And in case you still cannot get it to work, then you can peek at my files here. 😉

    https://gist.github.com/andrasguseo/34b0ce16c1e700b01186266f89015dca

    Cheers,
    Andras

    #1301803
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Changing tooltip to display location’ is closed to new replies.