Support » Plugin: Video Conferencing with Zoom » shortcode html style

  • Resolved datacide

    (@datacide)


    Hello,

    I was wondering if there is a way to modify or overwrite the html of the shortcode table located in the zvc-template-functions.php file via child theme.

    I would like to customize the look.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Deepen

    (@j_3rk)

    Hi @datacide

    For shortcode table yes. You can override it by copying whole video_conference_zoom_shortcode_table function to your child theme.

    Edit the table based on your requirement then.

    Thanks

    • This reply was modified 5 months ago by Deepen.
    datacide

    (@datacide)

    Hi,

    I tried putting the function into my functions.php from my child theme but am getting a fatal error about not being able to re-declare a function. I am not a php expert so maybe I missed something?

    Plugin Author Deepen

    (@j_3rk)

    Copy only the below code without the function_exists text

    function video_conference_zoom_shortcode_table( $zoom_meetings ) {
    		$hide_join_link_nloggedusers = get_option( 'zoom_api_hide_shortcode_join_links' );
    		?>
            <table class="vczapi-shortcode-meeting-table">
                <tr class="vczapi-shortcode-meeting-table--row1">
                    <td><?php _e( 'Meeting ID', 'video-conferencing-with-zoom-api' ); ?></td>
                    <td><?php echo $zoom_meetings->id; ?></td>
                </tr>
                <tr class="vczapi-shortcode-meeting-table--row2">
                    <td><?php _e( 'Topic', 'video-conferencing-with-zoom-api' ); ?></td>
                    <td><?php echo $zoom_meetings->topic; ?></td>
                </tr>
                <tr class="vczapi-shortcode-meeting-table--row3">
                    <td><?php _e( 'Meeting Status', 'video-conferencing-with-zoom-api' ); ?></td>
                    <td>
    					<?php echo $zoom_meetings->status; ?>
                        <p class="small-description"><?php _e( 'Refresh is needed to change status.', 'video-conferencing-with-zoom-api' ); ?></p>
                    </td>
                </tr>
    			<?php
    			if ( ! empty( $zoom_meetings->type ) && $zoom_meetings->type === 8 ) {
    				if ( ! empty( $zoom_meetings->occurrences ) ) {
    					?>
                        <tr class="vczapi-shortcode-meeting-table--row4">
                            <td><?php _e( 'Type', 'video-conferencing-with-zoom-api' ); ?></td>
                            <td><?php _e( 'Recurring Meeting', 'video-conferencing-with-zoom-api' ); ?></td>
                        </tr>
                        <tr class="vczapi-shortcode-meeting-table--row4">
                            <td><?php _e( 'Ocurrences', 'video-conferencing-with-zoom-api' ); ?></td>
                            <td><?php echo count( $zoom_meetings->occurrences ); ?></td>
                        </tr>
                        <tr class="vczapi-shortcode-meeting-table--row5">
                            <td><?php _e( 'Next Start Time', 'video-conferencing-with-zoom-api' ); ?></td>
                            <td>
    							<?php
    							$now               = new DateTime( 'now -1 hour', new DateTimeZone( $zoom_meetings->timezone ) );
    							$closest_occurence = false;
    							if ( ! empty( $zoom_meetings->type ) && $zoom_meetings->type === 8 && ! empty( $zoom_meetings->occurrences ) ) {
    								foreach ( $zoom_meetings->occurrences as $occurrence ) {
    									if ( $occurrence->status === "available" ) {
    										$start_date = new DateTime( $occurrence->start_time, new DateTimeZone( $zoom_meetings->timezone ) );
    										if ( $start_date >= $now ) {
    											$closest_occurence = $occurrence->start_time;
    											break;
    										}
    
    										_e( 'Meeting has ended !', 'video-conferencing-with-zoom-api' );
    										break;
    									}
    								}
    							}
    
    							if ( $closest_occurence ) {
    								echo vczapi_dateConverter( $closest_occurence, $zoom_meetings->timezone, 'F j, Y @ g:i a' );
    							} else {
    								_e( 'Meeting has ended !', 'video-conferencing-with-zoom-api' );
    							}
    							?>
                            </td>
                        </tr>
    					<?php
    				} else {
    					?>
                        <tr class="vczapi-shortcode-meeting-table--row6">
                            <td><?php _e( 'Start Time', 'video-conferencing-with-zoom-api' ); ?></td>
                            <td><?php _e( 'Meeting has ended !', 'video-conferencing-with-zoom-api' ); ?></td>
                        </tr>
    					<?php
    				}
    			} else if ( ! empty( $zoom_meetings->type ) && $zoom_meetings->type === 3 ) {
    				?>
                    <tr class="vczapi-shortcode-meeting-table--row6">
                        <td><?php _e( 'Start Time', 'video-conferencing-with-zoom-api' ); ?></td>
                        <td><?php _e( 'This is a meeting with no Fixed Time.', 'video-conferencing-with-zoom-api' ); ?></td>
                    </tr>
    				<?php
    			} else {
    				?>
                    <tr class="vczapi-shortcode-meeting-table--row6">
                        <td><?php _e( 'Start Time', 'video-conferencing-with-zoom-api' ); ?></td>
                        <td><?php echo vczapi_dateConverter( $zoom_meetings->start_time, $zoom_meetings->timezone, 'F j, Y @ g:i a' ); ?></td>
                    </tr>
    			<?php } ?>
                <tr class="vczapi-shortcode-meeting-table--row7">
                    <td><?php _e( 'Timezone', 'video-conferencing-with-zoom-api' ); ?></td>
                    <td><?php echo $zoom_meetings->timezone; ?></td>
                </tr>
    			<?php if ( ! empty( $zoom_meetings->duration ) ) { ?>
                    <tr class="zvc-table-shortcode-duration">
                        <td><?php _e( 'Duration', 'video-conferencing-with-zoom-api' ); ?></td>
                        <td><?php echo $zoom_meetings->duration; ?></td>
                    </tr>
    				<?php
    			}
    
    			if ( ! empty( $hide_join_link_nloggedusers ) ) {
    				if ( is_user_logged_in() ) {
    					$show_join_links = true;
    				} else {
    					$show_join_links = false;
    				}
    			} else {
    				$show_join_links = true;
    			}
    
    			if ( $show_join_links ) {
    				/**
    				 * Hook: vczoom_meeting_shortcode_join_links
    				 *
    				 * @video_conference_zoom_shortcode_join_link - 10
    				 *
    				 */
    				do_action( 'vczoom_meeting_shortcode_join_links', $zoom_meetings );
    			}
    			?>
            </table>
    		<?php
    	}

    Edit accordingly. This should work. !

    fdittmar

    (@fdittmar)

    @j_3rk
    Could we also use this to display the meeting password in the shortcode output table?
    (Many people, like me, may have the output in secure pages so display is ok)

    Maybe add something like:

    <tr class=”vczapi-shortcode-meeting-table–row2″>
    <td><?php _e( ‘Password’, ‘video-conferencing-with-zoom-api’ ); ?></td>
    <td><?php echo $zoom_meetings->meeting_password; ?></td>
    </tr>

    Thank you

    matc

    (@matc)

    Have just tried this and am also getting a redeclare error:

    Cannot redeclare video_conference_zoom_shortcode_table() (previously declared in wp-content/plugins/video-conferencing-with-zoom-api/includes/zvc-template-functions.php:218)

    datacide

    (@datacide)

    I too was getting the re-declare error. What I ended up doing is inserting this right before the function in the functions.php of my child theme:

    remove_action(‘vczoom_meeting_before_shortcode’, ‘video_conference_zoom_shortcode_table’, 10);
    add_action(‘vczoom_meeting_before_shortcode’, ‘video_conference_zoom_shortcode_table_styled’, 10);

    So basically removed it, then re-added it, then the modified function.
    Seems to work now.

    matc

    (@matc)

    Thanks, but still no luck. No longer getting the redeclare error, but the ‘new’ function is not getting called, or something else is wrong – no changes are working. Using a Genesis Child theme.

    matc

    (@matc)

    Working – stupidity – had backticks in rather than single quotes. Thanks.

    Plugin Author Deepen

    (@j_3rk)

    Hi Guys,

    This seemed to work for you ? I’ll close this ticket for the moment. Please open up a new thread if the issue persists.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.