more is coming eventually
![]() |
See also:
- Again, see /tag/mediawiki+howto
- Apache > mod_rewrite > MediaWiki mod_rewrite was important
- Early MediaWiki versions are designed for spamming
- MediaWiki and Google Sitemaps
- MediaWiki and PHP5 was important pre-1.4.0
- MediaWiki as a weblog was a huge and awesome project
- MediaWiki backups and restoration
- MediaWiki calendar templating was a huge and awesome project
-
- MediaWiki extensions
- MediaWiki summary extension — An idea.
- MediaWiki mod_rewrite via .htaccess — Pretty URLs with rewriting.
- MediaWiki security
- MediaWiki troubleshooting
- MediaWiki templates are useful
- MediaWiki updating and upgrading
- MediaWiki WYSIWYG notes
—
-
Joshua Oreman’s icon extension (from 2005)
Various ∞
-
[[MediaWiki:Sitesubtitle]]- 2019-11-19 – Perhaps it is now https://www.mediawiki.org/wiki/Manual:Tagline_%28Site_Subtitle%29 but I also see https://www.mediawiki.org/wiki/MediaWiki:Sitesubtitle
- Variables aka “magic words”
-
<div class="noprint">this won't appear in the {{printable|MediaWiki tricks and tips|print version}}</div>- Where
printableis a template, with[{{SERVER}}{{localurl:{{NAMESPACE}}:{{{1}}}|printable=yes}} {{{2}}}]
- Where
-
Wiki linking within a page. You can make links within a page like
[[page name#id_tag]]- Make the linked-to spot like a regular section:
=id_tag= - Or manually make it like:
<span id="id_tag">text here</span>
- Make the linked-to spot like a regular section:
- To display a plain pipe at the beginning of a line in a table, without it becoming table markup, use
<nowiki>|</nowiki>or&#124; - To change the CSS for a skin, alter the wiki page MediaWiki:
.css, where is the internal name of the skin – MediaWiki Monobook.css, standard, classic, cologneblue, chick, etc. - https://meta.wikimedia.org/wiki/MediaWiki_FAQ
- https://www.mediawiki.org/wiki/Manual:Configuration_settings
[[Template:Printable]]- idea for formatting PRE areas
-
Link to what links to this page:
[[Special:Whatlinkshere/{{NAMESPACE}}:{{PAGENAME}}|name]]
enable sub-pages ∞
# Enable subpages in the main namespace: $wgNamespacesWithSubpages[0] = true;
Now you can create a link like [[/foo]]. Following it and adding content will give you an automatic breadcrumb leading back to the source page. Yay.
I don’t know of any functionality to be able to create subpage [[/bar]] links which will point to /rootpage/bar instead of /rootpage/subpages/bar
URL actions ∞
-
Make links within your wiki like this:
[{{SERVER}}{{localurl:{{NAMESPACE}}:{{{1}}}|printable=yes}} {{{2}}}]- After that pipe you would put your URL action. In that example, I’m showing
printable=yes
-
and-lt-semicolonoutputs as <, output the source with &lt;: <- this line got broken somehow. =(
-
&action=purge— to force the re-rendering of a page.- You can “bulk-purge” pages, by editing them and including a template, then purge that template to purge the caches of all pages which use that template.
&action=raw— to download the source.-
&action=raw&gen=css— to view the css&action=raw&ctype=text/css— the non-download version of the source
&action=render— a nicely-rendered version.&action=printable=yes— a printable version.-
Permanent link:
[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|oldid={{REVISIONID}}}} NAME]
-
Edit this page
[{{SERVER}}{{NAMESPACE}}:{{PAGENAMEE}}&action=edit NAME]- Want it on another wiki? Change the initial
{{SERVER}}to something else, even a template that has the url.
-
Add a new section to this page
[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}&action=edit§ion=new}} NAME]
-
add a new section to the discussion tab for this page
[{{SERVER}}{{localurl:Talk:{{PAGENAMEE}}&action=edit§ion=new}} NAME]
mysql: determine the date it was last modified ∞
SELECT rc_cur_time from recentchanges order by rc_cur_time DESC limit 1;
This should give you the last changes recorded in recentchanges but if you want to be sure (in case RC table got flushed somehow or does not exist), you want to query the “page” table:
SELECT page_touched FROM page ORDER BY page_touched DESC limit 1;
Permanent deletion ∞
Rob Church wrote on the mailing list (probably in 2005):
Undelete the pages; yes, undelete. Then nip into the page table and
find out the page id…delete that page’s row from the page table. Hop
over to the revisions table and delete all rows where rev_page is the
same as that page id. That’s a permanent deletion; the page never
existed.For the small touches, check that corresponding revisions are wiped
from the recent changes table, too.
Having all pages generate a TOC ∞
If you want to change the threshold for all pages on your wiki, you need to hack includes/Parser.php, function formatHeadings():
# if there are fewer than 4 headlines in the article, do not show TOC if( $numMatches < 4 ) { $doShowToc = false; }
Deleting old revisions ∞
The maintainance directory has a script:
php deleteOldRevisions.php --delete
Spoiler
Function: Error: 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' 13590, 13591, 4823, 6713, 10519, 4734, 6625, 10430, 12169, 111 (localhost) Backtrace: GlobalFunctions.php line 450 calls wfbacktrace() Database.php line 397 calls wfdebugdiebacktrace() Database.php line 347 calls databasemysql::reportqueryerror() purgeOldText.inc line 40 calls databasemysql::query() deleteOldRevisions.inc line 55 calls purgeredundanttext() deleteOldRevisions.php line 20 calls deleteoldrevisions() read_config_store open failure on /var/net-snmp/snmpapp.conf read_config_store open failure on /var/net-snmp/snmpapp.conf read_config_store open failure on /var/net-snmp/snmpapp.conf
(I don’t have access to view /var/net-snmp/)
MediaWiki 1.5.7
However, it seems to have worked.. so I’m not sure if I need to restore from backups or not.
AJAX typeahead search ∞
Add this to MediaWiki LocalSettings.php
$wgUseAjax = true;
using wget to fetch a page’s source ∞
(wget)
URL='http://example.com/index.php?title=PAGENAME&action=raw' wget $URL -q -O - > filename.ext
I think you know what can happen with this script. Collaborative programming with MediaWiki! =)
scary transclusion ∞
There is a feature to have one MediaWiki install mirror the content of another page. It was described on the mailing list.
2018-01-30 – I don’t know when this would have been..
Direct links (clickable images) ∞
Props to the Gentoo wiki.
Spoiler
<div style="position: relative; width: {{{width|30px}}}; height: {{{height|30px}}}; overflow: visible">
<div style="position: absolute; top: 0px; left: 0px; font-size: 100px; overflow: hidden; line-height: 100px; z-index: 3">[[{{{link|Sandbox}}}| ]]</div>
<div style="position: absolute; top: 0px; left: 0px; z-index: 2">[[Image:{{{image|help.jpg}}}|{{{width|30px}}}|{{{link|[[Sandbox]]}}}]]</div>
</div>
<noinclude>
My changes:
* default values.
* [[todo]] This should be further-customized to include defaults that suggest help.
* default is visible
</noinclude>
Usage:
{{Click || image=example.jpg | link=Main Page | width=100px | height=100px }} A direct link!


tidied up a little more