PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Download code sample request

s2Member Plugin. A Membership plugin for WordPress®.

Download code sample request

Postby buck415 » June 9th, 2011, 1:34 pm

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?
System: Current versions of WordPress Multi Site / BuddyPress / BuddyPress ScholarPress Courseware / s2Member Pro
User avatar
buck415
Registered User
Registered User
 
Posts: 41
Joined: May 19, 2011
Location: New York, NY & San Francisco, CA

Re: Download code sample request

Postby Cristián Lávaque » June 10th, 2011, 12:00 am

Here you go:

Code: Select all
http://domain.org/?s2member_file_download=filename.pdf&s2member_file_inline=yes
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Download code sample request

Postby buck415 » June 10th, 2011, 5:22 am

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?
System: Current versions of WordPress Multi Site / BuddyPress / BuddyPress ScholarPress Courseware / s2Member Pro
User avatar
buck415
Registered User
Registered User
 
Posts: 41
Joined: May 19, 2011
Location: New York, NY & San Francisco, CA

Re: Download code sample request

Postby Cristián Lávaque » June 10th, 2011, 12:10 pm

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?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Download code sample request

Postby buck415 » June 10th, 2011, 12:48 pm

My primary browser is Firefox 4+, and it opens most other PDF's inline, inside the browser.
System: Current versions of WordPress Multi Site / BuddyPress / BuddyPress ScholarPress Courseware / s2Member Pro
User avatar
buck415
Registered User
Registered User
 
Posts: 41
Joined: May 19, 2011
Location: New York, NY & San Francisco, CA

Re: Download code sample request

Postby Jason Caldwell » June 14th, 2011, 12:08 am

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
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests

cron