Difference between revisions of "Template:Widget"

From Knoesis wiki
Jump to: navigation, search
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<noinclude>__NOTOC__
+
<noinclude>
This widget allows you to embed any web page on your wiki page using an iframe tag.
+
This is the 'Widget' template.
 +
It should be called in the following format:
 +
<pre>
 +
{{Widget
 +
|description=
 +
|author=
 +
|provider=
 +
|providerurl=
 +
|status=
 +
|security=
 +
}}
 +
</pre>
 +
Edit the page to see the template text.
 +
</noinclude><includeonly>{{#ifeq: {{#show: {{PAGENAME}} |?Widget Status }} | defunct |
 +
<div style="border: 2px solid black; background: #ff8000; padding: 10px; text-align: center; width: 98.5%; min-height: 100px;">
 +
[[File:Alert.png|100px|left|link=]]
 +
<span style="font-size: 150%; font-weight: 900;">This widget is defunct since the respective service is no longer available.</span><br /><br />You are advised do remove all references to this widget on your wiki followed by deleting the "Widget:{{PAGENAME}}" page.
 +
</div>
 +
<br />
 +
<table cellpadding="0" cellspacing="0" border="0"><tr valign="top"><td>
 +
<table style="width: 25em; border: 1px solid #aaa; background-color: #f9f9f9; color: black; padding: 0.2em; text-align:left;">
 +
<tr><td style="text-align: center; background-color:#ccf;" colspan="2">'''<big>{{PAGENAME}} widget</big>'''</td></tr>
 +
<tr valign="top"><td align="right">'''Description:'''</td><td>[[Widget Description::{{{description|}}}]]</td></tr>
 +
<tr valign="top"><td align="right">'''Author:'''</td><td>[[Widget Author::User:{{{author|}}}|{{{author|}}}]]</td></tr>
 +
{{#if:{{{providerurl|}}}{{{provider|}}}|<tr valign="top"><td align="right">'''Provider:'''</td><td>{{{provider|}}}</td></tr>}}
 +
<tr valign="top"><td align="right">'''Status:'''</td><td>[[Widget Status::{{{status|unknown}}}]]</td></tr>
 +
<tr valign="top"><td align="right">'''Security:'''</td><td>[[Widget Security::{{{security|unknown}}}]]</td></tr>
 +
<tr valign="top"><td colspan="2" align="center">{{AddThis}}</td></tr>
 +
</table>
 +
</td><td style="padding-left: 10px">
 +
</td></tr>
 +
</table>
 +
|
 +
<table cellpadding="0" cellspacing="0" border="0"><tr valign="top"><td>
 +
<table style="width: 25em; border: 1px solid #aaa; background-color: #f9f9f9; color: black; padding: 0.2em; text-align:left;">
 +
<tr><td style="text-align: center; background-color:#ccf;" colspan="2">'''<big>{{PAGENAME}} widget</big>'''</td></tr>
 +
<tr valign="top"><td align="right">'''Description:'''</td><td>[[Widget Description::{{{description|}}}]]</td></tr>
 +
<tr valign="top"><td align="right">'''Author:'''</td><td>[[Widget Author::User:{{{author|}}}|{{{author|}}}]]</td></tr>
 +
{{#if:{{{providerurl|}}}{{{provider|}}}|<tr valign="top"><td align="right">'''Provider:'''</td><td>[[Widget Provider URL::{{{providerurl|}}}|{{{provider|}}}]] [[Widget Provider::{{{provider|}}}|]]</td></tr>}}
 +
<tr valign="top"><td align="right">'''Code:'''</td><td>[[Widget Code Page::Widget:{{PAGENAME}}]]</td></tr>
 +
<tr valign="top"><td align="right">'''Status:'''</td><td>[[Widget Status::{{{status|unknown}}}]]</td></tr>
 +
<tr valign="top"><td align="right">'''Security:'''</td><td>[[Widget Security::{{{security|unknown}}}]]</td></tr>
 +
<tr valign="top"><td colspan="2" align="center">{{AddThis}}</td></tr>
 +
</table>
 +
</td><td style="padding-left: 10px">
  
Created by [http://www.mediawikiwidgets.org/User:Sergey_Chernyshev Sergey Chernyshev]
+
<div style="border: 2px solid black; background: #dff4ff; padding: 10px; text-align: center">
 +
[[Image:Inv-Icon tools.svg.png|100px|left|link=]]
 +
'''To copy this widget to your wiki''', cut and paste the entire source of the '''[{{fullurl:Widget:{{PAGENAME}}|action=edit}} {{PAGENAME}} widget code page]''' into a page called '''Widget:{{PAGENAME}}''' on your wiki.
  
== Using this widget ==
+
If you don't have the '''[[mediawikiwiki:Extension:Widget|Widget extension]]''' set up on your wiki, go to its description page on MediaWiki.org and follow the '''[[mediawikiwiki:Extension:Widgets#Download_instructions|installation instructions]]'''.
For information on how to use this widget, see [http://www.mediawikiwidgets.org/Iframe widget description page on MediaWikiWidgets.org].
+
</div>
  
<big>'''<font color="red">This widget shouldn't be used on a publicly-editable wiki.</font>'''</big>
+
</td></tr>
 
+
</table>
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.
+
}}
 
+
<br />
== Copy to your site ==
+
{{#switch:
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.
+
{{{status}}}
</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>
+
|active=[[Category:Widget status - active]]
 +
|broken=[[Category:Widget status - broken]]
 +
|defunct=[[Category:Widget status - defunct]]
 +
|unknown=[[Category:Widget status - unknown]]
 +
}}
 +
{{#switch:
 +
{{{security}}}
 +
|checked=[[Category:Widget security - checked]]
 +
|failed=[[Category:Widget security - failed]]
 +
|unknown=[[Category:Widget security - unknown]]
 +
}}
 +
[[Category:Widget]]
 +
<div style="display: none">
 +
{{#set:
 +
Widget Added On={{#show: {{PAGENAME}} |?Creation date }}
 +
|Meta element keywords=MediaWiki, Widget, Widgets, {{PAGENAME}}|+sep=,
 +
|Meta element description=This site is hosting a public collection of MediaWiki Widgets to be used with the Widgets extension. This page is about the {{PAGENAME}} widget.
 +
}}
 +
</div>
 +
<div style="float: right; margin: 0 0 1em 1em;">__TOC__</div>
 +
</includeonly>

Latest revision as of 17:29, 20 January 2016

This is the 'Widget' template. It should be called in the following format:

{{Widget
|description=
|author=
|provider=
|providerurl=
|status=
|security=
}}

Edit the page to see the template text.