Ability to selectively turn time off to not show on the event

Home Forums Calendar Products Events Calendar PRO Ability to selectively turn time off to not show on the event

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #907143
    Peter
    Participant

    Hi there,

    I need to be able to turn time off for some events the easiest way I have seen this is with timely which has a tick box to turn or hide the time. I have read on this thread: https://theeventscalendar.com/support/forums/topic/remove-start-time-and-end-time-from-all-events/ that time is turned of if you select all day and if both start and end date are the same then time wont show however in all views I still get the time 12:00 to 12:00 or 12:00 to 11:59? http://www.isa.nsw.edu.au/events/

    Can you please tell me how this can be fixed or added to the next update? Also how can I find all the posts I have on tribe?

    Regards

    Peter

    #907225
    Brook
    Participant

    Howdy Peter,

    Unfortunately I think that Gameplan has accidentally removed support for hiding the end dates with their calendar theme overrides. Most of the logic for whether or not to show a time and end date is within the overrides. For instance here is an excerpt from /modules/meta.php:

    if ( tribe_event_is_all_day() && tribe_event_is_multiday() ) :
    ?>
    ...
    <?php
    // All day (single day) events
    elseif ( tribe_event_is_all_day() ):
    ?>
    ...
    <?php
    // Multiday events
    elseif ( tribe_event_is_multiday() ) :
    ?>
    ...
    
    <?php
    // Single day events
    else :
    ?>
    ...
    
    <?php endif ?>

    So based on the conditionals it will do various stuff, like only display a time if it is an allday, only display an end date if it not all day and if it is not a multiday event. Etc. But, that logic can be removed by a theme override if it so choose, and it this case I think it chose. To confirm this you can switch themes and see if the expected behavior restores.

    I bet this was an accidental oversight. If you bring it up to Gameplan they would probably be happy to fix it in an update.

    – Brook

    #907279
    Peter
    Participant

    Hi Brook,

    Thank you I have put in a ticket with Cactus. Is there anything I could ad to override for the moment?

    Regards

    Peter

    #909518
    Brook
    Participant

    Simple disabling their theme overrides should fix it. To confirm, you can temporarily rename the theme/tribe-events/ folder to “tribe-events-bak”. Test, is it fixed? If so, rename it back. Now dive in to the view themselves. For instance list view has it’s own /list/ folder inside of /tribe-events/. Append “-bak” to it. Fixed for list view? If so you can once again rename it back now that we know it’s an override in that folder, and jump into the files inside of it. If there are multiple files inside of that folder rename each one until the problem goes away, then undo your rename on all except the last one. That is the culprit for list view. Now jump into the other views folders. You might need to repeat the whole process, but you can probably just find the same file in each add -bak to it.

    But, that might impact those views in undesirable ways. If you find that it does, you will have to wait on a the theme folks to fix it, or write a fix yourself inside of that file that you isolated above.

    If renaming /tribe-events/ did not fix it, it is possible that this being cause by a filter, perhaps inside of functions.php.

    Would that work while you wait?

    – Brook

    #909568
    Peter
    Participant

    Hi Brook,

    Ill take a look at this and let you know. But I suspect it is in their customisation having just had a quick look at the list.php file.
    Ill let you know how I go.

    Regards

    Peter

    #909594
    Brook
    Participant

    Makes sense. I will wait to hear back from you. Thanks!

    – Brook

    #940437
    Brook
    Participant

    Since this has gone for a while without a response I am going to archive the topic. However, if you still need help with this or anything else, please feel free to open a new topic. Cheers!

    – Brook

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Ability to selectively turn time off to not show on the event’ is closed to new replies.