Support

Home Forums Event Espresso Premium Disable Tooltips in EE Calendar Widget Only

Disable Tooltips in EE Calendar Widget Only

Posted: June 21, 2014 at 1:40 am

Viewing 8 reply threads


Tony O’Keefe

June 21, 2014 at 1:40 am

I would like to disable the tooltips in the Calendar Widget ONLY and retain them on the full page calendar though the normal dashboard options.


Lorenzo Orlando Caum

  • Support Staff

June 21, 2014 at 12:35 pm

Hello,

This isn’t currently supported but I can add this as a feature request. What version of Event Espresso are you running?


Lorenzo


Tony O’Keefe

June 21, 2014 at 10:53 pm

Thanks Lorenzo,

Yes I am aware it is not an existing feature. I am hoping that someone at EE or the community may have worked on this before or have the time to suggest a coding solution as I need an immediate solution. I have a feeling it can be done with just a few lines in espresso-calendar-widget.php

Event Espresso version 3.1.36.5.P
WordPress version WP 3.9.1

Cheers,

Tony


Dean

June 23, 2014 at 1:42 am

Hi,

Currently this is not possible, barring a re-write of how the calendar widget is created.

Right now the calendar and the calendar widget are virtually identical and use the same code base. So much so, if you have the widget active and visit the calendar page, the widget should disappear (to stop conflicts from arising).

I tried a few ways to get around this including simply modifying the show_tooltips option, running a check via is_active_widget, and various other methods. None of these will work without large modifications to the plugin.

Sorry about that.


Tony O’Keefe

June 23, 2014 at 5:13 pm

Hi Dean,

Thanks for exploring all the options. I recognise how closely the calendar and calendar widget and am not too surprised.

Here’s what I’ve done as a codeless work around.

I have a members only site. Only the homepage and blog are public. I wanted a calendar widget on the home page but without the tool tip content displaying.
So I’ve put an img of the calender in the widget space which links to the full page calendar. Looks the same and takes members where I want them to go.
It’s a fake-out I know and a shame to loose the update and navigation features in the widget but it does the job.

Thanks

Tony


Josh

  • Support Staff

June 23, 2014 at 10:38 pm

Hi Tony,

It turns out this can be done with a minor change of the PHP inside the calendar plugin’s espresso-calendar-widget.php. If you look at the $attributes array that starts on line 61 you’ll find:

$attributes = array( 
	'event_category_id' => $instance['category_id'], 
	'show_expired' => $instance['show_expired'], 
	'cal_view' => 'month',
	'widget' => TRUE,
	'header_left' => 'prev',
	'header_center' => 'title',
	'header_right' =>'next',
	'titleFormat_month' => 'MMM yyyy'
);

You can add in a show_tooltips attribute and set it to false like this:

$attributes = array( 
	'event_category_id' => $instance['category_id'], 
	'show_expired' => $instance['show_expired'], 
	'cal_view' => 'month',
        'show_tooltips' => FALSE,
	'widget' => TRUE,
	'header_left' => 'prev',
	'header_center' => 'title',
	'header_right' =>'next',
	'titleFormat_month' => 'MMM yyyy'
);

Please note that this edit will get wiped out the next time there’s an update, but it’s a quick little edit and we don’t update the calendar add-on that often.


Tony O’Keefe

June 25, 2014 at 6:45 pm

Hi Josh,

Nice and easy. However it only disables the EE tooltip feature. Not the HTML title attribute.
Therefore the private info I want to conceal still appears as default tooltip text on mouse over.


Dean

June 26, 2014 at 2:19 am

Hi,

espresso_calendar.js, line 243, change

element.attr( 'title', event.title + " - Event Times: " + event.event_time_no_tags );		

to

//element.attr( 'title', event.title + " - Event Times: " + event.event_time_no_tags );	

This edit will also get wiped out after an update.


Tony O’Keefe

June 30, 2014 at 3:49 pm

Resolved.
The calendar widget is appearing just as I wanted it now.
Thanks for the great EE support!

Viewing 8 reply threads

The support post ‘Disable Tooltips in EE Calendar Widget Only’ 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