Modify table-mini.php (widget cal) to link directly to date

Home Forums Calendar Products Events Calendar PRO Modify table-mini.php (widget cal) to link directly to date

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #17151
    Tom
    Member

    I am trying to modify even-calendar so that the table-mini.php does not display the little pop up but instead enabled you to click directly through to an event on days where there is an event.

    This is done in table.php via

    if( function_exists(‘tribe_get_linked_day’) ) {
    $return .= tribe_get_linked_day($date, $day); // premium
    } else {
    $return .= $day;
    }

    Which is fine but then I lack the ability to add custom css to active days (i.e. days with events go red) so that people know what is active/inactive.

    I have pasted the function I have modified into pastebin. Any help would be seriously appreciated!

    http://pastebin.com/wPCV6DcW

    #17188
    Rob
    Member

    Hey Tom. Thanks for the note here. This is an interesting idea. That plugin was designed to be pretty bare bones so I’m not sure how much we can offer up on the suggestion route, but let me see if our dev Jonah can point you in the right direction.

    #17194
    Tom
    Member

    Yes, any help would be much appreciated.

    I am sure there must be a simple way to get href=”” . tribe_get_day_link($date) . “‘ to work in that context? I am probably just being daft

    #17203
    Rob
    Member

    Got it. I’ve sent this Jonah’s way and he should be commenting when he hits the forums next. Thanks for being patient, Tom.

    #17347
    Jonah
    Participant

    Hi Tom, I don’t quite get it. So you want to remove the popup altogether and have the day link to an event on that day? What about days where you have multiple events? Where would the day link to then?

    #17487
    Tom
    Member

    @Jonah.
    Yes exactly. The calendar won’t have event everyday so i imagined the users flow to be:
    Click day -> Display all events on that day (which the get_day_link does) -> Click event -> Display Event.

    #17540
    Jonah
    Participant

    Hi Tom, I think I finally figure this out. It’s a multi step solution so here goes:

    1. Modify your table-mini.php file (place a copy in an ‘events’ folder in your theme first) replacing line 89 with: https://gist.github.com/2293961

    2. Next deregister the default calendar js by using: https://gist.github.com/2026611

    3. The deregister script also contains code to register your own js file, so make a copy of /wp-content/plugins/the-events-calendar/resources/events.js and place in the ‘events’ folder you created in your theme. Then simply comment out lines 29-46 which is the js for the “little popups” which will disable the tooltip popups.

    Let me know how it goes!

    #976439
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Modify table-mini.php (widget cal) to link directly to date’ is closed to new replies.