Widget:Iframe

Материал из Kor WiKi
(Различия между версиями)
Перейти к: навигация, поиск
 
Строка 1: Строка 1:
{{Widget
+
<noinclude>__NOTOC__
|author=Chris White
+
This widget allows you to embed any web page on your wiki page using an iframe tag.
|provider=Facebook
+
|providerurl=http://developers.facebook.com/docs/reference/plugins/like-box/
+
|addedon=03-14-2011
+
}}
+
This widget allows you to add a '''[http://developers.facebook.com/docs/reference/plugins/like-box/ Facebook Page Like Box]''' to your wiki page.
+
  
To insert this widget, use the following code:
+
Created by [http://www.mediawikiwidgets.org/User:Sergey_Chernyshev Sergey Chernyshev]
  
<nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>|profile=http://www.facebook.com/pages/MyTownWiki/190228370997070}}</nowiki>
+
== Using this widget ==
 +
For information on how to use this widget, see [http://www.mediawikiwidgets.org/Iframe widget description page on MediaWikiWidgets.org].
  
== Parameters ==
+
<big>'''<font color="red">This widget shouldn't be used on a public wiki.</font>'''</big>
All parameters are required.  Each parameter is separated from the others by a new line, begun with a  pipe symbol '''"|"''' (don't use spaces in the code).  '''If you want to use the default values, then the only required parameter is''' profile'''.'''
+
  
* '''profile''' - URL of page on Facebook (e.g. http://www.facebook.com/pagename or http://www.facebook.com/pages/MyTownWiki/190228370997070).  This should match the URL shown when the person's profile is on-screen; no other code in the URL should be copied, i.e. "&sk=wall".
+
While the url is validated to be a valid url, there is no way the widget can check the contents of the page that is included. When enabling this widget, you allow any user that can edit to include any page, including malicious pages (containing trojans, backdoors, viruses etc), pages that brake out of the iframe and pages that look like your site, but actually is a copy used for phishing.
* '''width''' - width in pixels for the box; this should only be a number, no "px". Defaults to '''300'''.
+
*  '''height''' - height in pixels for the box; this should only be a number, no "px". Defaults to '''556'''.  If you set '''faces''' and '''stream''' to false, set '''height''' to '''63''' for accurate rendering.  If you set only '''faces''' to false, set '''height''' to '''395'''.  If you set only '''stream''' to false, set '''height''' to '''258'''.
+
* '''theme''' - '''light''' and '''dark'''. Defaults to '''light'''.
+
* '''faces''' - '''true''' or '''false''' to show or hide faces of people who like the page. Defaults to '''true'''.
+
* '''stream''' - '''true''' or '''false''' to show a live feed of the page's wall. Defaults to '''true'''.
+
* '''border_color''' - when set, defines border color of the box
+
* '''force_wall''' - (for places) if specified enables posts from the Place's wall in addition to checkins from friends.
+
  
== Sample result ==
+
== Copy to your site ==
{{#widget:{{PAGENAME}}
+
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.
|profile=http://www.facebook.com/pages/MyTownWiki/190228370997070
+
</noinclude><includeonly><iframe src="<!--{$url|validate:url}-->" frameborder="<!--{$border|validate:int|default:0}-->" width="<!--{$width|escape:html|default:400}-->" height="<!--{$height|escape:html|default:300}-->"></iframe></includeonly>
}}
+
{{Comments}}
+

Текущая версия на 23:27, 16 января 2012

This widget allows you to embed any web page on your wiki page using an iframe tag.

Created by Sergey Chernyshev

Using this widget

For information on how to use this widget, see widget description page on MediaWikiWidgets.org.

This widget shouldn't be used on a public wiki.

While the url is validated to be a valid url, there is no way the widget can check the contents of the page that is included. When enabling this widget, you allow any user that can edit to include any page, including malicious pages (containing trojans, backdoors, viruses etc), pages that brake out of the iframe and pages that look like your site, but actually is a copy used for phishing.

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:Iframe article.

Личные инструменты
Пространства имён
Варианты
Действия
Навигация
Инструменты
Поделиться