• Resolved drab

    (@drab)


    Hi
    I have LMS site where users can preview a course. When enrolled, they are then able to access course content (which would contain the zoom meeting details and join link). However, in the preview screen, I just want to display the Zoom meeting time and date only (nothing else). How can we achieve this?

    Thanks in advance.
    Regards,
    drab.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor digamberpradhan

    (@digamberpradhan)

    Hi @drab ,

    There isn’t an option to do this right out of the box.
    This can be done but some customization is required.
    Please let me know if you are comfortable adding PHP Code and i can provide you some code you can add to create a shortcode that would do so.

    Thread Starter drab

    (@drab)

    Thank you for your response. I am comfortable with coding. Please do share the code.

    Thanks,
    drab

    Thread Starter drab

    (@drab)

    Hello again.
    Just wanted to ping you that I am really looking forward to the code. Kindly assist.

    Thanks,
    drab.

    Plugin Contributor digamberpradhan

    (@digamberpradhan)

    Hi @drab,

    The code below will create a shortcode that shows date and time of the meeting,
    The meeting id needs to be passed to the shortcode

    function cm_20220515_meeting_details( $args ) {
    	$args = shortcode_atts(
    		[
    			'meeting_id' => null,
    		]
    		, $args );
    
    	if ( $args['meeting_id'] == null ) {
    		return;
    	}
    
    	if ( class_exists( 'Codemanas\VczApi\Shortcodes\Helpers' ) ) {
    		$meeting = Codemanas\VczApi\Shortcodes\Helpers::fetch_meeting( $args['meeting_id'] );
    		ob_start();
    		$meeting->timezone;
    		echo vczapi_dateConverter($meeting->start_time, $meeting->timezone, 'd M Y, H:i a', false).' '.$meeting->timezone;
    		return ob_get_clean();
    	}
    }
    
    add_shortcode( 'cm_zoom_date_and_time_only', 'cm_20220515_meeting_details' );

    You can use it like [cm_zoom_date_and_time_only meeting_id="12341123"]

    I hope this is what you are looking for.

    Thread Starter drab

    (@drab)

    Hello Digamber,

    Thank you so much for the code. It is what I needed except for one thing; this outputs time in the timezone selected when creating the meeting. I need it to be in the local browser timezone.

    The normal zoom meeting details page (ie the page where I place the original zoom meeting shortcode) converts the original selected timezone to the local browser timezone (which is correct). I need the time to be in the local timezone (like what zoom does in the output)

    e.g. When creating a new meeting for 2 pm, I selected the Egypt timezone. If someone in Nepal views the meeting details for this (ie. output using the zoom display shortcode), they will see 5.45 pm as the meeting time.

    In case of your code, I’m still seeing Egypt time 2pm while Im in Nepal. I hope this clarifies the question.

    I appreciate your help on this, and I am already amazed at the support you are providing.
    Thanks in advance.
    drab

    Plugin Contributor digamberpradhan

    (@digamberpradhan)

    Hi @drab ,

    On the single meeting page – the meetings are converted to users date and time via javascript. What happens is to get the users current timezone you need to be able to access the clients browser details.

    The code i’ve provided you only uses PHP which cannot retrieve the users current timezone – that is why the time is being displayed with the timezone the meeting was created on.

    I hope that helps.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show Zoom Time and Date only’ is closed to new replies.