Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Widget:Twitter: Difference between revisions

From BlazBlue Wiki
(Generated Twitter widget)
 
No edit summary
 
Line 1: Line 1:
<noinclude>This widget allows you to embed Twitter feeds and tweets. Accepted parameters: '''user''' or '''id''' (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($id)}--><script type="text/javascript">
<noinclude>This widget allows you to embed Twitter feeds and tweets. Accepted parameters: '''user''' or '''id''' (required), '''width''', '''height''', '''theme''' (may be set to 'dark').</noinclude><includeonly><a class="twitter-timeline" data-width="350" data-height="500" data-theme="<!--{$theme|default:"dark"}-->"
function loadx(data) {
href="https://twitter.com/<!--{$user|escape:'html'}-->?ref_src=twsrc%5Etfw">Tweets by <!--{$user|escape:'html'}--></a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></includeonly>
    document.write(data.html);
}
</script>
<script type="text/javascript" src="https://api.twitter.com/1/statuses/oembed.json?id=<!--{$id|escape:'url'}-->&theme=<!--{$theme|escape:'html'|default:'light'}-->&callback=loadx"></script>
<div class="twitter" onLoad="loadx().html"></div><!--{else}--><p style="color:red">No <b>user</b> or <b>id</b> provided for the Twitter widget!</p><!--{/if}--></includeonly>

Latest revision as of 01:32, 1 February 2021

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