Help:Contents
MediaWiki Help Pages
Bradleymonk.com .JS
Tool Tips
Semantic Mediawiki Popups
The parser function #info allows to add tooltips containing additional information or warnings.
Syntax
{{#info: <text> | <icon> }}
- you must include the "nowiki" tag around any equal signs if you want to use styles inside the into popup
- example:
<span style<nowiki>=</nowiki>"color:red">
- result {{#info:text this is red text|warning}}
- example:
{{#info:text <span style<nowiki>="color:red">this is red text}}</nowiki>
- If you want to have a large image popup, the best way to do this is using these inline styles with the span tag
position:fixed; left:10px; top:10px; overflow:visible;
- inline text {{#info:text THIS WILL PUT THE IMAGE UP HERE text}} inline text
- Use the Popupimg template inside the Popup template to do exactly this
- example:
{{#info: {{Popupimg|[[File:Nicoll2011 Fig1.png]]}} }}
- result: {{#info:
}}
- example:
{{Popup| {{Popupimg|[[File:Nicoll2011 Fig1.png]] }} }}
- result: {{#info:
}}
Parameters
- Text
- The first parameter displays the text in the #info bubble and should only contain inline HTML elements. No paragraphs, tables, lists or any other block elements are allowed. One should also avoid using empty lines (because empty line will terminate one paragraph and start another one) and equal signs (see the tips section). Refraining from those guidelines could lead to incorrect HTML code and rendering (e. g. part of text after empty line could be rendered in the page, not in the bubble).
Icon
In case a second parameter is passed onto to #info, it will influences the display of the icon. If an incorrect parameter is used then the parameter will be silently ignored, and the default info icon will be displayed instead.
Allowed values are:
Icon | Description | Example |
---|---|---|
info |
A blue icon with question mark; default | {{#info: test }} |
warning |
A yellow icon with exclamation mark. | warning}} |
Code | Result | Comment |
---|---|---|
Some inline text{{#info:Text to be shown in a bubble.}} | Some inline text{{#info:Text to be shown in a bubble.}} | Click on the icon to see the bubble. |
Tugrik{{#info:The official currency of Mongolia.}} | Tugrik{{#info:The official currency of Mongolia.}} | |
2011-02-29{{#info:Incorrect date.|warning}} | warning}} | In Semantic MediaWiki prior to version 1.6.0 the second argument is ignored, "info" icon is used unconditionally. |
- inline text {{#info:popup text parser tag}} using the parser tag 'info'
{{#info:popup text parser tag}}
- inline text {{#info: popup text template }} using the template 'Popup'
{{Popup|popup text template}}
Hoverable Tooltips
{{{2}}}
Extension LinkTitles
Wiki editors can add the magic word to a page to prevent automatic linking of page titles (remove spaces before and after NOAUTOLINKS).
__ NOAUTOLINKS __
Template:SlideBox
{{SlideBox|width=80%|float=left| 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
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>α</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 − ''e''²}}}}
|
√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 |
---|---|
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω |
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω |
∫ ∑ ∏ √ − ± &infty; ≈ ∝ {{=}} ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ Ø ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ ℵ - – — |
∫ ∑ ∏ √ − ± ∞ ≈ ∝ = ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ Ø ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ ℵ - – — |
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>
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:
{{#live: {{MyVerySlowTable}} }}
References and Citations
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
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