Support

Home Forums Event Espresso Premium Where to place custom file from Calendar plugin inside my Child Theme?

Where to place custom file from Calendar plugin inside my Child Theme?

Posted: January 19, 2017 at 9:17 am

Viewing 16 reply threads


ardiaful

January 19, 2017 at 9:17 am

I’m trying to customize the file EED_Espresso_Calendar.module.php from the Calendar plugin within my child theme. However, I don’t know where to place the custom file inside the child theme and make it work, so that I don’t have problems later when the plugin updates.


Tony

  • Support Staff

January 19, 2017 at 10:41 am

You can’t load a custom version of the file.

Can I ask what you have changed? we may be able to include some additional hooks that allow you to do what you need within the calendar.


ardiaful

January 19, 2017 at 11:16 am

My events have recurring dates, so inside the calendar they appear in different dates. I need each event get linked to its corresponding event page for that particular date.

Check screenshot https://postimg.org/image/ea0zqvp0p/.


Tony

  • Support Staff

January 19, 2017 at 11:21 am

There is no event page for each date to link to, so I’m not sure what you are doing?

Can you provide further details please, the screenshot doesn’t really help unfortunately.


ardiaful

January 19, 2017 at 11:30 am

I send you private details to calendar.


Tony

  • Support Staff

January 20, 2017 at 10:18 am

I responded to your message but will also add it here.

The events are linking back to the same event page however you are passing a variable within the query string, a ‘session’ id.

I can create a feature request for a filter within the calendar that can be used to alter the links, we can pas the current datetime to the filer which should allow you to pull the session id you need although it depends where/how that id is being stored.

So would a filter with access to the datetime object work for you?


ardiaful

January 23, 2017 at 2:31 am

Thanks for your response.

session id is store in the wp_esp_datetime table, as DTT_ID. Check screenshot https://postimg.org/image/o6qwlfkjx/.

Your solutions sounds good to me, but you should consider that any active event may appear in the calendar as many different times as different date times are created for that event. Would your filter solution enable this functionality?


Tony

  • Support Staff

January 23, 2017 at 4:16 am

Your solutions sounds good to me, but you should consider that any active event may appear in the calendar as many different times as different date times are created for that event. Would your filter solution enable this functionality?

That happens by default so I’m not sure what you need?

Event with multiple datetimes – http://take.ms/YDB7v

How it appears on the calendar by default – http://take.ms/zueO6

session id is store in the wp_esp_datetime table, as DTT_ID. Check screenshot https://postimg.org/image/o6qwlfkjx/.

In that case, yes a filter with the datetime object passed to it will work.


ardiaful

January 23, 2017 at 2:15 pm

Yes Tony, it comes by default, however, events in the calendar do not link to the event page with a particular date time, as I showed you in my website, but to a common event page for all events displaying the first and last date times.

Therefore I need to link each event in the calendar to its particular date time page, for which I think the filter would be a good solution. Could you please send me indications for the hook?


Tony

  • Support Staff

January 23, 2017 at 2:59 pm

Yes Tony, it comes by default, however, events in the calendar do not link to the event page with a particular date time, as I showed you in my website, but to a common event page for all events displaying the first and last date times.

Your events don’t link to a new page per event, they link to exactly the same page that EE does, the difference being your passing a variable along within the query string to only display specific tickets. Its still the same ‘common event page’ link just with an additional value at the end, the filter will handle that just fine.

Therefore I need to link each event in the calendar to its particular date time page, for which I think the filter would be a good solution. Could you please send me indications for the hook?

I’ve created a feature request ticket to include this in the next version of the calendar and also pushed the code for the filter, this will be reviewed by the core dev team and if no issue found with the changes, tested by the support team before being included within the add-on.

I can provide details of the hook once it has been reviewed by the dev team so just waiting on feedback from them.


ardiaful

January 24, 2017 at 3:10 am

Thanks Tony! I look forward to having the hook.


ardiaful

January 26, 2017 at 8:59 am

Hi Tony, any further progress on the review of hook by your dev team? Thanks


Josh

  • Support Staff

January 26, 2017 at 9:50 am

Yes, it’s currently in a branch and ready for testing.


ardiaful

February 6, 2017 at 8:27 am

Hello there, any update on the hook you had ready for testing? I’m really in need of this. Thanks


Lorenzo Orlando Caum

  • Support Staff

February 6, 2017 at 9:21 am

Hi Javier,

I emailed you a copy of the calendar for testing. You can try it out with this function:

function tw_tooltip_permalink( $permalink, $event, $datetime ) {
    if( $datetime instanceof EE_Datetime_In_Calendar ) {
        $datetime = $datetime->datetime();
    }

    $permalink .= '#testing-dt-id-' . $datetime->ID() . '-event-id-' . $event->ID();

    return $permalink;
}
add_filter('FHEE__EE_Calendar__tooltip_event_permalink', 'tw_tooltip_permalink', 10, 3 );
add_filter('FHEE__EE_Datetime_In_Calendar__to_array_for_json__url', 'tw_tooltip_permalink', 10, 3 );

Note that you’ll need an updated copy of the calendar for using the function above.


Lorenzo


ardiaful

February 9, 2017 at 4:15 am

Thank you for your great support and code. This has worked for me.


Tony

  • Support Staff

February 9, 2017 at 5:52 am

I’m glad the above worked for you.

The branch you are using will be merged into the main branch and released with the next update to the Calendar.

Viewing 16 reply threads

The support post ‘Where to place custom file from Calendar plugin inside my Child Theme?’ 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