• Resolved kopyright

    (@kopyright)


    Would it be possible to add an option for setting a prefix when a date is displayed? I would like to have the text “Today in…” shown before an event’s date, but so far I always have to add this straight in the source code which is slightly annoying as this change gets lost after each udpate.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous User 393930

    (@anonymized-393930)

    This should be possible and I’ll add it to the list for a future version.

    Anonymous User 393930

    (@anonymized-393930)

    Can use tell me where and when you are adding this text? I am trying to understand how you are expecting this to work.

    Thread Starter kopyright

    (@kopyright)

    Right now the widget only reads “1990 something happened”, but for the widget I wanted it to read “Today in 1990 something happened” as I feel it looks a bit nicer.

    For the time being I have changed line 74 in tdih-widget.php to this…

    echo 'Today in <span class="tdih_event_year">'.$year.'</span>';

    … but that change gets lost with every update. It would be nice to be able to set an optional standard prefix when the year is shown in the widget.

    It’s been a while since I was fluent in PHP, but at around line 73 there could be something like this added I suppose.

    if (!empty($prefix_text)) {
       echo $prefix_text . ' ';
    }
    Anonymous User 393930

    (@anonymized-393930)

    Thanks, that’s what I thought but it was worth checking.

    Anonymous User 393930

    (@anonymized-393930)

    This is included in version 3.6

    Thread Starter kopyright

    (@kopyright)

    Great, looking forward to the update!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Possibility to add a prefix to dates?’ is closed to new replies.