Difference between revisions of "Template:Widget"

From Knoesis wiki
Jump to: navigation, search
(Created page with "{{Widget |author=Sergey Chernyshev |addedon=9-17-2009 }} This widget allows you to add any page within an iframe tag to your site. To insert this widget, use the following code:...")
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
<noinclude>
 +
This is the 'Widget' template.
 +
It should be called in the following format:
 +
<pre>
 
{{Widget
 
{{Widget
|author=Sergey Chernyshev
+
|description=
|addedon=9-17-2009
+
|author=
 +
|provider=
 +
|providerurl=
 +
|status=
 +
|security=
 
}}
 
}}
This widget allows you to add any page within an iframe tag to your site.
+
</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">
  
To insert this widget, use the following code:
+
<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.
  
<nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>
+
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]]'''.
|url=http://docs.google.com/present/embed?id=dcn37mcz_22cmnwnwf8
+
</div>
|width=410
+
|height=342
+
|border=0
+
}}</nowiki>
+
  
== Parameters ==
+
</td></tr>
* '''url''' - URL of page being inserted
+
</table>
* '''width''' - width of the iframe (default is 400)
+
}}
* '''height''' - height of the iframe (default is 300)
+
<br />
* '''border''' - border width (default is 1)
+
{{#switch:
 
+
{{{status}}}
== !!! Security Warning !!! ==
+
|active=[[Category:Widget status - active]]
Including the page will not let that page steal the data on your site, hack into your user accounts and so on because it is protected by an iframe, but contents of the page will be displayed as part of the page on your site which can cause non-technical '''security problems through [[wikipedia:Social engineering (security)|social engineering]]'''.
+
|broken=[[Category:Widget status - broken]]
 
+
|defunct=[[Category:Widget status - defunct]]
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.
+
|unknown=[[Category:Widget status - unknown]]
 
+
}}
== Sample result ==
+
{{#switch:
{{#widget:{{PAGENAME}}
+
{{{security}}}
|url=http://docs.google.com/present/embed?id=dcn37mcz_22cmnwnwf8
+
|checked=[[Category:Widget security - checked]]
|width=410
+
|failed=[[Category:Widget security - failed]]
|height=342
+
|unknown=[[Category:Widget security - unknown]]
|border=0
+
}}
 +
[[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.
 
}}
 
}}
{{Comments}}
+
</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.