Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Potsky

    (@potsky)

    Hi tomcazoom,

    it depends on your browser. It seems PDF are open in your browser because you have a PDF viewer, right ? When I click on a PDF on my computer, it is downloaded, never displayed in the browser. That’s why I don’t know if there is something to do.

    You can try manually to change the behaviour and tell me if it works or not…

    1. First, edit file wordpress/wp-content/plugins/s2member-secure-file-browser/class/psk_s2msfb.class.php
    2. Go to line 1228 (or near this one…)
    3. Replace line
    $li .= '<div class="jftctn"><a href="#" class="link" rel="' . $link . '">' . $display_name . $extended . '</a>';
    by
    $li .= '<div class="jftctn"><a href="#" class="link" target="_blank" rel="' . $link . '">' . $display_name . $extended . '</a>';
    4. Verify that files are opened in a new window now

    It will do the trick for all files. If it works, I will tell you how to enable this feature only for pdf files.

    Thread Starter Timberyom

    (@tomcazoom)

    thanks for your response.

    Unfortunately it did not work. We only offer pdf files so it would have been ok to enable it for all files.

    Plugin Author Potsky

    (@potsky)

    Ok… last chance :

    Go to the Dashboard > s2member > Download Options > Inline File Extensions

    and try to add the pdf extension to force s2member to deliver the file inline instead of via download…

    Does it work with your PDF plugin ?

    Thread Starter Timberyom

    (@tomcazoom)

    It is already set as loading pdfs as inline file extension.

    Thanks, we’ll have someone look into it.

    Plugin Author Potsky

    (@potsky)

    Ok. Sorry I can’t help you.

    Please let me know if you have found a solution !

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘open pdf in new window’ is closed to new replies.