Difference between revisions of "Widget:Twitter Search"

From Archivematica
Jump to navigation Jump to search
(Upate to use new twitter widget API)
Line 1: Line 1:
 
<noinclude>__NOTOC__
 
<noinclude>__NOTOC__
This widget allows you to embed '''[http://twitter.com/goodies/widget_search Twitter Search widget]''' (HTML version) on your wiki page.
+
Embed twitter widget
  
Created by [http://www.mediawikiwidgets.org/User:Sergey_Chernyshev Sergey Chernyshev]
+
Based on widget by [http://www.mediawikiwidgets.org/User:Sergey_Chernyshev Sergey Chernyshev]
  
 
== Using this widget ==
 
== Using this widget ==
Line 9: Line 9:
 
== Copy to your site ==
 
== Copy to your site ==
 
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article.
 
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article.
</noinclude><includeonly><!--{counter name="twittercounter" assign="twitblogincluded"}--><!--{if $twitblogincluded eq 1}--><script src="https://static.artefactual.com/mediawiki/twitter.js"></script><!--{/if}-->
+
</noinclude><includeonly><a class="twitter-timeline" href="https://twitter.com/search?q=archivematica" height="300" data-widget-id="345659717298814976" data-chrome="nofooter noscrollbar">Tweets about "archivematica"</a>
<script>
+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
new TWTR.Widget({
+
</includeonly>
  version: 2,
 
  type: 'search',
 
  search: '<!--{$query|escape:'quotes'}-->',
 
  interval: 6000,
 
  title: '<!--{$title|escape:'quotes'}-->',
 
  subject: '<!--{$caption|escape:'quotes'}-->',
 
  width: 'width',
 
  height: <!--{$height|default:300|validate:int}-->,
 
  theme: {
 
    shell: {
 
      background: '<!--{$shell.background|escape:'quotes'|default:'#8ec1da'}-->',
 
      color: '<!--{$shell.color|escape:'quotes'|default:'#ffffff'}-->'
 
    },
 
    tweets: {
 
      background: '<!--{$tweets.background|escape:'quotes'|default:'#ffffff'}-->',
 
      color: '<!--{$tweets.color|escape:'quotes'|default:'#444444'}-->',
 
      links: '<!--{$tweets.links|escape:'quotes'|default:'#1985b5'}-->'
 
    }
 
  },
 
  features: {
 
    scrollbar: true,
 
    loop: false,
 
    live: true,
 
    hashtags: true,
 
    timestamp: true,
 
    avatars: true,
 
    toptweets: true,
 
    behavior: 'all'
 
  }
 
}).render().start();
 
</script></includeonly>
 

Revision as of 15:55, 14 June 2013

Embed twitter widget

Based on widget by Sergey Chernyshev

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 full source code of this page to your wiki as Widget:Twitter Search article.