add fully booked behind dates with [event rocket] or [tribe_mini_calendar]

Home Forums Calendar Products Events Calendar PRO add fully booked behind dates with [event rocket] or [tribe_mini_calendar]

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #968953
    thomas
    Participant

    hi,

    i use a blog post to display an event and display several dates from event posts in the template.
    i do this because even events calendar pro cannot display multiple events that aren’t recurring (you should work on that as a feature). actually i use the events only for the calendar view and redirect several events to one blog post via the “page links to” plugin.

    with the “event rocket” plugin i managed to grab the dates of a certain events (they all have the same tag) which is working quite well.

    in the edit section of an event post the user has a metabox where you can check to hide the event from the list and calendar view. and another option where you can check to highlight the event in the calendar view.
    how can i add a “fully booked” behind a date if the user checked the last option?

    maybe all the task could be achieved with [tribe_mini_calendar] but i doubt that since it seems not to be able to put out events that have a certain title (if so let me know).
    regards
    thomas

    #969008
    thomas
    Participant

    hi i just found out that the checked option is called:
    Sticky in Calendar View

    i need to find out which php-file is responsible for the back-end metabox.
    and which is responsible for the front-end calendar views.

    once i know which variable turns out to be true, it will be a flick of a wrist.

    #969019
    thomas
    Participant
    <label class="selectit"><input value="yes" type="checkbox" <?php checked( $post->menu_order == "-" ) ?> name="EventShowInCalendar"> <?php _e( "Sticky in Calendar View", 'tribe-events-calendar' ); ?>
    </label>

    is the responsible section for the admin menu.
    i found a big issue – once you check, you never go back!
    problem is the checkbox does not save it’s value in the metabox field at the editing section.

    so when you come back to edit an event, the checkbox is empty but the event is still sticky in the calendar and also on top in the post list. this is not good at all (users must be able to uncheck the option!)
    please update soon and provide me with an work-around
    thomas

    #969021
    thomas
    Participant

    it’s in /the-events-calendar/admin-views/event-sidebar-options.php

    <label class="selectit"><input value="yes" type="checkbox" <?php checked( $post->menu_order == "-" ) ?> name="EventShowInCalendar"> <?php _e( "Sticky in Calendar View", 'tribe-events-calendar' ); ?>
    </label>
    #969025
    thomas
    Participant

    allright, the unchecked and checked works again.
    i just need to know how to handle the shortcode

    #969042
    thomas
    Participant

    okay the checkboxes are saved, but unchecking don’t do anything. the is an deep issue here!
    once you make the post sticky you never unstick it.

    #969063
    George
    Participant

    Hi Thomas,

    While we do not offer support for Event Rocket, or customizations, it seems that the essence of your question is described here:

    and another option where you can check to highlight the event in the calendar view.
    how can i add a “fully booked” behind a date if the user checked the last option?

    In other words, it seems that you literally just want to add the text “Fully booked” next to the event date of an event whose “Sticky in Calendar View” option is checked. Is this correct? If so, I can recommend a filter to help make this work.

    If that is not exactly what you’re looking for, can you describe what you are looking for in a bit more detail? Use screenshots or any other materials you can think of – I’m sorry for not understanding your goals completely here, but I just want to understand what you’re trying to do so we can best help you out 🙂

    Thanks!
    George

    #969210
    thomas
    Participant

    hey george excactly i need a “fully booked” text behind the date if the “sticky in calendar view” option is checked.
    please provide me with the filter.

    #969216
    thomas
    Participant

    also here is a example:

    http://weintante.de/das-kleine-wein-abc/

    as you can see there are 3 dates which are loaded via shortcode from the event rocket plugin.
    i use a tag to filter the dates (every event that has the same tag as the slug from the blog post gets loaded).
    please let me know if this is allready supported by events calendars own short codes.

    #969220
    thomas
    Participant

    as you also might notice:
    Donnerstag, 15. Oktober 2015
    is on top of the list, because it was once checked as sticky.
    i unchecked but it’s staying on top of the list no matter what.

    #969287
    thomas
    Participant

    hi right now i hitting into the right direction, i guess.

    i use a custom template to display events now: tribe-events/dates.php

    <?php
    echo "<br>";
    echo tribe_get_start_date( $event = null, $displayTime = false );
    if ( $EventShowInCalendar=="yes" ) echo 'fully booked';
    ?>

    somehow this is not working
    regards

    #969302
    George
    Participant

    Hi Thomas,

    I’ll address some of your other questions first, before getting to your core customization question: Events Calendar itself does not have any shortcodes, so there is not a similar thing there to what you’re doing with Event Rocket. Next, there is unfortunately not a way for me to analyze your customizations to date.php, or any other file. We don’t offer any support for customizations here, and there could be many things going on on your site that would lead to certain behavior working or not working as expected, so the best thing I can recommend is just example code of how to make this customization with default, original plugin code.

    If you get things to work with completely original, un-edited code, then I’d recommend taking things from there and working on your customizations one at a time to see what you can come up with. And then, if things break after one step along the way, you can simply backtrack to the previous step and try something else.

    So, we will not be able to provide further customization beyond this, but this should help get you started: first, head to your theme’s functions.phpfile and add a filter to the event schedule details that will show “Fully Booked” if it’s checked to be a sticky in calendar or month view:

    
    add_filter( 'tribe_events_event_schedule_details', 'thomas_example_filter', 10, 2 );
    
    function thomas_example_filter( $schedule, $event_id ) {
    	$event = get_post( $event_id );
    
    	if ( -1 == $event->menu_order ) {
    		return '<span class="event-is-fully-booked">Fully Booked</span>' . $schedule;
    	}
    
    	return $schedule;
    }
    

    Change the function name, class name, “Fully Booked” text, anything want in this example. It should nicely, and add that span there, which you can then style by adding custom CSS to the bottom of your theme’s style.css file. Here’s an example of some CSS that I added:

    
    span.event-is-fully-booked {
        font-size: 1em;
        text-transform: uppercase;
        font-weight: bold;
        margin-right: 10px;
        vertical-align: baseline;
        color:#aa0000;
    }
    

    And here’s how that looks on a single event that is checked to be a “Sticky” event: https://cloudup.com/cWzI4Siqc7M

    It’s a quick example, but again, change the CSS to whatever you need and play around with this extensively.

    I hope this helps!
    George

    #969347
    thomas
    Participant

    hey george,

    thanks for this great hint, the functions.php entry didn’t work, however i ended up with this snippet in my dates.php which is working quite good:

    <?php
    $event = get_post( $event_id );
    echo "<br>";
    echo tribe_get_start_date( $event, $displayTime = false, $dateFormat = "l, j. F Y" );
    if ( -1 == $event->menu_order ) { echo " - fully booked"; }
    ?>

    only the issue with the menu_order is still there. once checked the date will stay on top no matter how many times i uncheck the “sticky in calendar view” option of an event. actually i don’t need the stickyness at all (i like to have an ascending order for the dates all the time).
    best regards
    thomas

    #969496
    George
    Participant

    Hey Thomas,

    I’m curious about what you wrote here:

    actually i don’t need the stickyness at all (i like to have an ascending order for the dates all the time).

    So then, basically, is all want “Fully Booked” text for events where all tickets have been sold?

    #969517
    thomas
    Participant

    excactly!

Viewing 15 posts - 1 through 15 (of 19 total)
  • The topic ‘add fully booked behind dates with [event rocket] or [tribe_mini_calendar]’ is closed to new replies.