Home › Forums › Legacy Support › Support queries › Setup issues › Free Unit Popup is not working Properly
Tagged: free unit popup
- This topic has 20 replies, 4 voices, and was last updated 4 years, 3 months ago by Jackson.
-
AuthorPosts
-
July 6, 2020 at 2:11 pm #273161prateekgupta2009ParticipantI have tried the code given for free unit popup using this link: https://wplms.io/support/knowledge-base/open-free-units-in-a-popup-from-course-curriculum/ . I used the code given in Tested for WPLMS 3.9.8 When i click on free unit: https://prnt.sc/tcs8pf It shows me like above screenshot and it doesn't open player...I am using Vimeo for videos...July 7, 2020 at 10:59 am #273305VeronicaModeratorhi, please send all details regarding this like course url on which we can perform testing and the steps to replicate the same on your siteJuly 7, 2020 at 11:13 am #273308prateekgupta2009ParticipantThis reply has been marked as private.July 8, 2020 at 7:48 am #273503JacksonBlockedHello, Please Go to wp_admin -> Plugins -> editor -> WPLMS customizer plugin and add the given code in the editor add_filter('wplms_curriculum_course_lesson','wplms_custom_course_curriculum_free_access_2',10,3); function wplms_custom_course_curriculum_free_access_2($html,$lesson,$course_id){ $free=get_post_meta($lesson,'vibe_free',true); if(vibe_validate($free)){ $html =''.get_the_title($lesson).(vibe_validate($free)?''.__('FREE','vibe').'':'').''; } ?> jQuery(document).ready(function(){ jQuery('.ajax_unit').magnificPopup({ type: 'ajax', alignTop: true, fixedContentPos: true, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: 'my-mfp-zoom-in', callbacks: { parseAjax: function(mfpResponse) { mfpResponse.data = jQuery(mfpResponse.data).find('.unit_wrap'); }, ajaxContentAdded: function() { // jQuery('video,audio').mediaelementplayer(); jQuery('.fitvids').fitVids(); jQuery('.tip').tooltip(); jQuery('.nav-tabs li:first a').tab('show'); jQuery('.nav-tabs li a').click(function(event){ event.preventDefault(); jQuery(this).tab('show'); }); } } }); }); <?php return $html; } Thanks,July 8, 2020 at 7:52 am #273504JacksonBlockedHello, Please Go to wp_admin -> Plugins -> editor -> WPLMS customizer plugin and add the given code in the editor add_filter('wplms_curriculum_course_lesson','wplms_custom_course_curriculum_free_access_2',10,3); function wplms_custom_course_curriculum_free_access_2($html,$lesson,$course_id){ $free=get_post_meta($lesson,'vibe_free',true); if(vibe_validate($free)){ $html =''.get_the_title($lesson).(vibe_validate($free)?''.__('FREE','vibe').'':'').''; } ?> jQuery(document).ready(function(){ jQuery('.ajax_unit').magnificPopup({ type: 'ajax', alignTop: true, fixedContentPos: true, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: 'my-mfp-zoom-in', callbacks: { parseAjax: function(mfpResponse) { mfpResponse.data = jQuery(mfpResponse.data).find('.unit_wrap'); }, ajaxContentAdded: function() { // jQuery('video,audio').mediaelementplayer(); jQuery('.fitvids').fitVids(); jQuery('.tip').tooltip(); jQuery('.nav-tabs li:first a').tab('show'); jQuery('.nav-tabs li a').click(function(event){ event.preventDefault(); jQuery(this).tab('show'); }); } } }); }); <?php return $html; } Thanks,July 8, 2020 at 8:02 am #273506prateekgupta2009ParticipantThis reply has been marked as private.July 9, 2020 at 10:30 am #273728JacksonBlockedHello, Follow this tip : https://wplms.io/support/knowledge-base/open-free-units-in-a-popup-from-course-curriculum/ and In step 4 you can add the script in wp-admin -> wplms -> Footer -> google anaylitics code :
<script>
jQuery(document).ready(function(){
jQuery('.ajax_unit').magnificPopup({
type: 'ajax',
alignTop: true,
fixedContentPos: true,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: 'my-mfp-zoom-in',
callbacks: {
parseAjax: function(mfpResponse) {
mfpResponse.data = jQuery(mfpResponse.data).find('.unit_wrap');
},
ajaxContentAdded: function() {
// jQuery('video,audio').mediaelementplayer();
jQuery('.fitvids').fitVids();
jQuery('.tip').tooltip();
jQuery('.nav-tabs li:first a').tab('show');
jQuery('.nav-tabs li a').click(function(event){
event.preventDefault();
jQuery(this).tab('show');
});
}
}
});
});
<script>
July 9, 2020 at 11:23 am #273744prateekgupta2009ParticipantThis reply has been marked as private.July 10, 2020 at 1:36 pm #273966Anshuman SahuKeymasterThis reply has been marked as private.July 10, 2020 at 1:58 pm #273978prateekgupta2009ParticipantIts not showing properly on mobile: https://prnt.sc/tfe5li Free Unit PopUp is not responsive... And the size of Video is taking entire screen space however it should take screen size Course Preview Video Popup in header.. Also please check the mobile view size for free unit popup...July 11, 2020 at 2:46 pm #274157Anshuman SahuKeymasterYes in mobile we are having some issues .The video responsiveness is not working .I will try to fix it please provide time .Ping back for reminde r.July 14, 2020 at 9:10 am #274501prateekgupta2009ParticipantJust a reminder if it can be resolved little early because i have to make my site live in few days and its an import feature...July 15, 2020 at 2:05 pm #274784Anshuman SahuKeymasterHi this is fixed nowJuly 15, 2020 at 2:06 pm #274785Anshuman SahuKeymasterThis reply has been marked as private.July 20, 2020 at 4:34 pm #275982prateekgupta2009ParticipantOn mobile view why its showing white space on top & bottom when there is no content... it should only show the video ... -
AuthorPosts
- The topic ‘Free Unit Popup is not working Properly’ is closed to new replies.