Thursday, February 13, 2014

Embed Google Docs Viewer in Joomla Site






























Embed Google Docs Viewer is a plugin for embedding one or more Google Docs Viewers (http://docs.google.com/viewer) to Joomla articles. By using Google Docs Viewer it's possible to quickly view documents online without leaving browser. Adding the viewer to an article is very simple, just add the url of the document that you want to embed, and that's it! It's also possible to define the size of the document, mode of the reader (preview/edit), border layout and link to the full size document.
Features:
* It's possible to embed one or more Google Docs Viewer within an article.
* Supported formats: .doc, .ppt, .xls, .tif and .pdf.
* Supported Google document formats: document, spreadsheet, presentation, form, drawing and file.
* Set Google Doc Viewer's mode when embedding documents created or stored in Google docs. Supported modes are default, preview and edit.
* Define the language of the Google Docs Viewer interface when embedding documents that are not stored in Google Docs.
* Define the width and height of the viewer.
* Define the border width, border style and border color.
* Add link to the full screen version.
* Define the link label.
* Support for HTTP and HTTPS (with Google Docs Viewer only).
* Multilingual features (with Google Docs Viewer only).

Basic usage

To embed a Google Docs Viewer in an article use the following code:

{google_docs}document_url{/google_docs}
{google_docs}document_url|width:200|height:200|border:1|border_style:solid|border_color:#000000{/google_docs}
{google_docs}document_url|width:200|height:200|link:yes|link_label:Label{/google_docs}
{google_docs}document_url|lang:it{/google_docs}
{google_docs}document_url|lang:system{/google_docs}
{google_docs}document_url|https:yes{/google_docs}
{google_docs}document_url|link:yes{/google_docs}
{google_docs}document_url|mode:edit{/google_docs}

Example

Replace the "document_url" string with the url of the document that you want to view.

{google_docs}http://www.example.com/docs/document.pdf{/google_docs} 

Google Docs documents

Supported Google document formats: document, spreadsheet, presentation, form, drawing, file.

If you want to embed a document stored in Google Docs do the following.

1. Sign in to your Goole Docs account.
2. Open the document that you want to embed.
3. Click File -> Publish to the web
4. Copy the link from the "Document link" field.
5. Paste the link between the google_docs tags.

The above steps don't work with forms. To embed a form do the following.

1. Sign in to your Goole Docs account.
2. Open the form that you want to embed.
3. Click Form -> Go to live form.
4. The form opens in a new tab/window.
5. Copy the URL from the browser's address bar.
6. Paste the URL between the google_docs tags.

Base URL

In the admin panel it's possible to define a base URL for the documents, which makes embedding the documents even easier as there's no need to type in the full URL for each document.


You can download Embed Google Docs Viewer from Joomla Extensions Directory.

No comments:

Post a Comment