Page 1 of 1

Download code sample request

PostPosted: June 9th, 2011, 1:34 pm
by buck415
Hi.

I need to request a sample of how to use the &s2member_file_inline=yes command.

This code is used to download files.
Code: Select all
http://domain.org/?s2member_file_download=filename.pdf


Where does &s2member_file_inline=yes go in that code?

Re: Download code sample request

PostPosted: June 10th, 2011, 12:00 am
by Cristián Lávaque
Here you go:

Code: Select all
http://domain.org/?s2member_file_download=filename.pdf&s2member_file_inline=yes

Re: Download code sample request

PostPosted: June 10th, 2011, 5:22 am
by buck415
Thanks for confirming that I have set the inline code properly. I assumed it goes after the filename, but the file does not open inline (within the browser).

I've tested this using FireFox 4+ and the current Chrome and each time it prompts me to directly open the file in Acrobat or to download it to my pc.

Is that what's supposed to happen with the PDF when using the inline code?

Re: Download code sample request

PostPosted: June 10th, 2011, 12:10 pm
by Cristián Lávaque
It should open it in the browser, unless the browser is configured to download it. Does the browser open other PDFs instead of starting a download?

Re: Download code sample request

PostPosted: June 10th, 2011, 12:48 pm
by buck415
My primary browser is Firefox 4+, and it opens most other PDF's inline, inside the browser.

Re: Download code sample request

PostPosted: June 14th, 2011, 12:08 am
by Jason Caldwell
Have you tried configuring the file extension ( pdf ) in s2Member's configuration options? See: s2Member -> Download Options -> Inline File Extensions. If that solves the problem, then I suspect that your WordPress editor is somehow corrupting the ampersand sign in the link.
Code: Select all
http://domain.org/?s2member_file_download=filename.pdf&s2member_file_inline=yes

Quick Tip: You can get PDF files to display at exactly 100% ratio by formulating your link like this:
Code: Select all
http://domain.org/?s2member_file_download=filename.pdf&s2member_file_inline=yes#zoom=100

Reference article:
http://www.steverindsberg.com/psfaq/FAQ00050.htm