2

This is my first question on stackoverlfow but I've appreciated and found many answers here for years... Thanks to all those who have provided answers! I'll pay it forward when I find a question that I can answer. I apologize if my question is to general or vague.

Basically, I am looking for some way to use Google Docs as the document storage and management solution, for public web sites that don't use a CMS and that don't require a Google account to access. This could be used for press releases, product manuals, support documents, etc...; any document or list of documents that a business might want to provide on their web site. The main idea is to give the web site owner a single place to create and manage the documents and without requiring FTP to add them to the site.

This it how I was envisioning that this could work:

  1. The web site owner has a Google Drive/Gmail account and creates a collection for their web site documents. Usually these will be PDFs but some could be Word Docs or Excel files.

  2. The owner puts the PDF files they want to display on their web site, into the specific collection. All the files are shared and public and shouldn't require a Google account to access because some visitors may not have Google accounts.

  3. I program and configure a web page, preferably with PHP or Javascript, to query and retrieve the collection, list all the files in the collection and to display them on the web site with links to open the files. Sub folders/collections would be useful as well. Something like a file tree.

  4. When the owner changes a file in the Google Docs collection it is automatically updated in the collection file list displayed on the web site.

I've looked thru the Google Docs API, the Drive SDK and with searches for integrating with Google Docs but I haven't been able to find a simple answer or sample code. The Google API/SDK seems to require registering an application and/or having the user authenticate with a Google account which they may not have. It also seems overly complex for what I'm trying to achieve. Maybe I am misreading these requirements... I'm not clear if it's possible to do what I want, or if it is, it may be to complex or costly to develop for a simple web site.

I developed something similar to the above using iframe embedded Gdocs but the one thing you apparently can't embed is a list of GDoc files or collections. To get by this limitation I created a TOC (table of contents) doc that lists and contains links to the files shared in Google docs. I then embed this doc in a web page iframe and the links to other Gdocs open in the same frame. It also includes simple navigation options to go back to the TOC. This works but it is a pain for the web site owner because they have to get the embed code for a shared/public doc, remove the iframe tag/html, adjust character encoding and then past the link for a shared doc into the embedded TOC doc.

Being able to share and embed a collection would be much easier. I think this is easily possible with a Google Site but maybe not for a external site. I also believe that individually embedded PDF files will break when the file is updated in GDocs because the embed link changes for PDFs.

I've also setup customized embedded calendars that use Google Calendar as the back end which appears to work very well.

Is there a simple way to use Google Docs for this purpose? Does anyone know of an example for reference? Any ideas on how to easily list and link to the files in a collection? Is there a another service that provides this functionality that I should consider?

Any help and advice is appreciated!

Cheers!

D

1
  • Maybe I'm trying to use the wrong tool for the job! It would be cool to give my clients with Google accounts an easy way to both create and manage their web site docs in Google Docs. Any feedback on the general idea?
    – surfnmtns
    Commented Jul 3, 2012 at 23:03

2 Answers 2

1

Seems feasible to me.

You can use the script at http://shadowfax.org.uk/wiki/Google_Docs_Listing_in_Google_Sites to display the files of a given google docs collection in a google site page. This script needs improvement on the layout but works out fine, by passing the argument "&col=CollectionPath" to its service url.

Up to you to configure the sharing rightson the documents and or collection to make sure your (not connected) visitor will be granted access to the google docs collection material.

1
  • Thanks again for the reply. This solution also appears to require a Google Site which is not quite what I'm looking for. I may try one of these solutions on an external site but I assume there would be permission issues and there are likely references to Google Site specific functions. Has anyone implemented one of the solutions provided by Berteh on a non-Google site?
    – surfnmtns
    Commented Oct 11, 2012 at 13:31
0

Another (seemingly) more advanced solution is described in https://developers.google.com/apps-script/articles/embedding_docslist_in_sites

That is 1) embedding one Google Docs Folder in a File Cabinet and 2) using a List Page to Show the Folder, with a scripted "refresh".

Positive side is: better visual integration with your layout. Negative side is: maybe more time consuming in implementing.

1
  • Thanks for the replies! This looks like a posible solution but also appears to require a Google "site". I'm no clear that this solution will work with a non-Google and remotely hosted site. Maybe a Google site could be linked to from the main site to access the File Cabinet but I'm really looking for a solution that can be implemented with just Google docs and a custom web site outside of the Google ecosystem.
    – surfnmtns
    Commented Oct 11, 2012 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.