WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] [patch] Hide end date in widget if equal to start date (9 posts)

  1. bernhard-reiter
    Member
    Posted 1 year ago #

    Patch against 2.0.10 to only display end time in TEC widget if end date is equal begin date.

    (German) example:
    4. Februar 2013 19:00 – 22:00

    instead of previously
    4. Februar 2013 19:00 –
    4. Februar 2013 22:00

    http://wordpress.org/extend/plugins/the-events-calendar/

    Upstream inclusion, pleeease?

  2. Klangwerk
    Member
    Posted 1 year ago #

    Hallo Bernhard,

    ich habe bisher nur geringe Kenntnisse von WordPress. Wie kann ich das Patch anwenden? Ich habe versucht über Notepad die Veränderungen ein zu fügen. Leider ohne Erfolg.

    Für Tipps wäre ich sehr dankbar.

    Klangwerk

  3. bernhard-reiter
    Member
    Posted 1 year ago #

    As per Klangwerk's request, here's another gist with both modified files in full length. Use the "View Raw" button on the right hand side to download. To apply the relevant changes, replace

    wp-content/plugins/the-events-calendar/public/template-tags/date.php
    and
    wp-content/plugins/the-events-calendar/views/events-list-load-widget-display.php

    by the respective files found at that gist. Needless to say, use at your own risk. Note that this was done using 2.0.10, and that updating the plugin afterwards will override these changes (unless upstream developers decide to include them in future releases).

  4. Klangwerk
    Member
    Posted 1 year ago #

    Thanks! It works!
    Klangwerk

  5. bl59marie
    Member
    Posted 1 year ago #

    This helped me as well.

    A supplementary question: Is it possible to not show the word "full day" (heldag in swedish) when it is a full day event?

  6. bernhard-reiter
    Member
    Posted 1 year ago #

    @bl59marie: Yes. In wp-content/plugins/the-events-calendar/views/events-list-load-widget-display.php, delete the lines that read

    if( $event->AllDay ) {
    				echo ' <small><em>('.__('All Day','tribe-events-calendar').')</em></small>';
             	}

    (should be lines 54-56).

  7. bl59marie
    Member
    Posted 1 year ago #

    Great! Thanks.

  8. bernhard-reiter
    Member
    Posted 1 year ago #

    As the project that I'm customizing The Events Calendar for keeps growing, and the changes have become too numerous to keep track of easily, I've forked TEC's wordpress plugin subversion repo on GitHub. Both the above patch and a couple of others are currently commits in the goldhauben branch. Feel free to check them out!

    I might denote the ones that I believe are fit for upstream inclusion later by moving them to the master branch later (though I guess it's kinda obvious which ones are), or by creating individual branches to be able to polish them.

  9. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    You're the man, Bernhard! I mentioned in my other thread that this might provide value to other users - and then I see this one, in which it already has :) Thanks again for what you've done and for helping out the community here.

    If you're ever interested in going PRO, shoot us an email (pro /a/ tri.be) and we'll see about getting you a discount on the license of your choosing...our way of saying thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic