Widget:Tweet: Difference between revisions

From Wikizilla, the kaiju encyclopedia
Jump to navigationJump to search
(Created page with "<noinclude>__NOTOC__ This widget allows you to '''[https://dev.twitter.com/docs/embedded-tweets embed a tweet]''' on your wiki page. Created by [https://www.mediawikiwidgets....")
 
(update for security)
 
Line 6: Line 6:
== Using this widget ==
== Using this widget ==
For information on how to use this widget, see [https://www.mediawikiwidgets.org/Tweet widget description page on MediaWikiWidgets.org].
For information on how to use this widget, see [https://www.mediawikiwidgets.org/Tweet widget description page on MediaWikiWidgets.org].
== Copy to your site ==
To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''.
</noinclude><includeonly>
</noinclude><includeonly>
<!--{if isset($id)}-->
<!--{if isset($id)}-->
     <!--{counter name="tweetcounter" assign="tweetincluded"}-->
     <!--{counter name="tweetcounter" assign="tweetincluded"}-->
     <div id="twitter-<!--{$tweetincluded}-->-<!--{$id}-->"></div>
     <div id="twitter-<!--{$tweetincluded|escape:html}-->-<!--{$id|escape:html}-->"></div>
     <!--{if $tweetincluded eq 1}-->
     <!--{if $tweetincluded eq 1}-->
     <script>
     <script>
Line 26: Line 29:
     twttr.ready(function (twttr) {
     twttr.ready(function (twttr) {
         twttr.widgets.createTweet(
         twttr.widgets.createTweet(
             "<!--{$id}-->",
             "<!--{$id|escape:javascript}-->",
             document.getElementById("twitter-<!--{$tweetincluded}-->-<!--{$id}-->"),
             document.getElementById("twitter-<!--{$tweetincluded|escape:javascript}-->-<!--{$id|escape:javascript}-->"),
             {
             {
                 align: <!--{if $align}-->'<!--{$align}-->'<!--{else}-->undefined<!--{/if}-->,
                 align: <!--{if $align}-->'<!--{$align|escape:javascript}-->'<!--{else}-->undefined<!--{/if}-->,
                 conversation: '<!--{if $conversation}--><!--{$conversation}--><!--{else}-->all<!--{/if}-->',
                 conversation: '<!--{if $conversation}--><!--{$conversation|escape:javascript}--><!--{else}-->all<!--{/if}-->',
                 cards: '<!--{if $cards}--><!--{$cards}--><!--{else}-->visible<!--{/if}-->',
                 cards: '<!--{if $cards}--><!--{$cards|escape:javascript}--><!--{else}-->visible<!--{/if}-->',
                 width: <!--{if $width}-->'<!--{$width}-->'<!--{else}-->undefined<!--{/if}-->,
                 width: <!--{if $width}-->'<!--{$width|escape:javascript}-->'<!--{else}-->undefined<!--{/if}-->,
                 linkColor: '<!--{if $linkColor}--><!--{$linkColor}--><!--{else}-->blue<!--{/if}-->',
                 linkColor: '<!--{if $linkColor}--><!--{$linkColor|escape:javascript}--><!--{else}-->blue<!--{/if}-->',
                 theme: '<!--{if $theme}--><!--{$theme}--><!--{else}-->light<!--{/if}-->'
                 theme: '<!--{if $theme}--><!--{$theme|escape:javascript}--><!--{else}-->light<!--{/if}-->'
             }
             }
         );
         );

Latest revision as of 20:03, 24 February 2023

This widget allows you to embed a tweet on your wiki page.

Created by Pablo Castellano.

Using this widget

For information on how to use this widget, see widget description page on MediaWikiWidgets.org.

Copy to your site

To use this widget on your site, just install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:Tweet.