• Resolved saugertyp

    (@saugertyp)


    Hello all

    I tested the plugin Events Manager and it’s pretty nice, but I can’t find a way to add different times to a date range.

    For example if the event starts on 24th july and ends on the 28th july, you can only add one time range for all days.

    I need to add a time range for every single day though, e.g.:

    24th july: 8 am – 10pm
    25th july: 10 am – 8 pm
    26th july: 9 am – 5 pm
    27th … and so on

    Since I don’t know how many dates and times should be possible, it must be a field which is add-able or delete-able. I have an example pic here:
    example pic

    If I click on the +, it adds a line to the date/time. If I click the -, it deletes the last line.

    To minimize the user input issues, a date-/timepicker will be much appreciated.

    I think that’s a huge improvement for this plugin. I would even buy a paid version of this plugin if this will be added. I need that 100%, else it doesn’t work for me, sadly.

    Please tell me also if there is already a way to add those different dates and times.

    Thanks in advance for the help!

    Best regards

    saugertyp

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter saugertyp

    (@saugertyp)

    Hello all,

    I’ve found another possible solution for my issue.
    Now I only need one more option in the plugin.

    Here is a screen of the backend:
    all day

    Ganztägig = the whole day from 12 am – 12 am the next day.

    So basically at the point: Veranstaltung startet am … bis … Ganztägig
    I need another option: “Different Times” = “Verschiedene Uhrzeiten”. Once you tick it, you should see that message “Different Times” or in German “Verschiedene Uhrzeiten” in the frontend too.

    Also “Veranstaltung startet am …” is wrongly translated. It must be “Veranstaltung startet um …”. I think it’s only shown in the backend in the window where you create the event or edit it, but it’s still confusing.

    And the last question: Where can I edit the Frontend submission form? I’ve used the shortcode [event_form] on my page to show it.

    • This reply was modified 6 years ago by saugertyp.
    • This reply was modified 6 years ago by saugertyp.
    Thread Starter saugertyp

    (@saugertyp)

    I want to buy the Plugin once this is fixed, but I can’t find a way to resolve my issues.

    Maybe a plugin developer can help? I need an answer to this issues before I can buy the plugin, else I can’t use it sadly.

    1st: I want to be able to tick “Different Times” in the backend to show the text “Different Times” in the front-end in the #_EVENTTIMES attribute. In German it’s called “Verschiedene Uhrzeiten”. At the moment you can only tick “All Day” or in German “Ganztägig”.

    2nd: If you only have a start time but no end time, it must only show the start time, not both. It works perfectly for the #_EVENTDATES attribute. If you only insert a start date, it only displays the start date and no range. I need the same for #_EVENTTIMES?

    3rd: The German translation: “Veranstaltung startet am …” is wrong. It must be “Veranstaltung startet um …” for the time.

    4th: Can you change the front-end submission form as a paying user? If no, where can I change it?

    5th: How can I add more {has_…} values? For example once there is no description for the event, how can I disable that? At the moment it looks like this:

    Beschreibung<br/>
    #_EVENTNOTES

    If I don’t have #_EVENTNOTES, it shouldn’t show “Beschreibung<br/>” either.
    I’ve found a code-snippet which I already used for another issue, but I can’t find a way to add more of these snippets:

    function em_event_output_condition_filter($replacement, $condition, $match, $EM_Event){
        // Checks for has_MOBA-Event? conditional
        if(is_object($EM_Event) && preg_match('/^has_(MOBA-Event?)$/', $condition, $matches)){
            if(array_key_exists($matches[1], $EM_Event->event_attributes) && !empty($EM_Event->event_attributes[$matches[1]]) ){
                $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
            }else{
                $replacement = '';
            }
        }
        return $replacement;
    }
    add_filter('em_event_output_condition', 'em_event_output_condition_filter', 1, 4);

    Thanks for the help!

    Thread Starter saugertyp

    (@saugertyp)

    I’ve fixed my 2nd issue: Used the wrong placeholders.. It works perfectly now.
    For my 3rd issue I’ve made a translation suggestion in the plugins website. I hope this will be changed.

    My 1st, 4th and 5th issue is still open. Can anyone help?

    Thread Starter saugertyp

    (@saugertyp)

    Not all solutions are upgrade-safe and I am too lazy to look for upgrade-safe solutions at the moment, but that’s how I solved the most:

    1st and 3rd solution:
    folder: /wp-content/plugins/events-manager/templates/forms/event/when.php
    You need to edit this file. Change ‘all day’ to ‘Verschiedene Uhrzeiten’. It will be displayed in the backend and in the frontend in the submission form.

    In the same file, change line 16 to:
    <span class=”em-event-text”><?php _e(‘Veranstaltung von’,’events-manager’); ?> </span>
    You now have “Veranstaltung von” except “Veranstaltung startet am”. It’s also changed in the backend and frontend.

    4th solution: /wp-content/themes/YOUR THEME/plugins/events-manager/forms/event-editor.php
    You can apply changes in this file.

    5th solution: You need to add this code to your functions.php and change my has_… attributes to the attributes you need. If you need more attributes, just add them. I’ve found this code-snippets here.
    At the end the code looks like this:

    function em_event_output_condition_filter($replacement, $condition, $match, $EM_Event){
    
     // Checks for has_notes conditional
     if (is_object($EM_Event) && preg_match('/^has_(notes)$/', $condition, $matches)) {
     if (isset($EM_Event->$matches[1]) && !empty($EM_Event->$matches[1])) {
     $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
     } else {
     $replacement = '';
     }
     }
    
    // Checks for has_Telefon conditional
    if(is_object($EM_Event) && preg_match('/^has_(Telefon)$/', $condition, $matches)){
            if(array_key_exists($matches[1], $EM_Event->event_attributes) && !empty($EM_Event->event_attributes[$matches[1]]) ){
                $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
            }else{
                $replacement = '';
            }
        }
    
    // Checks for has_Homepage conditional
    if(is_object($EM_Event) && preg_match('/^has_(Homepage)$/', $condition, $matches)){
            if(array_key_exists($matches[1], $EM_Event->event_attributes) && !empty($EM_Event->event_attributes[$matches[1]]) ){
                $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
            }else{
                $replacement = '';
            }
        }
    
        return $replacement;
    }
    
    add_filter('em_event_output_condition', 'em_event_output_condition_filter', 1, 4);

    I hope this helps anyone out there. 🙂

    • This reply was modified 5 years, 11 months ago by saugertyp.
    • This reply was modified 5 years, 11 months ago by saugertyp.

    For Developers:
    Please add these features to the base version of the plugin:
    -The possibility of adding certain days (not all) to a date range
    -The possibility of adding time slots for each date
    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Different Times inbetween an event’ is closed to new replies.