• Resolved airdrummer

    (@airdrummer)


    since the 5may version, past events do not display event passed message in place of countdown; countdown module is not output at all:-\

    and the ical/gcal links should not be shown @ all…i have overridden single-mec-events.php to do that:

    <script type="text/javascript" id="cghoa-reparent-export-div">
        var icals = document.querySelector(".mec-event-export-module");
        var countdown = document.querySelector("#mec_countdown_details");
        if ( countdown === null )
        {
            icals.remove();
            var msg = document.createElement("h3");
       	var text = document.createTextNode("This event has passed");
       	msg.appendChild(text);
        	var infobox = document.querySelector(".mec-event-meta");
        	infobox.insertBefore(msg, infobox.firstChild);
        }
    

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter airdrummer

    (@airdrummer)

    curiously, https://cardinalglen.org/events/planting-party/ does show the countdown, and when displaying list using Single Event Display Method modal popup, there is an expired notification, but the ical/gcal links are still displayed, and the organizer info is displayed before the local time instead of after the location, as in the single page:-\

    • This reply was modified 3 years, 6 months ago by airdrummer.
    • This reply was modified 3 years, 6 months ago by airdrummer.
    Thread Starter airdrummer

    (@airdrummer)

    obe: i just discovered ur export>Hide for Expired Events flag, but i still need to insert “this event has passed” when countdown is missing, and move export to where it’s more visible:

    <script type="text/javascript" id="cghoa-reparent-export-div">
        var countdown = document.querySelector("#mec_countdown_details");
        if ( countdown === null )
        {
     	var msg = document.createElement("h3");
    	msg.appendChild(document.createTextNode("This event has passed"));
    	var infobox = document.querySelector(".mec-event-meta");
    	infobox.insertBefore(msg, infobox.firstChild);
            countdown = document.querySelector(".mec-events-meta-group-countdown");
    	if (countdown !== null) 
    	    countdown.remove();
        }
        var icals = document.querySelector(".mec-event-export-module");
        if ( icals !== null )
        {
            var descr = document.querySelector(".mec-single-event-description");
    	var b4    = document.querySelector(".sharedaddy");
    	if ( b4 === null)
    	{
                b4 = document.querySelector("#jp-relatedposts");
                if ( b4 === null )
            	b4 = descr.lastChild.nextSibling;
    	}
            descr.insertBefore(icals,b4);
        }
    </script>

    the modal popup still puts the organizer above the date/time…

    Thread Starter airdrummer

    (@airdrummer)

    i can’t seem to find where to request features, so i’ll just enter it here;-)
    in modern-events-calendar-lite/app/modules/countdown/details.php:

    50,51c50
    < if(trim($countdown_method) == '')
    <     $countdown_method = 'global';
    ---
    > if(trim($countdown_method) == '') $countdown_method = 'global';
    53,56c52,53
    < if($countdown_method == 'global') 
    <     $ongoing = ( isset($settings['hide_time_method']) and (trim($settings['hide_time_method']) == 'end') );
    < else
    <     $ongoing = ( $countdown_method == 'end');
    ---
    > if($countdown_method == 'global') $ongoing = (isset($settings['hide_time_method']) and trim($settings['hide_time_method']) == 'end') ? true : false;
    > else $ongoing = ($countdown_method == 'end') ? true : false;
    58d54
    < $cd2 = "starts in";
    61c57
    <     echo '<div class="mec-end-counts"><h3>'.__('This event has passed', 'modern-events-calendar-lite').'</h3></div>';
    ---
    >     echo '<div class="mec-end-counts"><h3>'.__('The event is finished.', 'modern-events-calendar-lite').'</h3></div>';
    64c60
    < elseif($d1 < $d2)
    ---
    > elseif($d1 < $d2 and !$ongoing)
    66,71c62,63
    <     if (!$ongoing)
    <     {
    <         echo '<div class="mec-end-counts"><h3>'.__('Going on NOW!', 'modern-events-calendar-lite').'</h3></div>';
    <         return;
    <     }
    <     $cd2 = "ends in";
    ---
    >     echo '<div class="mec-end-counts"><h3>'.__('The event is ongoing.', 'modern-events-calendar-lite').'</h3></div>';
    >     return;
    144d135
    <     <?php  echo $cd2; ?>
    Plugin Contributor webnus

    (@webnus)

    Hello @airdrummer,

    Thank you for contacting us,

    Could you please submit your requests here: https://webnus.net/modern-events-calendar/feature-request/.
    We would check them, and if it is possible add them in so we will include them in the next updates.

    Best Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘past events do not display event passed message in place of countdown’ is closed to new replies.