Extension:GoogleDocs4MW

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
GoogleDocs4MW
Release status: stable
Implementation Tag
Description Adds <googlespreadsheet> tag for Google Docs' spreadsheets display
Author(s) Jack Phoenix
Latest version 1.3.0 (2017-01-27)
MediaWiki 1.31+
Database changes No
License GNU General Public License 2.0 or later
Download
Example ShoutWiki
Tags
<googlespreadsheet>
Hooks used
ParserFirstCallInit
Translate the GoogleDocs4MW extension if it is available at translatewiki.net
Check usage and version matrix.

The GoogleDocs4MW extension embeds Google Docs' spreadsheets into the wiki.

Installation[edit]

  • Download and place the file(s) in a directory called GoogleDocs4MW in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'GoogleDocs4MW' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


Use[edit]

Supported parameters are:

  1. width (500 by default),
  2. height (300 by default) and
  3. style (width:100% by default).

As an example using all of the parameters:

<googlespreadsheet width="600" height="200" style="width: 50%">Google Docs' key goes here</googlespreadsheet>


To actually embed a spreadsheet, the spreadsheet needs to be published with Google's File > Publish to Web... option. It is not sufficient to just have a shareable link.

Note[edit]

This extension was inspired by the Wikia extension with the same name, but this extension was written back when Wikia wasn't open source.

See also[edit]