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™

Give file access to Google Doc Viewer

s2Member Plugin. A Membership plugin for WordPress®.

Give file access to Google Doc Viewer

Postby atreidex » August 26th, 2011, 12:09 pm

Hello everyone!

Is there any simple way to give access to protected files for Google Doc Viewer.
I want to download-protect a DOC file and then include it in a page using a plugin like "Google Doc Embedder".
However, s2member sees the Google server as a unregistered member and i get a "sorry-no access" error when trying to see the file in the preview frame.

Any help / tip is greatly appreciated.

Cheers,
Ciprian
User avatar
atreidex
Registered User
Registered User
 
Posts: 1
Joined: August 26, 2011

Re: Give file access to Google Doc Viewer

Postby Cristián Lávaque » August 27th, 2011, 1:02 am

Hi Ciprian. I emailed Jason asking him how it could be done. :)
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: Give file access to Google Doc Viewer

Postby Jason Caldwell » August 27th, 2011, 2:29 pm

Ordinarily, if you were going to integrate with a 3rd-party tool like Google's Doc Viewer, you would integrate your protected file with "Advanced Download Restrictions" ( i.e. using a Download Key ), as is discussed in your Dashboard, under: s2Member -> File Downloads -> Advanced Download Restrictions.

For example, this should work:
Code: Select all
http://docs.google.com/viewer?url=<?php echo urlencode(site_url("/?s2member_file_download_key=".s2member_file_download_key("/file.doc")."&s2member_file_download=/file.doc")); ?>

However, upon testing this specifically with the Google Doc Viewer, it does not work. I suspect this has something to do with limitations in the Google Doc Viewer though, because this technique has been confirmed to work with a variety of other services. If anyone figures out how to make this work with Google Doc Viewer, please share :-)
~ 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

Re: Give file access to Google Doc Viewer

Postby Jason Caldwell » August 27th, 2011, 5:03 pm

Setting up a virtual directory with mod_rewrite might allow this to work with Google Doc Viewer?
See discussion here if you'd like to try this: viewtopic.php?f=4&t=14643#p32717
~ 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: No registered users and 3 guests

cron