mediawiki-customization: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
m (Replace <entry-title> with {{DISPLAYTITLE:}})
 
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<h1>MediaWiki customization</h1>
{{DISPLAYTITLE:MediaWiki customization}}


by [http://tantek.com/ Tantek]
by [http://tantek.com/ Tantek]


The MediaWiki installation at microformats.org/wiki has been customized in a number of ways.
The [[MediaWiki]] installation at microformats.org/wiki has been customized in a number of ways.


This page documents some of these customizations for informative purposes.  This documentation is neither thorough nor comprehensive.
This page documents some of these customizations for informative purposes.  This documentation is neither thorough nor comprehensive.
Line 9: Line 9:
== Customizations ==
== Customizations ==
* enable lowercase page names
* enable lowercase page names
** <code>$wgCapitalLinks = false;</code> in LocalSettings.php
* enable hyphenated phrases for page names (rather than the MediaWiki default of converting dashes and spaces to underscores).
* enable hyphenated phrases for page names (rather than the MediaWiki default of converting dashes and spaces to underscores).
* hide MediaWiki "Talk" links
* hide MediaWiki "Talk" links
* enable external image embedding
** <code>[http://www.mediawiki.org/wiki/Manual:$wgAllowExternalImages $wgAllowExternalImages] = true;</code>  in LocalSettings.php
* Various MediaWiki plugins:
** OverrideEntryTitle, SemanticHTML, SyntaxHighlight_GeSHi, ConfirmEdit
* Customized MediaWiki skin (see also [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Skinning Mediawiki Manual:Skinning])
** supports some [[hAtom]] "hentry" etc.
** (to be documented more thoroughly, which skin files to edit, in which dirs)
* Redirect www.microformats.* to canonical microformats.org URLs.
* ... more that I'm sure I'm forgetting at the moment.
* ... more that I'm sure I'm forgetting at the moment.


Line 32: Line 41:


[[to-do]]: To be filled in. ;)
[[to-do]]: To be filled in. ;)
Installs:
* Install the following extensions:
** '''[https://github.com/microformats/mediawiki-entry-title-override OverrideEntryTitle]'''
** '''Recaptcha''' to prevent spam bot account creation. [http://jeffmcneill.com/2007/10/04/blocking-spambots-with-akismet-and-recaptcha/ Instructions available here].
** '''[https://github.com/BenWard/mediawiki-semantic-html SemanticHTML]'''
** '''[http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi SyntaxHighlight_GeSHi]'''
** '''[http://www.mediawiki.org/wiki/Extension:ConfirmEdit ConfirmEdit]'''
=== Upgrade MediaWiki ===
* Update server's PHP version to ''at least'' 5.6, preferably 7+
* Run MediaWiki core upgrade
* Switch skin to [https://www.mediawiki.org/wiki/Skin:Vector Vector]
* Install OverrideEntryTitle
* Install ConfirmEdit with [https://www.mediawiki.org/wiki/Extension:ConfirmEdit#ReCaptcha_(NoCaptcha) ReCaptcha (NoCaptcha)] support (requires MediaWiki 1.26+)
* Remove SyntaxHighlight_GeSHi. Instead use MediaWiki's built-in [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight] (MediaWiki 1.21+)
* (Probably) Remove SemanticHTML
** Modern MediaWiki versions support all the elements listed by this plugin except '''acronym''' [https://en.wikipedia.org/wiki/Help:HTML_in_wikitext#Formatting]
=== Old (previous) installs: ===
* [http://www.mediawiki.org/wiki/Extension:EnableAbbrTags EnableAbbrTags]
* [http://www.mediawiki.org/wiki/Extension:ExtendAnchorTags ExtendAnchorTags]
** both for POSH/Microformats support in MediaWiki, but superceded by '''SemanticHTML''' (see above).


==Related pages==
==Related pages==
*The microformats MediaWiki customizations enable [[how-to-play]] and better [[naming-conventions]].
*The microformats MediaWiki customizations enable [[how-to-play]] and better [[naming-conventions]].
*[[mediawiki]]
*[[mediawiki-mark-up-issues]]
*[[mediawiki-mark-up-issues]]
*[[to-do#Wiki_improvements]]
*[[to-do#Wiki_improvements]]
*[[wiki2]]
*[[admin-to-do]]
== See Also ==
* [http://wiki.whatwg.org/wiki/Special:Version WHATWG MediaWiki customizations]

Latest revision as of 16:29, 18 July 2020


by Tantek

The MediaWiki installation at microformats.org/wiki has been customized in a number of ways.

This page documents some of these customizations for informative purposes. This documentation is neither thorough nor comprehensive.

Customizations

  • enable lowercase page names
    • $wgCapitalLinks = false; in LocalSettings.php
  • enable hyphenated phrases for page names (rather than the MediaWiki default of converting dashes and spaces to underscores).
  • hide MediaWiki "Talk" links
  • enable external image embedding
  • Various MediaWiki plugins:
    • OverrideEntryTitle, SemanticHTML, SyntaxHighlight_GeSHi, ConfirmEdit
  • Customized MediaWiki skin (see also Mediawiki Manual:Skinning)
    • supports some hAtom "hentry" etc.
    • (to be documented more thoroughly, which skin files to edit, in which dirs)
  • Redirect www.microformats.* to canonical microformats.org URLs.
  • ... more that I'm sure I'm forgetting at the moment.

Goals and motivations

I'm responsible for pushing for nearly all of the specific MediaWiki customizations on the microformats wiki and thus I figured I should capture at least some of the reasoning in the hopes that perhaps others may find it useful. Tantek

  • lowercase URLs are better. MediaWiki has an annoying tendency of capitalizing article titles, which, though may be stylistically proper (in the English writing style meaning of stylistic) for proper nouns, is incorrect for common terms (which a lot of microformats pages are). Oh and the whole "The initial capital letter is due to technical restrictions." nonsense on Wikipedia is ridiculous. It's software. Just fix it. More:
    • all same case is easier to read (citation required) (not accurate, Title Case is easier to read) --JeffMcNeill 16:28, 25 Sep 2007 (PDT)
    • all lowercase is easier to read than all uppercase (citation required)
    • all lowercase is easier to type (citation required)
  • hyphenated-phrases are better than CamelCasedPhrases and underscored_phrases
    • hyphenated phrases are easier to read (for humans, duh) than CamelCased phrases and underscored_phrases. CamelCasing is a programmer convention that should have NEVER made its way into the textual user-interface (which URLs are a part of). Others have made this deliberate fix as well, i.e. CSS property/value names like "border-left" in contrast to DOM property names like "onClick". I know this was a deliberate decision by either Bert Bos or Håkon Wium Lie or perhaps both (citation needed). Underscored_phrases are present far less often in normal average English prose and thus slower to read.
    • hyphenated phrases are better indexed (SEO) than CamelCased phrases and underscored_phrases. Search engines typically break apart hyphenated phrases into their component words and index them separately and together, whereas the same cannot be said for CamelCased or underscored_phrases.
  • Talk pages are lame and "one more inbox to check". Talk pages are lame (e.g. the structure/threading is poor) and we don't need yet another discussion area (in addition to IRC, mailing-lists) Eliminating them from the default user interface was the simplest way to effectively eliminate their usage. Invisible talk pages = nearly no one uses them. And one fewer link cluttering the default UI is always nice.
  • Would it be possible to have the customization for all lowercase also be applied to usernames? That would be nice. Love the customizations, btw.

How to

Documentation on how to modify a MediaWiki install to get these customizations.

to-do: To be filled in. ;) Installs:

Upgrade MediaWiki

  • Update server's PHP version to at least 5.6, preferably 7+
  • Run MediaWiki core upgrade
  • Switch skin to Vector
  • Install OverrideEntryTitle
  • Install ConfirmEdit with ReCaptcha (NoCaptcha) support (requires MediaWiki 1.26+)
  • Remove SyntaxHighlight_GeSHi. Instead use MediaWiki's built-in SyntaxHighlight (MediaWiki 1.21+)
  • (Probably) Remove SemanticHTML
    • Modern MediaWiki versions support all the elements listed by this plugin except acronym [1]

Old (previous) installs:

Related pages

See Also