DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:gview

This is an old revision of the document!


Google Docs Viewer Plugin

Compatible with DokuWiki

No compatibility info given!

plugin Show online document using Google Docs Viewer Service

Last updated on
2013-03-18
Provides
Syntax
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with embed, google

Installation

:!: This plugin uses and depends on Google's Service. Please check and see first the Google Docs Viewer Terms of Service.

By using this service you acknowledge that you have read and agreed to the Google Docs Viewer Terms of Service. — Google Docs Viewer - Additional Terms of Service

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

Show a given online document such as PDF documents or PowerPoint presentations in your DokuWiki page using Google Docs Viewer service. Please refer to Google site to know detail on supported file types.

Let's suppose you have a link (with small fileicon) to given online document in your page source:

{{http://example.com/path/to/document.pdf}}

To show the document in the embedded viewer, markup it with {{gview> and }} as follows:

{{gview>{{http://example.com/path/to/document.pdf}}}}

You do not need to remove {{ and }} around document URL; When you decide to stop embedding in future, it is enough to delete only gview markup. However you may remove inner {{ and }}to embed the document.

A most simple example:

{{gview>http://example.com/path/to/document.pdf}}

Some more complex example:

{{gview> http://example.com/path/to/document.pdf 50%,200px}}
{{gview> http://example.com/path/to/document.pdf 400px}}
{{gview> {{http://example.com/path/to/document.pdf|title}} noreference }}

Note

  • The document to view must be “public to the world”.
  • The DW page must be reachable from the internet (because Google's servers are used).

Limitation

  • Unfortunatly, the Google Docs Viewer service seems not accept ugly url like:
    http://example.com/lib/exe/fetch.php?media=document.pdf
  • You need to make effective URL rewrite in your web server to embed a document stored in your DW media directory.

Syntax

{{gview> url [size] [noembedded] [noreference] }}
  • url : Full URL of the online document to view, must starts with “http:” or “https:”.
    • This means you may embed a document published at different web site. The source url (reference) acknowleged above the viewer frame.
  • size : Size of embedded viewer.
    • Default value is 100%,300px, which means 100% width and 300px height.
    • When one value is given it is assumed to be the height.
  • noembedded (or noembed)
    • Indicate to show only hyperlink to the viewer, instead of embedded viewer.
    • Document title specified after “|” in {{ and }} is used as a link text.
  • noreference
    • Suppress a reference line just above embedded viewer frame. The reference is a hyperlink (url) to the online document shown in the viewer.

Configuration and Settings

There are no configuration options for this plugin.

CSS

The class tpl_gview is avilable for selector of html element. Border settings for embedded viewer found in style.css.

Language file

en, ja, de

Development

This is first trial to develop my own plugin.

Change Log

I have just started github.

ToDo

  • consider URL rewrite to allow embedding media file in data/media directory in case of $conf['userewrite'] = 1; (rewrite ugly url: .../lib/exe/fetch.php?media=document.pdf.../_media/document.pdf)

FAQ

[discussions should ideally be deleted and turned into FAQ entries along the way]

Discussion

Show PDF documents stored in DW media

Thanks for this plugin!
It would be great, to view pdf documents stored in DW media directory. Joe, 2013-03-20

plugin/gview.1363830455.txt.gz · Last modified: 2013-03-21 02:47 by s.sahara

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki