« Widget:Google Presentation » : différence entre les versions

De Wiki des possibles
Aller à :navigation, rechercher
(créer le widget à partir de mediawikiwidgets.org)
 
(essayer avec un exemple de widget qui n'est pas brisé)
Ligne 1 : Ligne 1 :
<noinclude>__NOTOC__
<noinclude>__NOTOC__
This widget allows you to add '''[http://documents.google.com/support/presentations/ Google Presentations]''' to your wiki page.
This widget allows you to add '''[https://support.google.com/docs/answer/2763168?hl=en&ref_topic=19434 Google Slides]''' to your wiki page.


It was originally created by [[mediawikiwiki:User:Sergey Chernyshev|Sergey Chernyshev]].
Documentation for this widget can be found at [https://www.mediawikiwidgets.org/Google_Presentation MediaWiki Widgets], but has been modified to be similar to [[Widget:Google Spreadsheet]].


To insert this widget, use the following code:
To insert this widget, use the following code:


  <nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>|docid=dcn37mcz_22cmnwnwf8}}</nowiki>
  <nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>|key=1wUktKYpGaQ5atYjlFp1Cn1lRGSqlEHtGeQw9VHOYhrE}}</nowiki>


== Parameters ==
== Parameters ==
* '''docid''' - docid parameter in document URL
* '''key''' - key parameter in document URL
* '''size''' - (optional) allows you to change the size of presentation from small (410x342) to  '''medium''' (555x451) or '''large''' (700x599)
* '''width''' and '''height''' define spreadsheet dimensions, 500x300 is default, but you might want to copy it from embed code since size depends on fields you have


{{Template:Copy to your site}}
== Sample result ==
{{#widget:Google Presentation|key=2PACX-1vTm6CBGHSIF8GUW0crKNJJXxaZ14r3QQBWYqXbXT1KKBkLXPLTWl7r6Xb_KOL4dqulWMbVFhIlLZyFJ}}


== Related widgets ==
==Widget internals==
* [[Widget:Google Document|Google Document]] - for embedding documents
Widgets do not use [[mw:Help:Magic_words#Parser_functions|parser functions]]. Instead, a template programming language known as "Smarty" is used. Refer to the [https://www.smarty.net/docs/en/ Smarty 3 Manual] for the details.
* [[Widget:Google Spreadsheet|Google Spreadsheet]] - for embedding spreadsheets
</noinclude><includeonly><iframe width="<!--{$width|escape:'html'|default:500}-->" height="<!--{$height|escape:'html'|default:300}-->" frameborder="0" src="//docs.google.com/presentation/d/<!--{$key|escape:'urlpathinfo'}-->/embed?widget=true&amp;#slide=id.i0"></iframe></includeonly>
* [[Widget:Google Form|Google Form]] - for embedding spreadsheet forms
<noinclude>{{Helpful tools}}
 
[[Category:Widgets]]</noinclude>
== Sample result ==
{{#widget:Google Presentation|docid=dcn37mcz_22cmnwnwf8}}
</noinclude><includeonly><!--{if $size eq 'medium'}--><iframe src='http://docs.google.com/EmbedSlideshow?docid=<!--{$docid|escape:'urlpathinfo'}-->&amp;size=m' width='555' height='451' style="border: none"></iframe><!--{elseif $size eq 'large'}--><iframe src='http://docs.google.com/EmbedSlideshow?docid=<!--{$docid|escape:'urlpathinfo'}-->&amp;size=l' width='700' height='559' style="border: none"></iframe><!--{else}--><iframe src='http://docs.google.com/EmbedSlideshow?docid=<!--{$docid|escape:'urlpathinfo'}-->'  width='410' height='342' style="border: none"></iframe><!--{/if}--></includeonly>

Version du 19 janvier 2022 à 12:24

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

Documentation for this widget can be found at MediaWiki Widgets, but has been modified to be similar to Widget:Google Spreadsheet.

To insert this widget, use the following code:

{{#widget:Google Presentation|key=1wUktKYpGaQ5atYjlFp1Cn1lRGSqlEHtGeQw9VHOYhrE}}

Parameters

  • key - key parameter in document URL
  • width and height define spreadsheet dimensions, 500x300 is default, but you might want to copy it from embed code since size depends on fields you have

Sample result

Widget internals

Widgets do not use parser functions. Instead, a template programming language known as "Smarty" is used. Refer to the Smarty 3 Manual for the details.

Modèle:Helpful tools