Google Books: Unterschied zwischen den Versionen

Aus Ev. Kirchengemeinde Grambke
Zur Navigation springen Zur Suche springen
KKeine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
<noinclude>__NOTOC__
This widget allows you to add [http://code.google.com/apis/books/docs/preview-wizard.html Google Books] to your wiki page.
This widget allows you to embed '''[http://code.google.com/apis/books/docs/preview-wizard.html Google Books]''' on your wiki page.


Created by [http://www.mediawikiwidgets.org/User:Arv Arv]
To insert this widget, use the following code:


== Using this widget ==
<nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>
For information on how to use this widget, see [http://www.mediawikiwidgets.org/Google_Books widget description page on MediaWikiWidgets.org].
|id=Q8ysL64pM54C
|height=750
|width=450}}</nowiki>


== Copy to your site ==
== Parameters ==
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article.
* '''id''' - book id
</noinclude><includeonly><!--{counter name="bookDivID" assign="bookDivID"}--><div id="viewerCanvas<!--{$bookDivID|escape:'html'}-->" style="width: <!--{$width|escape:'html'|default:'600'}-->px; height: <!--{$height|escape:'html'|default:500}-->px"></div>
* '''height''' and '''width''' define map dimensions, 600x500 is default
<!--{if $bookDivID == 1}--><script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
      var widgetbooks = [];
      var bookwidgetloaded = false;


      var showbooks = function() {
== Sample result ==
        if (!bookwidgetloaded) { return; }
{{#widget:{{PAGENAME}}
|id=Q8ysL64pM54C
|height=750
|width=450}}


        for(var i=0; i<widgetbooks.length; i++) {
{{Widget
              var widget = widgetbooks[i];
|author=arv
              var viewer = new google.books.DefaultViewer(document.getElementById(widget.element));
|provider=GoogleBooks
              viewer.load(widget.id);
|providerurl=http://www.salescube.es
        }
|addedon=10-23-2009}}
      };
 
      google.setOnLoadCallback(function() {
        bookwidgetloaded = true;
        showbooks();
      });
      google.load("books", "0");
</script>
<!--{/if}--><script type="text/javascript">
widgetbooks[widgetbooks.length] = { element: 'viewerCanvas<!--{$bookDivID|escape:'quotes'}-->', id: '<!--{$id|escape:'quotes'}-->' };
showbooks();
</script></includeonly>

Version vom 4. August 2010, 21:45 Uhr

This widget allows you to add Google Books to your wiki page.

To insert this widget, use the following code:

{{#widget:Google Books
|id=Q8ysL64pM54C
|height=750
|width=450}}

Parameters

  • id - book id
  • height and width define map dimensions, 600x500 is default

Sample result

{{#widget:Google Books |id=Q8ysL64pM54C |height=750 |width=450}}

Vorlage:Widget