Difference between revisions of "Widget:Twitter Search"

From Hackerspace ACKspace
Jump to: navigation, search
m
m (inline source as a last attempt)
 
(4 intermediate revisions by the same user not shown)
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="http://widgets.twimg.com/j/2/widget.js"></script><!--{/if}-->
+
</noinclude><includeonly><!--{counter name="twittercounter" assign="twitblogincluded"}--><!--{if $twitblogincluded eq 1}--><script type="text/javascript">
 +
TWTR=window.TWTR||{};(function(){var A=0;var D;var B=["init","setDimensions","setRpp","setFeatures","setTweetInterval","setBase","setList","setProfileImage","setTitle","setCaption","setFooterText","setTheme","byClass","render","removeEvents","clear","start","stop","pause","resume","destroy"];function C(H){var E=0;var G;var F=["The Twitter API v1.0 is deprecated, and this widget has ceased functioning.","You can replace it with a new, upgraded widget from <https://twitter.com/settings/widgets/new/"+H+">","For more information on alternative Twitter tools, see <https://dev.twitter.com/docs/twitter-for-websites>"];if(!window.console){return }for(;G=F[E];E++){if(console.warn){console.warn("TWITTER WIDGET: "+G);continue}console.log(G)}}TWTR.Widget=function(E){switch(E.type){case"search":C("search?query="+escape(E.search));break;case"profile":this._profile=true;break;case"list":case"lists":C("list");break;default:return }};TWTR.Widget.ify={autoLink:function(){return{match:function(){return false}}}};TWTR.Widget.randomNumber=function(){};TWTR.Widget.prototype.isRunning=function(){return false};TWTR.Widget.prototype.setProfile=function(E){C("user?screen_name="+escape(E));return this};TWTR.Widget.prototype.setUser=function(E){if(this._profile){return this.setProfile(E)}C("favorites?screen_name="+escape(E));return this};TWTR.Widget.prototype.setSearch=function(E){C("search?query="+escape(E));return this};for(;D=B[A];A++){TWTR.Widget.prototype[D]=function(){return this}}})();
 +
</script><!--{/if}-->
 
<script>
 
<script>
 
new TWTR.Widget({
 
new TWTR.Widget({
Line 18: Line 20:
 
   title: '<!--{$title|escape:'quotes'}-->',
 
   title: '<!--{$title|escape:'quotes'}-->',
 
   subject: '<!--{$caption|escape:'quotes'}-->',
 
   subject: '<!--{$caption|escape:'quotes'}-->',
   width: 400,
+
   width: <!--{$width|default:250|validate:int}-->,
   height: 300,
+
   height: <!--{$height|default:300|validate:int}-->,
 
   theme: {
 
   theme: {
 
     shell: {
 
     shell: {
       background: '#8ec1da',
+
       background: '<!--{$shell.background|escape:'quotes'|default:'#8ec1da'}-->',
       color: '#ffffff'
+
       color: '<!--{$shell.color|escape:'quotes'|default:'#ffffff'}-->'
 
     },
 
     },
 
     tweets: {
 
     tweets: {
       background: '#ffffff',
+
       background: '<!--{$tweets.background|escape:'quotes'|default:'#ffffff'}-->',
       color: '#444444',
+
       color: '<!--{$tweets.color|escape:'quotes'|default:'#444444'}-->',
       links: '#1985b5'
+
       links: '<!--{$tweets.links|escape:'quotes'|default:'#1985b5'}-->'
 
     }
 
     }
 
   },
 
   },

Latest revision as of 10:54, 30 September 2016

This widget allows you to embed Twitter Search widget (HTML version) on your wiki page.

Created 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.