Support » Plugin: The Events Calendar » Removing the @ from the date and date

  • Resolved marshallsam

    (@marshallsam)


    Hi,

    I have recently installed The Event Calendar and are interesting in purchasing the Pro version with the ticket add-on. However my client does not like the use of the @ symbol in the start/end and time on the events and would like this to changed to ‘at’. If you could confirm the process for changing this? That would be great as think this new version is great and would like my client to use it.

    Thank You in advance

    Sam

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    I have resolved the above issue, by adjusting the code within the general.php file to remove the @. I have now purchased the PRO version of the software for the client however wondered if it was possible to restrict the “day of” filter (Day view) to a selected range and also set the default “day of” filter” when the visitor goes into events as my client is running a weekend event and would like the saturday events to appear first.

    Thank you in advance

    Sam

    Can you describe to me how you changed the @ to ‘at’.

    Thanks.

    Hey isvei,

    The changes are in the general.php file located at public/template-tags/general.php. The code is around line 783 (not sure exactly as have modified the file before)

    The code in question is outlined below where the option has been changed to 2013
    instead of @:

    else {
    $schedule .= ‘<span class=”date-start dtstart”>’;
    $schedule .= tribe_get_start_date( $event, false, $format ) . ‘ 2013
    ‘ . tribe_get_start_date( $event, false, $timeFormat );
    $schedule .= ‘<span class=”value-title” title=”‘. $microformatStartFormat .'”></span>’;
    $schedule .= ‘</span> – ‘;
    $schedule .= ‘<span class=”date-end dtend”>’;
    $schedule .= tribe_get_end_date( $event, false, $format2ndday ) . ‘ 2013
    ‘ . tribe_get_end_date( $event, false, $timeFormat );
    $schedule .= ‘<span class=”value-title” title=”‘. $microformatEndFormat .'”></span>’;
    $schedule .= ‘</span>’;
    }

    } elseif ( tribe_event_is_all_day( $event ) ) { // all day event
    $schedule .= ‘<span class=”date-start dtstart”>’;
    $schedule .= tribe_get_start_date( $event, true, $format );
    $schedule .= ‘<span class=”value-title” title=”‘. $microformatStartFormat .'”></span>’;
    $schedule .= ‘</span>’;
    } else { // single day event
    if ( tribe_get_start_date( $event, false, ‘g:i A’ ) === tribe_get_end_date( $event, false, ‘g:i A’ ) ) { // Same start/end time
    $schedule .= ‘<span class=”date-start dtstart”>’;
    $schedule .= tribe_get_start_date( $event, false, $format ) . ‘ 2013
    ‘ . tribe_get_start_date( $event, false, $timeFormat );
    $schedule .= ‘<span class=”value-title” title=”‘. $microformatStartFormat .'”></span>’;
    $schedule .= ‘</span>’;
    } else { // defined start/end time
    $schedule .= ‘<span class=”date-start dtstart”>’;
    $schedule .= tribe_get_start_date( $event, false, $format ) . ‘ 2013
    ‘ . tribe_get_start_date( $event, false, $timeFormat );
    $schedule .= ‘<span class=”value-title” title=”‘. $microformatStartFormat .'”></span>’;
    $schedule .= ‘</span> – ‘;
    $schedule .= ‘<span class=”end-time dtend”>’;
    $schedule .= tribe_get_end_date( $event, false, $timeFormat ) . ‘<span class=”value-title” title=”‘. $microformatEndFormat .'”></span>’;
    $schedule .= ‘</span>’;
    }
    }

    I hope this helps if not let me know.

    Regards,

    Sam

    Thanks, it worked. 🙂

    Awesome!

    Plugin Author Rob La Gatta

    (@roblagatta)

    Modern Tribe Support

    Excellent to hear you got this sorted yourself, marshallsam! Thanks so much for both figuring it out and for coming back to share your experience here with isvei. This will surely be of value for other users who find themselves looking to accomplish this same goal down the road.

    I’m going to mark this Resolved, because it seems we’re set. But let me know if I’m misunderstood or if we need to do anything else here.

    Hi just a short question:

    Will this code change be overwritten by future updates of the plugin?

    If you edit this file: plugins/the-events-calendar/public/template-tags/general.php it will be overwritten when you update.

    But If you make a copy of that general.php and place it here:
    themes/YOUR_THEME/tribe-events/public/template-tags/general.php, then your safe.

    At least that worked out for me.
    Good luck.

    Plugin Author Barry Hughes

    (@websitebakery)

    Thanks isvei!

    @isvei

    Use filters in your theme function.php

    function my_tribe_events_event_schedule_details($event) {
    
    	$event = str_ireplace( '@', 'at', $event );
    	return $event;
    }
    add_filter('tribe_events_event_schedule_details', 'my_tribe_events_event_schedule_details');
    Plugin Author Barry Hughes

    (@websitebakery)

    Just a note that we’re adding a new filter to help cleanly modify a number of aspects of scheduled details output so that resorting to string manipulation, for instance, isn’t necessary (not that it’s necessarily bad, but just to offer an alternative avenue) and that should roll out in the next/next next release.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Removing the @ from the date and date’ is closed to new replies.