")); if(item.Livewebcast_link != ""){ var videoURL = item.Livewebcast_link; if(item.Livewebcast_link.indexOf("#") != -1){ var testArr = item.Livewebcast_link.split("#"); videoURL = testArr[1]; } var youtubeID = getYouTubeId(videoURL); var embedLink = "https://www.youtube.com/embed/"+youtubeID; $("#webcastLink").removeClass("hidden"); document.getElementById("webcastLink").src = embedLink; } if(item.Banner_img != ""){ $("#banner_img").attr("src",item.Banner_img); } if(item.Additional_link_url != ""){ $("#additionalLinks").append(''+item.Additional_link_text+''); } if(item.Inperson_registartion_link != ""){ $("#regLinks").append('Inscription en personne '); } if(item.Zoom_registration_link != ""){ const regex = /id=(\d+)/; const match = item.Zoom_registration_link.match(regex); if (match && match.length > 1) { const extractedNumber = match[1]; $("#regLinks").append('Rejoindre la r閡nion Zoom'); console.log(extractedNumber); // Output: 217973 } else { $("#regLinks").append(' Inscription pour Zoom'); } } }); console.log(session_data); //SpeakerHTML var sessionHTML = ""; $.each(session_data, function(i, item) { sessionHTML += '
'+item.Type+'
'; } } var sessionTitle = item.Title_f; if(sessionTitle == "" || sessionTitle == null){ sessionTitle = item.Title_e; } if(display_session_time == "No"){ sessionHTML += '(http(s)?:\/\/)?([^\s]+\.)+[^\s]{2,}<\/p>$/gi; var url = item.Biographie.match(urlRegex); if (url) { // the string contains only a URL wrapped with
tags item.Biographie = url[0].replace(/<\/?p>/g, ''); // Remove
tags } if (item.Biographie.indexOf("linkedin.com") != -1) { returnHTML += '
tags returnHTML += '
'+spkTitle +', '+ spkOrg +'
'; } else{ returnHTML += ''+ spkOrg +'
'; } } else{ if(spkTitle != ""){ returnHTML += ''+spkTitle +'
'; } } var spkPresText = ""; if(item.Presentation_text_f !== null){ spkPresText = item.Presentation_text_f; } else if(item.Presentation_text !== null){ spkPresText = item.Presentation_text; } if(item.Presentation_link !== null){ var presentation_text = "Presentation"; if(item.Presentation_text !== null){ presentation_text = spkPresText; } returnHTML += ' '+presentation_text+''; } if(item.Presentation_ext !== null){ if(spkPresText != ""){ returnHTML += ' '+spkPresText+''; } else{ returnHTML += ' Presentation'; } } if(spkPresText != "" && (item.Presentation_link === null && item.Presentation_ext === null)){ returnHTML += ' ' + spkPresText + ''; } returnHTML += '") != -1){ panQuote = panBio.substring(panBio.indexOf('')+8); } else{ finalBio = panBio; } // //console.log(finalBio); modal.find('#spkTitle').html(speakerHeader); modal.find('#spkBio').html(finalBio); if(show_speaker_images != "No"){ modal.find('#spkImage').html(speakerImg); } else{ modal.find('#spkImage').addClass('hidden'); $("#spkBio").removeClass("col-lg-8").addClass("col-lg-12"); } modal.modal('show'); }); }); } function getYouTubeId(url) { var regExp = /^.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/; var match = url.match(regExp); if (match && match[1].length === 11) { return match[1]; } else { return null; } } function replaceTitles(inputString, language) { // Define title replacements for French and Spanish const titleReplacements = { 'Mr.': { 'fr': 'M.', 'es': 'Sr.' }, 'Ms.': { 'fr': 'Mme', 'es': 'Sra.' }, 'Dr.': { 'fr': 'Dr', 'es': 'Dr.' } }; // Check if the input string contains titles to replace for (const title in titleReplacements) { if (inputString.includes(title)) { // Replace the title based on the specified language const replacement = titleReplacements[title][language]; inputString = inputString.replace(title, replacement); } } return inputString; } //LOAD Other Subject Events //get_wto_events_body("3","TRDIA");') + 7,panBio.indexOf('')); panQuote = ''; finalBio = panQuote + panBio.substring(panBio.indexOf(''+panQuote+'