Widget:Twitter: Difference between revisions

From Destinypedia, the Destiny wiki

(Created page with "<noinclude>This widget allows you to embed Twitter feeds. Accepted parameters: '''id''' (required), '''width''', '''height''', '''theme''' (may be set to 'dark').</noinclude><...")
 
No edit summary
Line 1: Line 1:
<noinclude>This widget allows you to embed Twitter feeds. Accepted parameters: '''id''' (required), '''width''', '''height''', '''theme''' (may be set to 'dark').</noinclude><includeonly><!--{if isset($id)}--><a class="twitter-timeline" href="https://twitter.com/<!--{$id|escape:'url'}-->" data-width="<!--{($width|escape:'html'|default:'250')|string_format:"%d"}-->" data-height="<!--{($height|escape:'html'|default:'400')|string_format:"%d"}-->" data-theme="<!--{$theme|escape:'html'|default:'light'}-->">Tweets by <!--{$id|escape:'html'}--></a><script async src="https://platform.twitter.com/widgets.js"></script><!--{else}--><p style="color:red">No <b>id</b> provided for the Twitter widget!</p><!--{/if}--></includeonly>
<noinclude>This widget allows you to embed Twitter feeds and tweets. Accepted parameters: '''user''' or '''tweet''' (required), '''width''', '''height''', '''theme''' (may be set to 'dark').</noinclude><includeonly><!--{if isset($user)}--><a class="twitter-timeline" href="https://twitter.com/<!--{$user|escape:'url'}-->" data-width="<!--{($width|escape:'html'|default:'250')|string_format:"%d"}-->" data-height="<!--{($height|escape:'html'|default:'400')|string_format:"%d"}-->" data-theme="<!--{$theme|escape:'html'|default:'light'}-->">Tweets by <!--{$user|escape:'html'}--></a><script async src="https://platform.twitter.com/widgets.js"></script><!--{else if isset($tweet)}--><script type="text/javascript">
function loadx(data) {
document.write(data.html);
}
</script>
<script type="text/javascript" src="https://api.twitter.com/1/statuses/oembed.json?id=<!--{$tweet|escape:'url'}-->&callback=loadx"></script>
<div class="twitter" onLoad="loadx().html"></div><!--{else}--><p style="color:red">No <b>user</b> or <b>tweet</b> provided for the Twitter widget!</p><!--{/if}--></includeonly>

Revision as of 05:21, October 20, 2020

This widget allows you to embed Twitter feeds and tweets. Accepted parameters: user or tweet (required), width, height, theme (may be set to 'dark').