JDOC

Difference between revisions of "Local wiki extensions"

From Joomla! Documentation

m (→‎Link Search: clean up)
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
<p style="text-align:center;border:1px solid #ccc">[[JDOC:Local wiki templates|Local wiki templates]] &bull; [[JDOC:Local wiki extensions|Local wiki extensions]] &bull; [[JDOC:Local interwiki links|Local interwiki links]]</p>
 
Extensions are additions to the MediaWiki code that perform special functions.
 
Extensions are additions to the MediaWiki code that perform special functions.
  
 
===Syntax Highlighting===
 
===Syntax Highlighting===
The Geshi syntax-highlighter extension<ref>Further information can be found [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi here].</ref> has been installed on this wiki.  For PHP code use <nowiki><source lang="php">Your PHP code here</source></nowiki>.
+
The GeSHi syntax-highlighter extension<ref>Further information can be found [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi here].</ref> has been installed on this wiki.  For PHP code use <nowiki><source lang="php">Your PHP code here</source></nowiki>.<br />
 +
For HTML code use <nowiki><source lang="html4strict">Your HTML markup here</source></nowiki>.<br />
 +
etc. IF you add an invalid lang name, you'll presented with a list of supported "languages".
  
 
For example, inserting the following in your wiki page:
 
For example, inserting the following in your wiki page:
 
 
<pre>
 
<pre>
 
<source lang="php">
 
<source lang="php">
Line 15: Line 17:
  
 
will result in:
 
will result in:
 
 
<source lang="php">
 
<source lang="php">
 
<?php
 
<?php
Line 22: Line 23:
 
</source>
 
</source>
  
===Additional Parser Functions===
+
HTML example:
The ParserFunctions extension has been added. This extension provides the following additional [http://meta.wikimedia.org/wiki/Help:Parser_function parser functions]:-
+
<source lang="html4strict">
* #expr: computes simple mathematical expressions;
+
<html lang="en">
* #if: if-then-else construct;
+
  <head>
* #ifeq: compares two strings or numbers;
+
  <title>Joomla! Documentation</title>
* #ifexists: determines if a particular page exists;
+
  <link rel="StyleSheet" href="doccamp.css" type="text/css" media="screen,projection" />
* #ifexpr: evaluates and expression and tests the result;
+
  </head>
* #switch: switch/case statement;
+
  <body class="foo">
* #time: time and date formatting function;
+
  ...
* #rel2abs: converts a relative to an absolute path;
+
  </body>
* #titleparts: extracts parts of a page title.
+
</html>
Full documentation for these functions can be found [http://meta.wikimedia.org/wiki/Help:ParserFunctions here].
+
</source>
 +
Available '''lang'' attributes are: <tt>abap, actionscript, ada, '''apache''', applescript, asm, asp, autoit, '''bash''', blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp, cpp-qt, csharp, '''css''', d, delphi, '''diff''', div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, '''html4strict''', idl, ini, inno, io, java, java5, '''javascript''', latex, lisp, lua, m68k, matlab, mirc, mpasm, '''mysql''', nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, per, '''perl''', '''php''', '''php-brief''', plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, '''sql''', tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, '''xml''', xpp, z80</tt>
  
== References and Footnotes ==
+
===References and Footnotes===
 +
In your article or tutorial you may want to add external links but they may clutter the text and reduce readability. In order to add a reference<ref>don't take a reference literally: it may well be any URL other than Wikipedia or Webster</ref> enclose the text in a ref element: <nowiki><ref>your reference entry</ref></nowiki>. At the end of the page add <nowiki><references /></nowiki> to display a list of all ref(erence) entries.
 +
* MediaWiki manual about [[mwhelp:Footnotes|Footnotes]]
 +
 
 +
===Link Search===
 +
You found a URL used in an article is broken and want to fix it?  No problem, hit edit and make the changes. But what if that URL is also used someplace else or in a whole series or pages?  The wiki doesn't provide a global search and replace facility and using the standard search function can be tedious and even unsuccessful.  Head over to this Special page, type in the bogus URL and find every article that contains the external link: [[Special:Linksearch]]
  
In your article or tutorial you may want to add external links but they may clutter the text and reduce readability. In order to add a reference<ref>don't take a reference literally: it may well be any URL other than Wikipedia or Webster</ref> enclose the text in a ref element: <nowiki><ref>your reference entry</ref></nowiki>. At the end of the page add <nowiki><references /></nowiki> to display a list of all ref entries.
 
  
 
<references />
 
<references />
 +
 +
<noinclude>[[Category:Documentation Wiki Information]]</noinclude>

Revision as of 10:06, 16 March 2013

Local wiki templatesLocal wiki extensionsLocal interwiki links

Extensions are additions to the MediaWiki code that perform special functions.

Syntax Highlighting[edit]

The GeSHi syntax-highlighter extension[1] has been installed on this wiki. For PHP code use <source lang="php">Your PHP code here</source>.
For HTML code use <source lang="html4strict">Your HTML markup here</source>.
etc. IF you add an invalid lang name, you'll presented with a list of supported "languages".

For example, inserting the following in your wiki page:

<source lang="php">
<?php
  echo "Hello World\n";
?>
</source>

will result in:

<?php
  echo "Hello World\n";
?>

HTML example:

<html lang="en">
  <head>
  <title>Joomla! Documentation</title>
  <link rel="StyleSheet" href="doccamp.css" type="text/css" media="screen,projection" />
  </head>
  <body class="foo">
  ...
  </body>
</html>

Available lang attributes are: abap, actionscript, ada, apache', applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, per, perl, php, php-brief, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80

References and Footnotes[edit]

In your article or tutorial you may want to add external links but they may clutter the text and reduce readability. In order to add a reference[2] enclose the text in a ref element: <ref>your reference entry</ref>. At the end of the page add <references /> to display a list of all ref(erence) entries.

Link Search[edit]

You found a URL used in an article is broken and want to fix it? No problem, hit edit and make the changes. But what if that URL is also used someplace else or in a whole series or pages? The wiki doesn't provide a global search and replace facility and using the standard search function can be tedious and even unsuccessful. Head over to this Special page, type in the bogus URL and find every article that contains the external link: Special:Linksearch


  1. Further information can be found here.
  2. don't take a reference literally: it may well be any URL other than Wikipedia or Webster