open Free unit popup trouble!

Home Forums Legacy Support Support queries Other issues open Free unit popup trouble!

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #318659
    spyboys
    Spectator
    Hi, I'll refer your tip and paste this code in my plugin editor --> wplms_customizer.php
    add_filter('wplms_curriculum_course_lesson','wplms_custom_course_curriculum_free_access_2',999,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 ='<a href="'.get_permalink($lesson).'" class="ajax_unit">'.get_the_title($lesson).(vibe_validate($free)?'<span>'.__('FREE','vibe').'</span>':'').'</a>';
    
    ?>
    
    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');
    });
    }
    }
    });
    });
    
    
    <style>
    
    .mfp-ajax-holder .mfp-content{max-width:720px;}
    
    </style>
    
    <?php
    
    return $html;
    
    }
    But its came like this https://prnt.sc/v0388u please solve this problem and i want like this https://prnt.sc/v0398d
    #318778
    Veronica
    Moderator
    ok let me try this on my local setup
    #318821
    spyboys
    Spectator
    ping here after your test :)
    #318823
    Veronica
    Moderator
    hi please add this in wplms-customizer.php
    
    //Open Free Unit PopUp
    /*
    add_filter('wplms_curriculum_course_lesson','wplms_custom_course_curriculum_free_access_2',999,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 ='<a href="'.get_permalink($lesson).'" class="ajax_unit">'.get_the_title($lesson).(vibe_validate($free)?'<span>'.__('FREE','vibe').'</span>':'').'</a>';
    ?>
    <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>
    <style>
    .mfp-ajax-holder .mfp-content{max-width:720px;}
    </style>
    <?php
    return $html;
    }
    */
    
    #318908
    spyboys
    Spectator
    This reply has been marked as private.
    #319135
    Anshuman Sahu
    Keymaster
    This reply has been marked as private.
    #319146
    spyboys
    Spectator
    Thank you so much
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘open Free unit popup trouble!’ is closed to new replies.