Support

Home Forums Event Espresso Premium remove part of the tooltip window

remove part of the tooltip window

Posted: April 8, 2014 at 12:17 pm


Gijsbert Vandeweerdt

April 8, 2014 at 12:17 pm

Hello EE support team,

I want to remove (hide) part of the tooltip window, since the whole autohides once you get off an event. You actually can’t acces the ‘register now’ button. So we don’t need it.

See here if you want to check: http://www.sintjansberg.be/events/agenda-3/

I want to get rid of the part marked in red:
http://sintjansberg.be/downloads/Event_Calendar__Event_Espresso__Test_Drive_20140408_200702_20140408_200714.png

I’ve been looking with Firebug, but can’t find what to do. Could you tell me?

Thank you
gijsbert


Lorenzo Orlando Caum

  • Support Staff

April 8, 2014 at 12:33 pm

The following CSS classes are used for that area so try something like this in a plugin like My Custom CSS:

.ui-state-active, .sold-out-dv {display:none} 

Be sure to double check other areas of the calendar to make sure that nothing else was accidentally removed.


Lorenzo


Gijsbert Vandeweerdt

April 8, 2014 at 2:10 pm

Ok, thanks Lorenzo, that worked quite well.

Now the only thing in the tooltip I want to change/translate is the text ‘Event Time’. It is translated correctly in the PO files but apparently that’s not the solution. Where do I correct this?

Screenshot?
http://sintjansberg.be/downloads/Agenda__Kasteelklooster_SintJansberg_20140408_220523_20140408_220736.png

thanks


Lorenzo Orlando Caum

  • Support Staff

April 8, 2014 at 6:59 pm

Try this:

function mycustom_ee_filter_et_gettext( $translated, $original, $domain ) {

    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Event%sDate' => 'Registration'
        // Add some more strings here
    );

    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }

    return $translated;
}

add_filter( 'gettext', 'mycustom_ee_filter_et_gettext', 10, 3 );

Please add it to a custom functions plugin and then upload that plugin to your WordPress plugins folder.

You’ll then be able to activate it through WordPress plugins: http://ottopress.com/2011/creating-a-site-specific-snippets-plugin/

If you have an existing custom functions plugin, then you can just add it there.

Let me know if that helps.


Lorenzo


Gijsbert Vandeweerdt

April 9, 2014 at 12:37 am

Thanks, I got a child theme. Can I paste this code in there?


Dean

April 9, 2014 at 1:11 am

Hi,

It should work fine in the functions.php. Please use the version below as the above one has a slight typo

function mycustom_ee_filter_et_gettext( $translated, $original, $domain ) {

    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Event Time: ' => 'Registration: '
        // Add some more strings here
    );

    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }

    return $translated;
}

add_filter( 'gettext', 'mycustom_ee_filter_et_gettext', 10, 3 );


Gijsbert Vandeweerdt

April 9, 2014 at 1:38 am

ok, works now. Thank you Dean

The support post ‘remove part of the tooltip window’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso