Difference between revisions of "User:Barre/MediaWiki/Extensions"

From KitwarePublic
Jump to navigationJump to search
m (add resources)
 
(Extensions stuff)
Line 1: Line 1:
==Resources==
==Extensions==
 
[http://wikipedia.sourceforge.net/ MediaWiki], the software that runs this Wiki site, allows developers to [http://meta.wikimedia.org/wiki/Write_your_own_MediaWiki_extension write their own extensions] to the Wiki markup. An extension defines an HTML/XML-style tag which can be used in the Wiki editor like any other markup. If you want to write your own extensions, check those [[#Resources|resources]].
 
So here it goes...
 
===<tt>kw_include_file</tt>===
This extension allows you to dynamically include the contents of a remote file in your page. It is typically used to include source code and prevent duplication between a source tree and a web page. For safety reasons, access to the local filesystem is denied and translations are performed to (hopefully) prevent people from including malicious HTML/JavaScript code. The following example include the [http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/scripts/media-wiki-extensions/kwIncludeFile.php?content-type=text%2Fplain&root=kwGridWeb extension code] itself through CVSWeb:
<pre>
<kw_include_file>http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/scripts/media-wiki-extensions/kwIncludeFile.php?content-type=text%2Fplain&root=kwGridWeb</kw_include_file>
</pre>
...is rendered as:
<kw_include_file>http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/scripts/media-wiki-extensions/kwIncludeFile.php?content-type=text%2Fplain&root=kwGridWeb</kw_include_file>
 
===<tt>kw_article_time_stamp</tt>===
This extension allows you to dynamically include the time stamp of a Wiki article, i.e. its last modification date. Note that the built-in page-caching feature may lead to incorrect results (so I've heard). The source code can be browsed [http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/scripts/media-wiki-extensions/kwArticleTimeStamp.php?content-type=text%2Fplain&root=kwGridWeb here]. The following example includes the time stamp of the current page and the [[kwGrid:Welcome|Welcome]] page:
<pre>
* [[kwGrid:Editing_Help]]: <kw_article_time_stamp>kwGrid:Editing Help</kw_article_time_stamp>
* [[kwGrid:Welcome]]: <kw_article_time_stamp>kwGrid:Welcome</kw_article_time_stamp>
</pre>
...is rendered as:
* [[kwGrid:Editing_Help]]: <kw_article_time_stamp>kwGrid:Editing Help</kw_article_time_stamp>
* [[kwGrid:Welcome]]: <kw_article_time_stamp>kwGrid:Welcome</kw_article_time_stamp>
 
===Resources===
* [http://wikipedia.sourceforge.net/docs/html MediaWiki generated documentation]
* [http://wikipedia.sourceforge.net/docs/html MediaWiki generated documentation]
* [http://meta.wikimedia.org/wiki/Help:Contents#For_MediaWiki_hackers Help For Mediawiki Hackers]
* [http://meta.wikimedia.org/wiki/Help:Contents#For_MediaWiki_hackers Help For Mediawiki Hackers]
* [http://meta.wikimedia.org/wiki/Database_layout Database Layout] and [http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/docs/schema.doc?view=markup Schema]
* [http://meta.wikimedia.org/wiki/Database_layout Database Layout] and [http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/docs/schema.doc?view=markup Schema]
* [http://wise-nano.org/w/Programming_notes Programming notes] (Chris Phoenix, CRN)
* [http://wise-nano.org/w/Programming_notes Programming notes] (Chris Phoenix, CRN)
* [http://mail.wikimedia.org/ Wikimedia mailing lists]

Revision as of 00:05, 17 February 2005

Extensions

MediaWiki, the software that runs this Wiki site, allows developers to write their own extensions to the Wiki markup. An extension defines an HTML/XML-style tag which can be used in the Wiki editor like any other markup. If you want to write your own extensions, check those resources.

So here it goes...

kw_include_file

This extension allows you to dynamically include the contents of a remote file in your page. It is typically used to include source code and prevent duplication between a source tree and a web page. For safety reasons, access to the local filesystem is denied and translations are performed to (hopefully) prevent people from including malicious HTML/JavaScript code. The following example include the extension code itself through CVSWeb:

<kw_include_file>http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/scripts/media-wiki-extensions/kwIncludeFile.php?content-type=text%2Fplain&root=kwGridWeb</kw_include_file>

...is rendered as: <kw_include_file>http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/scripts/media-wiki-extensions/kwIncludeFile.php?content-type=text%2Fplain&root=kwGridWeb</kw_include_file>

kw_article_time_stamp

This extension allows you to dynamically include the time stamp of a Wiki article, i.e. its last modification date. Note that the built-in page-caching feature may lead to incorrect results (so I've heard). The source code can be browsed here. The following example includes the time stamp of the current page and the Welcome page:

* [[kwGrid:Editing_Help]]: <kw_article_time_stamp>kwGrid:Editing Help</kw_article_time_stamp>
* [[kwGrid:Welcome]]: <kw_article_time_stamp>kwGrid:Welcome</kw_article_time_stamp>

...is rendered as:

  • kwGrid:Editing_Help: <kw_article_time_stamp>kwGrid:Editing Help</kw_article_time_stamp>
  • kwGrid:Welcome: <kw_article_time_stamp>kwGrid:Welcome</kw_article_time_stamp>

Resources