Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello guys, I also came across this problem after updating plugins. I managed to adjust the EBD using @kzeni initial idea, but I made the adjustments in another function and it worked.

    For some reason $_GET[‘uid’] is returning 0. So I renamed the parameter only when delivering the file and it worked.

    I change the class “record” and “ebd_the_download” on class-email-before-download-public.php

    public function record($allowed, $download){
            $permalink = get_option('permalink_structure');
            if($permalink != ""){
                $downloadID = $download->post->ID;
            }else {
                $downloadID = sanitize_key($_GET['download']);
    
            }
            $db = new Email_Before_Download_DB();
            
                if(isset($_GET['uid'])) {
                    $link = $db->select_link('uid', $_GET['uid_new']);
                    if (!$link)
                        wp_die(__('Invalid UID Please fill out a new form to generate a new link.', 'email-before-download'));
    
                    if ($this->expired($link))
                        wp_die(__('This download has expired. Please fill out a new form to generate a new link.', 'email-before-download'));
    
                    $db->mark_downloaded($link->id);
                }
    
    
        return $allowed;
    }
    public function ebd_the_download($content){
            
        if(isset($_GET['ebddl'])) {
    
        $db = new Email_Before_Download_DB();
        $download_id = sanitize_key($_GET['download']);
    
                $link = $db->select_link('uid', sanitize_key($_GET['ebddl']));
                // if($download_id == 'ebddl')
                //     return 'Custom link!';
                if ($this->expired($link))
                    wp_die(__('This download has expired. Please fill out a new form to generate a new link.', 'email-before-download'));
    
                $url = do_shortcode("[download_data id=\"".$link->selected_id."\" data=\"download_link\"]");
                $parsed_link = parse_url($url);
                
                if(isset($parsed_link['query'])){ 
                    // The link already has URL parameters being set
                    $url .= "&uid_new=".$link->uid;
                }else{ 
                    $url .= "?uid_new=".$link->uid;
                    // This is the first URL parameter in the link
                }
               
                if ( ! function_exists( 'wp_redirect' ) ) {
                    return $content;
                }
                wp_redirect( $url );
                exit;
            }
    
    
    return $content;
    }

    Please, check the configs of EBD. I had this problem to, and noticed that update erased all configs on ESB. When I fixed that, the mails returned to worked properly.

    Good Lucky.

    Please, check the configs of EBD. I had this problem to, and noticed that update erased all configs on ESB. When I fixed that, the mails returned to worked properly.

    Good Lucky.

    Thread Starter joaokrabbe

    (@joaokrabbe)

    Dude, I put your code in my project and works fine

    [video mp4="http://www.a-clip.de/testsite/wp-content/uploads/2013/08/think_global_build_social_Peter_Rich.mp4" autoplay="y"] [/video]

    Wheter autoplay=”y” or autoplay=”autoplay”

    Are you sure you print right the shortcode?
    What browser are you using? because some browser’s don’t play .mp4. For chrome the best format is WebM/VP8.

    See this:
    http://www.w3schools.com/html/html5_video.asp

    Thread Starter joaokrabbe

    (@joaokrabbe)

    I used a video converter, that included the autoplay on the file.
    And work. So, I don’t no why, but work.

    Converter:
    http://www.any-video-converter.com/products/for_video_ultimate/

Viewing 5 replies - 1 through 5 (of 5 total)