• Resolved kaplunkiigirl

    (@kaplunkiigirl)


    Hi Joe,

    I’ve been trying to modify the event title if it’s an all-day event using certain “notime” text.

    I’ve successfully changed the title in:
    – the calendar view, using the ‘mc_heading_inner_title’ filter
    – the details pane, using the ‘mcs_time_block’ filter

    But I believe it’s not possible to modify the event title in
    – the details pane heading
    – the list view details
    as these directly use the event_title variable (from line 341 in my-calendar-output.php), which does not appear to have a filter attached to it before it’s used to create these elements.

    I’d really appreciate it you’d consider adding a filter for this variable as well, so that I can modify the event title in these other two locations.

    Thanks,

    Nikki

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    The next major release of My Calendar should go out next week, and any answer I gave on this question will be largely obsolete next week, since there are a number of new filters & some other related changes. So for now I’m going to focus on getting the release done, then get back to you next week.

    Thread Starter kaplunkiigirl

    (@kaplunkiigirl)

    Great, thanks. I’ll wait for the update!

    Plugin Author Joe Dolson

    (@joedolson)

    Update is released. With this update, you should be able to filter the titles globally using the filter ‘mc_filter_shortcodes’, which filters all template data for every event.

    I don’t believe that there are any front-end cases at this point that aren’t using this source for the data. (Back-end is different, since it needs to be showing what’s actually saved in the database.)

    This is an example using it to create a custom tag; but it could also manipulate existing data, e.g., taking $e[‘title’] and modifying it prior to display.

    Thread Starter kaplunkiigirl

    (@kaplunkiigirl)

    Brilliant, thank you! I’ll update my plugin and modify my code to suit.

    Thread Starter kaplunkiigirl

    (@kaplunkiigirl)

    OK, what I was actually trying to do was remove the “no time” label if it was present on an event.

    In other words, if it was an all day event, with the label “All day”, I didn’t want anything about this to appear in the date line.

    e.g. Monthly Instalment Due, All day
    vs: Monthly Instalment Due

    while allowing events with times to have the time displayed
    e.g. Board Meeting, 5:00pm

    So I found that your new “mc_event_content” was the filter I needed to strip this out in all locations at once.

    If there’s a more elegant way to prevent the “notime” label from being displayed at all, please let me know.

    Thanks! I really appreciate your plugin and your recent updates.

    Nikki

    Plugin Author Joe Dolson

    (@joedolson)

    Well, the easiest way to do that is to set the default ‘All Day’ text to a whitespace character, so it won’t be displayed.

    Thread Starter kaplunkiigirl

    (@kaplunkiigirl)

    Thanks, Joe.

    I tried that, but then I get something like:

    “Monthly Instalment Due,”

    for any event that’s all day, and I do want the comma there for my events that aren’t all day.

    Plugin Author Joe Dolson

    (@joedolson)

    Where is the comma coming from? I’m not sure what the context of that is.

    Thread Starter kaplunkiigirl

    (@kaplunkiigirl)

    Sorry, that’s because my event title template is:
    {title}, {time}

    Plugin Author Joe Dolson

    (@joedolson)

    Try {title}{time before=", "}

    Thread Starter kaplunkiigirl

    (@kaplunkiigirl)

    Brilliant, thank you! That works perfectly.

    Thread Starter kaplunkiigirl

    (@kaplunkiigirl)

    All sorted now, thanks.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Add additional filter for event title’ is closed to new replies.