Widget:Tweet: Difference between revisions

no edit summary
imported>Tmccormick
(Created page with " <noinclude>__NOTOC__<br/> This widget allows you to '''[https://dev.twitter.com/docs/embedded-tweets embed a tweet]''' on your wiki page. Created by [https://www.mediawikiwi...")
 
imported>Tmccormick
No edit summary
 
Line 1:
<noinclude>__NOTOC__
 
<noinclude>__NOTOC__<br/> This widget allows you to '''[https://dev.twitter.com/docs/embedded-tweets embed a tweet]''' on your wiki page.
 
Created by [https://www.mediawikiwidgets.org/User:Pablog Pablo Castellano].
 
== Using this widget ==
== Using this widget ==<br/> For information on how to use this widget, see [https://www.mediawikiwidgets.org/Tweet widget description page on MediaWikiWidgets.org].
 
== Copy to your site ==
== Copy to your site ==<br/> 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}}'''.<br/> </noinclude><includeonly><br/> <!--{if isset($id)}--><br/> &nbsp; &nbsp; <!--{counter name="tweetcounter" assign="tweetincluded"}--><br/> &nbsp; &nbsp; <div id="twitter-<!--{$tweetincluded}-->-<!--{$id}-->"></div><br/> &nbsp; &nbsp; <!--{if $tweetincluded eq 1}--><br/> &nbsp; &nbsp; <script><br/> &nbsp; &nbsp; if (typeof window.twttr === 'undefined') {<br/> &nbsp; &nbsp; &nbsp; &nbsp; window.twttr = (function (d,s,id) {<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t, js, fjs = d.getElementsByTagName(s)[0];<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; js.src="//platform.twitter.com/widgets.js";<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fjs.parentNode.insertBefore(js, fjs);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });<br/> &nbsp; &nbsp; &nbsp; &nbsp; }(document, "script", "twitter-wjs"));<br/> &nbsp; &nbsp; }<br/> &nbsp; &nbsp; </script><br/> &nbsp; &nbsp; <!--{/if}--><br/> &nbsp; &nbsp; <script><br/> &nbsp; &nbsp; twttr.ready(function (twttr) {<br/> &nbsp; &nbsp; &nbsp; &nbsp; twttr.widgets.createTweet(<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "<!--{$id}-->",<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById("twitter-<!--{$tweetincluded}-->-<!--{$id}-->"),<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; align: <!--{if $align}-->'<!--{$align}-->'<!--{else}-->undefined<!--{/if}-->,<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conversation: '<!--{if $conversation}--><!--{$conversation}--><!--{else}-->all<!--{/if}-->',<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cards: '<!--{if $cards}--><!--{$cards}--><!--{else}-->visible<!--{/if}-->',<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: <!--{if $width}-->'<!--{$width}-->'<!--{else}-->undefined<!--{/if}-->,<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linkColor: '<!--{if $linkColor}--><!--{$linkColor}--><!--{else}-->blue<!--{/if}-->',<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; theme: '<!--{if $theme}--><!--{$theme}--><!--{else}-->light<!--{/if}-->'<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/> &nbsp; &nbsp; &nbsp; &nbsp; );<br/> &nbsp; &nbsp; });<br/> &nbsp; &nbsp; </script><br/> <!--{else}--><br/> &nbsp; &nbsp; <b style="color:red">No id supplied for Tweet!</b><br/> <!--{/if}--><br/> </includeonly>
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>
<!--{if isset($id)}-->
<!--{counter name="tweetcounter" assign="tweetincluded"}-->
<div id="twitter-<!--{$tweetincluded}-->-<!--{$id}-->"></div>
<!--{if $tweetincluded eq 1}-->
<script>
if (typeof window.twttr === 'undefined') {
window.twttr = (function (d,s,id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));
}
</script>
<!--{/if}-->
<script>
twttr.ready(function (twttr) {
twttr.widgets.createTweet(
"<!--{$id}-->",
document.getElementById("twitter-<!--{$tweetincluded}-->-<!--{$id}-->"),
{
align: <!--{if $align}-->'<!--{$align}-->'<!--{else}-->undefined<!--{/if}-->,
conversation: '<!--{if $conversation}--><!--{$conversation}--><!--{else}-->all<!--{/if}-->',
cards: '<!--{if $cards}--><!--{$cards}--><!--{else}-->visible<!--{/if}-->',
width: <!--{if $width}-->'<!--{$width}-->'<!--{else}-->undefined<!--{/if}-->,
linkColor: '<!--{if $linkColor}--><!--{$linkColor}--><!--{else}-->blue<!--{/if}-->',
theme: '<!--{if $theme}--><!--{$theme}--><!--{else}-->light<!--{/if}-->'
}
);
});
</script>
<!--{else}-->
<b style="color:red">No id supplied for Tweet!</b>
<!--{/if}-->
</includeonly>
Anonymous user