Help:Contents: Difference between revisions

From bradwiki
Jump to navigation Jump to search
No edit summary
 
(72 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Box|width=255px|MediaWiki Help Pages|
{{Box|width=255px|MediaWiki [[Help]] Pages|
*[http://www.onesci.com/Help:Contents OneSci Help]
* [[http://en.wikipedia.org/wiki/Help:Wiki_markup MediaWiki Markup]]
 
* [[:Category:Templates]]
*[http://en.wikipedia.org/wiki/Help:Wiki_markup#Images Mediawiki Markup Images]
* [http://www.onesci.com/Help:Contents OneSci Help]
 
* [http://en.wikipedia.org/wiki/Help:Wiki_markup#Images Mediawiki Markup Images]
*[http://www.mediawiki.org/wiki/Help:Magic_words MediaWiki Magic Words]
* [http://www.mediawiki.org/wiki/Help:Magic_words MediaWiki Magic Words]
 
* [http://www.mediawiki.org/wiki/Help:Tables MediaWiki Tables]
*[http://www.mediawiki.org/wiki/Help:Tables MediaWiki Tables]
* [http://commons.wikimedia.org/wiki/Help:Gadget-ImageAnnotator/Installation MediaWiki ImageAnnotator]
 
* [http://www.mediawiki.org/wiki/Extension:Cite/Cite.php#Separating_references_from_text Mediawiki References]
*[http://commons.wikimedia.org/wiki/Help:Gadget-ImageAnnotator/Installation MediaWiki ImageAnnotator]
* [http://www.mediawiki.org/wiki/Manual:Math Math]
 
* [http://en.wikipedia.org/wiki/Help:Template Template Tips]
*[http://www.mediawiki.org/wiki/Extension:Cite/Cite.php#Separating_references_from_text Mediawiki References]
* [http://meta.wikimedia.org/wiki/Help:Advanced_templates Advanced Templates]
 
* [http://en.wikipedia.org/wiki/Wikipedia:Transclusion Transclusion]
}}
}}


{{Box|width=255px|Bradleymonk.com .JS|
{{Box|width=255px|Bradleymonk.com .JS|
*[[MediaWiki:Common.js]]
*[[MediaWiki:Common.js]]
*[[MediaWiki:LAPI.js]]
*[[MediaWiki:LAPI.js]]
Line 25: Line 24:
*[[MediaWiki:UIElements.js]]
*[[MediaWiki:UIElements.js]]
*[[MediaWiki:AjaxSubmit.js]]
*[[MediaWiki:AjaxSubmit.js]]
}}
{{Box|width=255px|HTML & CSS|
* [https://www.mediawiki.org/wiki/Manual:CSS Manual:CSS]
*: [[MediaWiki:Common.css]]
* [https://www.mediawiki.org/wiki/Manual:Skin_configuration Manual:Skin_configuration]
* [https://www.mediawiki.org/wiki/Manual:Skinning Manual:Skinning]
* [https://www.mediawiki.org/wiki/Help:Skins Help:Skins]
}}
{{Clear}}
== Adding HTML5 Video to MediaWiki ==
<br>
To embed a youtube video, use the following code:
<pre><nowiki>
{{#ev:youtube|tDKUU0SqbSA}}
</nowiki></pre>
{{#ev:youtube|tDKUU0SqbSA}}
{{Clear}}
<br><br><br>
==Extension LinkTitles==
;AUTO GENERATED SITE LINKS
* [http://www.mediawiki.org/wiki/Extension:LinkTitles MediaWiki Extension Page]
<pre>
require_once( "$IP/extensions/LinkTitles/LinkTitles.php" );
$wgLinkTitlesSmartMode = false;        // false = case sensitive
$wgLinkTitlesMinimumTitleLength = 7;    // default is 3
$wgLinkTitlesSkipTemplates = true;      // skip any text in a {{template|text}}
$wgLinkTitlesFirstOnly = true;          // only link the first occurrence
$wgLinkTitlesBlackList = array();
$wgLinkTitlesBlackList[] = 'MediaWiki';
$wgLinkTitlesBlackList[] = 'mediaplayer';
</pre>
; USE THE  __NOAUTOLINKS__  TAG ON A WIKI PAGE TO PREVENT LINKING ON THAT PAGE
<pre>
__NOAUTOLINKS__
</pre>
__NOAUTOLINKS__
{{Clear}}
<br><br><br>
==Template:SlideBox==
<pre><nowiki>
{{SlideBox|width=80%|float=left|
Header [[Content]] Is Shown
|
Body text is hidden
}}
</nowiki></pre>


{{SlideBox|width=80%|float=left|
Header [[Content]] Is Shown
|
Body text is hidden
}}
}}
{{Clear}}
<br><br><br>
==Customize Editing Toolbar==
http://bradleymonk.com/User:Bradley_Monk/common.js
http://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization
;section
*{String} (optional) The name of the section in the WikiEditor. Defaults to 'main'
;id
*{String} (required) Unique id (ie. 'my-button')
;icon
*{String} (recommended) URL to the icon, should be square about 21 to 22px
;label
*{String} (required) Tooltip displayed when hovering button
;insertBefore
*{String} (optional) Wikitext to be inserted before the cursor on-click
;sampleText
*{String} (optional) Text inserted in place of the cursor if no text was selected
;insertAfter
*{String} (optional) Wikitext to be inserted after the cursor on-click
;callback
*{Function} (optional) Called when the button is clicked
;autoSummary
*{mixed} (optional) Null or an Object with the following properties:
**summary: {String} (required) Edit summary that should be used
**position: {String} (optional) 'append', 'prepend' or 'replace'
**delimiter: {String} (optional) delimiter between the (possibly) current summary and the to-be-inserted summary
{{Clear}}
<br><br><br>
==Syntax Highlighting==
The '''SyntaxHighlight''' [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight extension], formerly known as SyntaxHighlight_GeSHi, provides rich formatting of source code using the <code><nowiki><syntaxhighlight></nowiki></code> tag. It is powered by the [http://pygments.org Pygments] library and supports hundreds of different programming languages and file formats.
=== Usage & Parameters ===
<pre><nowiki>
<syntaxhighlight lang="python" line='line'>
def quick_sort(arr):
less = []
pivot_list = []
more = []
if len(arr) <= 1:
return arr
else:
pass
</syntaxhighlight>
</nowiki></pre>
<syntaxhighlight lang="python" line='line'>
def quick_sort(arr):
less = []
pivot_list = []
more = []
if len(arr) <= 1:
return arr
else:
pass
</syntaxhighlight>
==== lang ====
----
The <code>lang="<var>name</var>"</code> attribute defines what lexer should be used. The language affects how the extension highlights the source code.
<pre><nowiki>
<syntaxhighlight lang="python">
def quick_sort(arr):
    less = []
</syntaxhighlight>
</nowiki></pre>
<syntaxhighlight lang="python">
def quick_sort(arr):
    less = []
</syntaxhighlight>
==== line ====
----
The <code>line</code> attribute enables line numbers.
<pre><nowiki>
<syntaxhighlight lang="python" line="1">
def quick_sort(arr):
    less = []
</syntaxhighlight>
</nowiki></pre>
<syntaxhighlight lang="python" line="1">
def quick_sort(arr):
    less = []
</syntaxhighlight>
==== start ====
----
<pre><nowiki>
<syntaxhighlight lang="python" line start="55">
def quick_sort(arr):
    less = []
</syntaxhighlight>
</nowiki></pre>
<syntaxhighlight lang="python" line start="55">
def quick_sort(arr):
    less = []
</syntaxhighlight>
==== highlight ====
----
The <code>highlight</code> attribute specifies one or more lines that should be marked (by highlighting those lines with a different background color). You can specify multiple line numbers separated by commas (for example, <code>highlight="1,4,8"</code>) or ranges using two line numbers and a hyphen (for example, <code>highlight="5-7"</code>). Note that the line number specification ignores any renumbering of the displayed line numbers with the <code>start</code> attribute.
<pre><nowiki>
<syntaxhighlight lang="python" highlight="1,5-7" start=3 line>
def quick_sort(arr):
    less = []
    pivot_list = []
    more = []
    if len(arr) <= 1:
        return arr
</syntaxhighlight>
</nowiki></pre>
<syntaxhighlight lang="python" highlight="1,5-7" start=3 line>
def quick_sort(arr):
    less = []
    pivot_list = []
    more = []
    if len(arr) <= 1:
        return arr
</syntaxhighlight>
==== inline ====
----
The attribute indicates that the source code should be inline as part of a paragraph (as opposed to being its own block).
Note that line breaks can occur at any space between the opening and closing tags unless the source code is marked non-breakable with <code>class="nowrap"</code> (on those wikis that support it; see below) or <code>style=white-space:nowrap</code>. For example:
<pre>
In python, <syntaxhighlight lang="python" inline>lambda x: x * 2</syntaxhighlight> is a lambda expression.
</pre>
results in:
In python <syntaxhighlight lang="python" inline>lambda x: x * 2</syntaxhighlight> is a lambda expression.
==== class ====
----
When <code>inline</code> is used, <code>class="nowrap"</code> specifies that line breaks should not occur at spaces within the code block.
Using <code>class="nowrap"</code>:
<pre><nowiki>
<div style="max-width:300px; border:1px solid #ccc "></div>
<nowiki></pre>
<div style="max-width:300px; border:1px solid #ccc ">
xxxxxxxxxxxxxxxxxxxxx<syntaxhighlight lang="python" inline>lambda x: x * 2</syntaxhighlight>xxxxxxxxxxxxxxx
</div>
Using <code>style="white-space:nowrap"</code>:
<pre><nowiki>
<div style="white-space:nowrap; max-width:300px; border:1px solid #ccc"></div>
</nowiki></pre>
<div style="white-space:nowrap; max-width:300px; border:1px solid #ccc">
xxxxxxxxxxxxxxxxxxxxx<syntaxhighlight lang="python" inline>lambda x: x * 2</syntaxhighlight>xxxxxxxxxxxxxxx
</div>
==== style ====
----
The <code>style</code> attribute allows CSS attributes to be included directly. This is equivalent to enclosing the block in a <code><nowiki><div></nowiki></code> (not <code><nowiki><span></nowiki></code>) tag. The <code>tab‑size</code> attribute cannot be specified this way; it requires an enclosing <code><nowiki><span></nowiki></code> tag. For example:
<pre><nowiki>
<div style="max-width:600px; background:rgba(10,10,10,.30);">
PYTHON:
<syntaxhighlight lang="python" style="border:1px dashed gray; background:rgba(10,10,50,.10);">
def quick_sort(arr):
less = []
pivot_list = []
more = []
if len(arr) <= 1:
return arr
else:
pass
</syntaxhighlight>
</div>
</nowiki></pre>
<div style="max-width:600px; background:rgba(10,10,10,.30);">
PYTHON:
<syntaxhighlight lang="python" style="border:1px dashed gray; background:rgba(10,10,50,.10);">
def quick_sort(arr):
less = []
pivot_list = []
more = []
if len(arr) <= 1:
return arr
else:
pass
</syntaxhighlight>
</div>
{{Clear}}
<br><br><br>
==LaTeX Math==
<pre>
<math> f(x, \mu, \sigma) = \frac{1}{\sigma \sqrt{2\pi} } e^{ -\frac{(x-\mu)^2}{2\sigma^2} } </math>
</pre>
::<math>
f(x, \mu, \sigma) = \frac{1}{\sigma \sqrt{2\pi} } e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
</math>
; {{TeX}} and HTML
<big>[http://en.wikipedia.org/wiki/Table_of_mathematical_symbols LIST OF MATH SYMBOLS IN HTML MARKUP]</big><br>
{| class="wikitable"
|-
! {{TeX}} Syntax ([[#Forced_PNG_rendering|forcing PNG]])
! {{TeX}} Rendering
! HTML Syntax
! HTML Rendering
|-
| <code><nowiki><math>\alpha</math></nowiki></code>
| <math>\alpha</math>
| <code><nowiki>{{math|<VAR>&amp;alpha;</VAR>}}</nowiki></code>
| {{math|<VAR>&alpha;</VAR>}}
|-
| <code><nowiki><math> f(x) = x^2\,</math></nowiki></code>
| <math> f(x) = x^2\,</math>
| <code><nowiki>{{math|''f''(<var>x</var>) {{=}} <var>x</var><sup>2</sup>}}</nowiki></code>
| {{math|''f''(<var>x</var>) {{=}} <var>x</var><sup>2</sup>}}
|-
| <code><nowiki><math>\sqrt{2}</math></nowiki></code>
| <math>\sqrt{2}</math>
| <code><nowiki>{{math|{{radical|2}}}}</nowiki></code>
| {{math|{{radical|2}}}}
|-
| <code><nowiki><math>\sqrt{1-e^2}</math></nowiki></code>
| <math>\sqrt{1-e^2}</math>
| <code><nowiki>{{math|{{radical|1 &amp;minus; ''e''&amp;sup2;}}}}</nowiki></code>
| {{math|{{radical|1 &minus; ''e''&sup2;}}}}
|}
The codes on the left produce the symbols on the right, but the latter can also be put directly in the wikitext, except for &lsquo;=&rsquo;.
{| class="wikitable"
|-
! Syntax
! Rendering
|- valign="top"
|<pre><nowiki>&amp;alpha; &amp;beta; &amp;gamma; &amp;delta; &amp;epsilon; &amp;zeta;
&amp;eta; &amp;theta; &amp;iota; &amp;kappa; &amp;lambda; &amp;mu; &amp;nu;
&amp;xi; &amp;omicron; &amp;pi; &amp;rho; &amp;sigma; &amp;sigmaf;
&amp;tau; &amp;upsilon; &amp;phi; &amp;chi; &amp;psi; &amp;omega;
&amp;Gamma; &amp;Delta; &amp;Theta; &amp;Lambda; &amp;Xi; &amp;Pi;
&amp;Sigma; &amp;Phi; &amp;Psi; &amp;Omega;
</nowiki></pre>
| style="texhtml" |α β γ δ ε ζ<br
/>η θ ι κ λ μ ν<br
/>ξ ο π ρ σ ς<br
/>τ υ φ χ ψ ω<br
/>Γ Δ Θ Λ Ξ Π<br
/>Σ Φ Ψ Ω
|- valign="top"
| valign="middle" | <pre><nowiki>&amp;int; &amp;sum; &amp;prod; &amp;radic; &amp;minus; &amp;plusmn; &amp;infty;
&amp;asymp; &amp;prop; {{=}} &amp;equiv; &amp;ne; &amp;le; &amp;ge;
&amp;times; &amp;middot; &amp;divide; &amp;part; &amp;prime; &amp;Prime;
&amp;nabla; &amp;permil; &amp;deg; &amp;there4; &amp;Oslash; &amp;oslash;
&amp;isin; &amp;notin;
&amp;cap; &amp;cup; &amp;sub; &amp;sup; &amp;sube; &amp;supe;
&amp;not; &amp;and; &amp;or; &amp;exist; &amp;forall;
&amp;rArr; &amp;hArr; &amp;rarr; &amp;harr; &amp;uarr;
&amp;alefsym; - &amp;ndash; &amp;mdash;
</nowiki></pre>
| style="texhtml" |∫ ∑ ∏ √ − ± ∞<br
/>≈ ∝ = ≡ ≠ ≤ ≥<br
/>× · ÷ ∂ ′ ″<br
/>∇ ‰ ° ∴ Ø ø<br
/>∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇<br
/>¬ ∧ ∨ ∃ ∀<br
/>⇒ ⇔ → ↔ ↑<br
/>ℵ - – —
|}


{{Clear}}
{{Clear}}
<br><br><br>


==Image Annoation==
==Image Annoation==
Line 34: Line 466:
  <nowiki>
  <nowiki>
<div class="wpImageAnnotatorEnable">
<div class="wpImageAnnotatorEnable">
<span class="wpImageAnnotatorPageName" style="display:none;">[[Connectome]]</span>
<span class="wpImageAnnotatorPageName" style="display:none;">[[Sandbox]]</span>
<span class="wpImageAnnotatorFullName" style="display:none;">[[Connectome]]</span>
<span class="wpImageAnnotatorFullName" style="display:none;">[[Sandbox]]</span>
<div class="wpImageAnnotatorFile">[[File:Brainatlas1.jpg|640px]]</div>
<div class="wpImageAnnotatorFile">[[File:Foo.png]]</div>
<div style="display:none;"><div><div><!--Dummy marker to have image notes inserted below this line-->{{ImageNoteEnd|id=-1}}
<div style="display:none;"><div><div><!--IMAGE NOTES BELOW -->{{ImageNoteEnd|id=-1}}
</div>
</div>
</div>
</nowiki>
</nowiki>




==Livelets==
*[http://www.mediawiki.org/wiki/Extension:Livelets Livelets]


To create livelets, wrap any areas of the page in the #live parser-function.


In the following example, a transclusion of the page called Template:MyVerySlowTable has been turned into a livelet:
{{Clear}}
<br><br><br>
 


<nowiki>
{{#live: {{MyVerySlowTable}} }}
</nowiki>




==References and Citations==
==References and Citations==
===Using Native Ref Tags===
In-text references make it easy to copy the text to another page; on the other hand, they make it hard to read. References containing a lot of data, quotes or elaborate citation templates can make up a significantly larger fraction of the source than the text that will actually be visible. To avoid this, recent versions of the extension allow moving some or all of the references into the <code>&lt;references /></code> section, to the place where they will actually appear to the reader. Thus,
In-text references make it easy to copy the text to another page; on the other hand, they make it hard to read. References containing a lot of data, quotes or elaborate citation templates can make up a significantly larger fraction of the source than the text that will actually be visible. To avoid this, recent versions of the extension allow moving some or all of the references into the <code>&lt;references /></code> section, to the place where they will actually appear to the reader. Thus,


Line 73: Line 502:


will have the same output as the [[#Example|first example]] above, although the numbering and order of the references will not in general be the same.
will have the same output as the [[#Example|first example]] above, although the numbering and order of the references will not in general be the same.
----
{{Clear}}
<br><br><br>




Line 130: Line 567:
| width || pixels || Specifies the width of an iframe
| width || pixels || Specifies the width of an iframe
|}
|}
{{Clear}}
<br><br><br>


==Tables==
==Tables==
Line 162: Line 610:
|[http://mnm.engr.uconn.edu/MNM/SMSSearchServlet Minimotif Miner] || Application to search for short sequence motifs in Proteins.                 
|[http://mnm.engr.uconn.edu/MNM/SMSSearchServlet Minimotif Miner] || Application to search for short sequence motifs in Proteins.                 
|}
|}
{{Clear}}
<br><br><br>
==Upgrading MediaWiki==
<big>Step 1</big> '''- [http://www.mediawiki.org/wiki/Manual:Upgrading download latest stable version of MediaWiki]'''
<big>Step 2</big> '''- determine database credentials from dreamhost'''
;Get Hostname (e.g.):
* mysql.bradleymonk.com
;Get Database name (e.g.):
* bradleymonk_com
;Get Database User name (e.g.):
* username
;Get Database User pass (e.g.):
* password
<big>Step 3</big> '''- back-up existing files and the database'''
*Go to: mysql.example.com
*Enter db user and password when prompted
*click on db in left panel
*click on the "Export" tab
*check "Save as file"
*click "Go"
<big>Step 4</big> '''- FTP the <code>mediawiki.tar.gz</code> file to the /w directory'''
<big>Step 5</big> '''- Unpack the tarball'''
;Use the console to SSH into the /w directory and unpack tarball
* <code>$ssh bradleymonk.com -l username</code>
* Change to the /w directory
:* <code>$tar xvzf mediawiki.tar.gz</code>
*this unpacks into a new folder: <code>/w/mediawiki</code>
<big>Step 6</big> '''- Move files and rename directory'''
;Copy files from old to new directory
* LocalSettings.php
* logofile.png
* images (or upload) directory
* extension directory
* custom skins
* .htaccess file
;Swap-rename directories
*rename old directory <code>/w_old</code>
*move new directory out of <code>/w_old</code> to top level domain
*rename new directory to <code>/w</code>
<big>Step 7</big> '''- Run MediaWiki update script'''
* login with SSH again:
:* <code>$ssh bradleymonk.com -l username</code>
* change to the <code>/w/maintenance</code> directory
* enter: <code>$php update.php</code>
* If the prompt gives an error like: "you're using php version 2.x mediawiki requires version 3.x"
* try entering these:
:* <code>$/usr/local/php53/bin/php update.php</code>
:* <code>$/usr/local/php54/bin/php update.php</code>
;Check if the upgrade worked by going to the MediaWiki page "Special Version"
{{Clear}}
<br><br><br>
== Quoting ==
{{cquote|SAN DIEGO -- Money -- does it draw students to their future careers? The answer is no, according to statistics and students at San Diego State University.}}
<pre>
{{cquote|quote goes here}}
</pre>
{{Clear}}
<br><br><br>
==MediaWiki Tips==
*To remove the arrow icon from external links, navigate to MediaWiki:Common.css and add this line of code
<nowiki>
#content a[href ^="http://"].external {background: center right no-repeat; padding-right: 1px;}
</nowiki>
{{Clear}}
<br><br><br>
==Button Template==
<nowiki>{{Button|TPB=.5em| Button Text }}</nowiki>
{{Button|TPB=.5em| Button Text }}
{{Clear}}
<br><br><br>
==Table Map==
See here: [[Table Map]]
{{Clear}}
<br><br><br>
== Labeled Section Transclusion ==
<big>See: [http://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion Extension:Labeled_Section_Transclusion]</big>
=== Step 1: Mark off sections ===
Mark off sections in the text using <nowiki><section></nowiki></> tags like this:
    <nowiki>
    <section begin=Hayashi_Malinow_2000_Science />
    {{Article|Hayashi Malinow|2000|Science • PDF|10731148|Driving AMPA receptors into synapses}}
    <section end=Hayashi_Malinow_2000_Science />
    </nowiki>
Note that this uses two individual markers, rather than normal XML open/close tags, which simplifies nested or overlapping sections. This allows you to insert section tags without worrying about interfering with other sections.
=== Step 2: Transclude the section ===
Call the parser function to transclude it, i.e. to transclude a section called ''chapter1'' from a page called ''[[Articles]]'':
    <nowiki>
    {{#section:Articles|Hayashi_Malinow_2000_Science}}
    </nowiki>
[[Category:Templates]]

Latest revision as of 01:34, 20 May 2020

MediaWiki Help Pages

Bradleymonk.com .JS

HTML & CSS



Adding HTML5 Video to MediaWiki


To embed a youtube video, use the following code:

{{#ev:youtube|tDKUU0SqbSA}}


{{#ev:youtube|tDKUU0SqbSA}}








Extension LinkTitles

AUTO GENERATED SITE LINKS
require_once( "$IP/extensions/LinkTitles/LinkTitles.php" );
$wgLinkTitlesSmartMode = false;         // false = case sensitive
$wgLinkTitlesMinimumTitleLength = 7;    // default is 3
$wgLinkTitlesSkipTemplates = true;      // skip any text in a {{template|text}}
$wgLinkTitlesFirstOnly = true;          // only link the first occurrence
$wgLinkTitlesBlackList = array();
$wgLinkTitlesBlackList[] = 'MediaWiki';
$wgLinkTitlesBlackList[] = 'mediaplayer';
USE THE __NOAUTOLINKS__ TAG ON A WIKI PAGE TO PREVENT LINKING ON THAT PAGE
__NOAUTOLINKS__ 

__NOAUTOLINKS__






Template:SlideBox

{{SlideBox|width=80%|float=left|
Header [[Content]] Is Shown
|
Body text is hidden
}}


Header Content Is Shown

Body text is hidden








Customize Editing Toolbar

http://bradleymonk.com/User:Bradley_Monk/common.js http://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization

section
  • {String} (optional) The name of the section in the WikiEditor. Defaults to 'main'
id
  • {String} (required) Unique id (ie. 'my-button')
icon
  • {String} (recommended) URL to the icon, should be square about 21 to 22px
label
  • {String} (required) Tooltip displayed when hovering button
insertBefore
  • {String} (optional) Wikitext to be inserted before the cursor on-click
sampleText
  • {String} (optional) Text inserted in place of the cursor if no text was selected
insertAfter
  • {String} (optional) Wikitext to be inserted after the cursor on-click
callback
  • {Function} (optional) Called when the button is clicked
autoSummary
  • {mixed} (optional) Null or an Object with the following properties:
    • summary: {String} (required) Edit summary that should be used
    • position: {String} (optional) 'append', 'prepend' or 'replace'
    • delimiter: {String} (optional) delimiter between the (possibly) current summary and the to-be-inserted summary







Syntax Highlighting

The SyntaxHighlight extension, formerly known as SyntaxHighlight_GeSHi, provides rich formatting of source code using the <syntaxhighlight> tag. It is powered by the Pygments library and supports hundreds of different programming languages and file formats.


Usage & Parameters

<syntaxhighlight lang="python" line='line'>
def quick_sort(arr):
	less = []
	pivot_list = []
	more = []
	if len(arr) <= 1:
		return arr
	else:
		pass
</syntaxhighlight>
def quick_sort(arr):
	less = []
	pivot_list = []
	more = []
	if len(arr) <= 1:
		return arr
	else:
		pass


lang


The lang="name" attribute defines what lexer should be used. The language affects how the extension highlights the source code.

<syntaxhighlight lang="python">
def quick_sort(arr):
    less = []
</syntaxhighlight>


def quick_sort(arr):
    less = []



line



The line attribute enables line numbers.


<syntaxhighlight lang="python" line="1">
def quick_sort(arr):
    less = []
</syntaxhighlight>


def quick_sort(arr):
    less = []


start


<syntaxhighlight lang="python" line start="55">
def quick_sort(arr):
    less = []
</syntaxhighlight>


def quick_sort(arr):
    less = []


highlight


The highlight attribute specifies one or more lines that should be marked (by highlighting those lines with a different background color). You can specify multiple line numbers separated by commas (for example, highlight="1,4,8") or ranges using two line numbers and a hyphen (for example, highlight="5-7"). Note that the line number specification ignores any renumbering of the displayed line numbers with the start attribute.


<syntaxhighlight lang="python" highlight="1,5-7" start=3 line>
def quick_sort(arr):
    less = []
    pivot_list = []
    more = []
    if len(arr) <= 1:
        return arr
</syntaxhighlight>


def quick_sort(arr):
    less = []
    pivot_list = []
    more = []
    if len(arr) <= 1:
        return arr




inline


The attribute indicates that the source code should be inline as part of a paragraph (as opposed to being its own block).


Note that line breaks can occur at any space between the opening and closing tags unless the source code is marked non-breakable with class="nowrap" (on those wikis that support it; see below) or style=white-space:nowrap. For example:

In python, <syntaxhighlight lang="python" inline>lambda x: x * 2</syntaxhighlight> is a lambda expression.

results in:

In python lambda x: x * 2 is a lambda expression.


class


When inline is used, class="nowrap" specifies that line breaks should not occur at spaces within the code block.


Using class="nowrap":

<nowiki>
<div style="max-width:300px; border:1px solid #ccc "></div>
<nowiki>

xxxxxxxxxxxxxxxxxxxxxlambda x: x * 2xxxxxxxxxxxxxxx


Using style="white-space:nowrap":

<div style="white-space:nowrap; max-width:300px; border:1px solid #ccc"></div>

xxxxxxxxxxxxxxxxxxxxxlambda x: x * 2xxxxxxxxxxxxxxx



style



The style attribute allows CSS attributes to be included directly. This is equivalent to enclosing the block in a <div> (not <span>) tag. The tab‑size attribute cannot be specified this way; it requires an enclosing <span> tag. For example:

<div style="max-width:600px; background:rgba(10,10,10,.30);">
PYTHON:
<syntaxhighlight lang="python" style="border:1px dashed gray; background:rgba(10,10,50,.10);">
def quick_sort(arr):
	less = []
	pivot_list = []
	more = []
	if len(arr) <= 1:
		return arr
	else:
		pass
</syntaxhighlight>
</div>


PYTHON:

def quick_sort(arr):
	less = []
	pivot_list = []
	more = []
	if len(arr) <= 1:
		return arr
	else:
		pass






LaTeX Math

<math> f(x, \mu, \sigma) = \frac{1}{\sigma \sqrt{2\pi} } e^{ -\frac{(x-\mu)^2}{2\sigma^2} } </math>
TeX and HTML

LIST OF MATH SYMBOLS IN HTML MARKUP

TeX Syntax (forcing PNG) TeX Rendering HTML Syntax HTML Rendering
<math>\alpha</math> {{math|<VAR>&alpha;</VAR>}} α
<math> f(x) = x^2\,</math> {{math|''f''(<var>x</var>) {{=}} <var>x</var><sup>2</sup>}} f(x) = x2
<math>\sqrt{2}</math> {{math|{{radical|2}}}} 2
<math>\sqrt{1-e^2}</math> {{math|{{radical|1 &minus; ''e''&sup2;}}}} 1 − e²

The codes on the left produce the symbols on the right, but the latter can also be put directly in the wikitext, except for ‘=’.

Syntax Rendering
&alpha; &beta; &gamma; &delta; &epsilon; &zeta;
&eta; &theta; &iota; &kappa; &lambda; &mu; &nu;
&xi; &omicron; &pi; &rho; &sigma; &sigmaf;
&tau; &upsilon; &phi; &chi; &psi; &omega;
&Gamma; &Delta; &Theta; &Lambda; &Xi; &Pi;
&Sigma; &Phi; &Psi; &Omega;
α β γ δ ε ζ
η θ ι κ λ μ ν
ξ ο π ρ σ ς
τ υ φ χ ψ ω
Γ Δ Θ Λ Ξ Π
Σ Φ Ψ Ω
&int; &sum; &prod; &radic; &minus; &plusmn; &infty;
&asymp; &prop; {{=}} &equiv; &ne; &le; &ge; 
&times; &middot; &divide; &part; &prime; &Prime;
&nabla; &permil; &deg; &there4; &Oslash; &oslash;
&isin; &notin; 
&cap; &cup; &sub; &sup; &sube; &supe;
&not; &and; &or; &exist; &forall; 
&rArr; &hArr; &rarr; &harr; &uarr; 
&alefsym; - &ndash; &mdash; 
∫ ∑ ∏ √ − ± ∞
≈ ∝ = ≡ ≠ ≤ ≥
× · ÷ ∂ ′ ″
∇ ‰ ° ∴ Ø ø
∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇
¬ ∧ ∨ ∃ ∀
⇒ ⇔ → ↔ ↑
ℵ - – —







Image Annoation

<div class="wpImageAnnotatorEnable">
<span class="wpImageAnnotatorPageName" style="display:none;">[[Sandbox]]</span>
<span class="wpImageAnnotatorFullName" style="display:none;">[[Sandbox]]</span>
<div class="wpImageAnnotatorFile">[[File:Foo.png]]</div>
<div style="display:none;"><div><div><!--IMAGE NOTES BELOW -->{{ImageNoteEnd|id=-1}}
</div>








References and Citations

Using Native Ref Tags

In-text references make it easy to copy the text to another page; on the other hand, they make it hard to read. References containing a lot of data, quotes or elaborate citation templates can make up a significantly larger fraction of the source than the text that will actually be visible. To avoid this, recent versions of the extension allow moving some or all of the references into the <references /> section, to the place where they will actually appear to the reader. Thus,

According to scientists, the Sun is pretty big.<ref name="miller" />
The Moon, however, is not so big.<ref name="smith" />

==Notes==
<references>
<ref name="miller">E. Miller, The Sun, (New York: Academic Press, 2005), 23-5.</ref>
<ref name="smith">R. Smith, "Size of the Moon", Scientific American, 46 (April 1978): 44-6.</ref>
</references>

will have the same output as the first example above, although the numbering and order of the references will not in general be the same.








HTML

Example

<html> <iframe src="http://www.w3schools.com/tags/tag_iframe.asp" height="100" width="400" frameborder="1" seamless="seamless" style="float:left"></iframe> </html>

iFrame Code

<html>
<iframe src="http://www.w3schools.com/tags/tag_iframe.asp" 
height="300" width="350" frameborder="1" seamless="seamless" style="float:left">
</iframe>
</html>

iFrame Attributes

Attribute Value Description
align left, right, top, middle, bottom Specifies the alignment of an iframe according to surrounding elements
frameborder 1, 0 Specifies whether or not to display a border around an iframe
height pixels Specifies the height of an iframe
longdesc URL Specifies a page that contains a long description of the content of an iframe
marginheight pixels Specifies the top and bottom margins of the content of an iframe
marginwidth pixels Specifies the left and right margins of the content of an iframe
name name Specifies the name of an iframe
sandbox "", allow-forms, allow-same-origin, allow-scripts, allow-top-navigation Enables a set of extra restrictions for the content in the iframe
scrolling yes, no, auto Specifies whether or not to display scrollbars in an iframe
seamless seamless Specifies that the iframe should look like it is a part of the containing document
src URL Specifies the address of the document to embed in the iframe
srcdoc HTML_code Specifies the HTML content of the page to show in the iframe
width pixels Specifies the width of an iframe








Tables

wikitable

Link Description
BioNetGen A web-based tool for automatically generating a biochemical reaction networks from user-specified rules for biomolecular interactions.
B10NUMB3R5 (BIONUMBERS) A database of useful biological numbers.
BioInformatics Services BioInformatics Services is a biotechnology consulting firm specializing in using computational biology to solve complex biological and data analysis problems.
cellmigrationgateway modeling software
CellML The CellML language is an open standard based on the XML markup language at the University of Auckland and affiliated research groups.
CompCell Bio Web Development site for teaching modules on quantitative cell biology.
DOQCS Quantitative Cellular Signaling (DOQCS) is a repository of models of signaling pathways.
E-Cell A Multi-Algorithm, Multi-Timescale Simulation Software Environment.
Gfit A program for global regression analysis of experimental data.
Kitware Professional Visualization Solutions, Tools and Support.
MCell General Monte Carlo Simulator of Cellular Microphysiology.
Minimotif Miner Application to search for short sequence motifs in Proteins.








Upgrading MediaWiki

Step 1 - download latest stable version of MediaWiki


Step 2 - determine database credentials from dreamhost

Get Hostname (e.g.)
  • mysql.bradleymonk.com
Get Database name (e.g.)
  • bradleymonk_com
Get Database User name (e.g.)
  • username
Get Database User pass (e.g.)
  • password


Step 3 - back-up existing files and the database

  • Go to: mysql.example.com
  • Enter db user and password when prompted
  • click on db in left panel
  • click on the "Export" tab
  • check "Save as file"
  • click "Go"


Step 4 - FTP the mediawiki.tar.gz file to the /w directory


Step 5 - Unpack the tarball

Use the console to SSH into the /w directory and unpack tarball
  • $ssh bradleymonk.com -l username
  • Change to the /w directory
  • $tar xvzf mediawiki.tar.gz
  • this unpacks into a new folder: /w/mediawiki


Step 6 - Move files and rename directory

Copy files from old to new directory
  • LocalSettings.php
  • logofile.png
  • images (or upload) directory
  • extension directory
  • custom skins
  • .htaccess file
Swap-rename directories
  • rename old directory /w_old
  • move new directory out of /w_old to top level domain
  • rename new directory to /w


Step 7 - Run MediaWiki update script

  • login with SSH again:
  • $ssh bradleymonk.com -l username
  • change to the /w/maintenance directory
  • enter: $php update.php


  • If the prompt gives an error like: "you're using php version 2.x mediawiki requires version 3.x"
  • try entering these:
  • $/usr/local/php53/bin/php update.php
  • $/usr/local/php54/bin/php update.php


Check if the upgrade worked by going to the MediaWiki page "Special Version"








Quoting

SAN DIEGO -- Money -- does it draw students to their future careers? The answer is no, according to statistics and students at San Diego State University.
{{cquote|quote goes here}}








MediaWiki Tips

  • To remove the arrow icon from external links, navigate to MediaWiki:Common.css and add this line of code
#content a[href ^="http://"].external {background: center right no-repeat; padding-right: 1px;}








Button Template

{{Button|TPB=.5em| Button Text }}

Button Text








Table Map

See here: Table Map







Labeled Section Transclusion

See: Extension:Labeled_Section_Transclusion

Step 1: Mark off sections

Mark off sections in the text using <section></> tags like this:

   
    <section begin=Hayashi_Malinow_2000_Science />

    {{Article|Hayashi Malinow|2000|Science • PDF|10731148|Driving AMPA receptors into synapses}}

    <section end=Hayashi_Malinow_2000_Science />
    

Note that this uses two individual markers, rather than normal XML open/close tags, which simplifies nested or overlapping sections. This allows you to insert section tags without worrying about interfering with other sections.

Step 2: Transclude the section

Call the parser function to transclude it, i.e. to transclude a section called chapter1 from a page called Articles:

   
    {{#section:Articles|Hayashi_Malinow_2000_Science}}