mediawiki-customization: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (some cleanup and additional reasoning)
m (Replace <entry-title> with {{DISPLAYTITLE:}})
 
(29 intermediate revisions by 6 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 is not thorough nor comprehensive documentation.
This page documents some of these customizations for informative purposes.  This documentation is neither thorough nor comprehensive.


== Customizations ==
== Customizations ==
* enable lowercase page names
* enable lowercase page names
* enabled hyphenated phrases for 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).
* 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 18: Line 27:


* '''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  [http://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_%28technical_restrictions%29#Lower_case_first_letter "The initial capital letter is due to technical restrictions."] nonsense on Wikipedia [http://en.wikipedia.org/wiki/Wikipedia_talk:Naming_conventions_(technical_restrictions)#Summary_of_lower_case_first_letter_issue is ridiculous]. It's software. Just fix it. More:
* '''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  [http://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_%28technical_restrictions%29#Lower_case_first_letter "The initial capital letter is due to technical restrictions."] nonsense on Wikipedia [http://en.wikipedia.org/wiki/Wikipedia_talk:Naming_conventions_(technical_restrictions)#Summary_of_lower_case_first_letter_issue is ridiculous]. It's software. Just fix it. More:
** all same case is easier to read (citation required)
** all same case is easier to read (citation required) (not accurate, Title Case is easier to read) --[[User:JeffMcNeill|JeffMcNeill]] 16:28, 25 Sep 2007 (PDT)
** all lowercase is easier to read than all uppercase (citation required)
** all lowercase is easier to read than all uppercase (citation required)
** all lowercase is easier to type (citation required)
** all lowercase is easier to type (citation required)
* '''hyphenated phrases are better than CamelCased phrases'''
* '''hyphenated-phrases are better than CamelCasedPhrases and underscored_phrases'''
** hyphenated phrases are easier to read (for humans, duh) than CamelCased 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).
** 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.
** 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. .
* '''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 ==
== How to ==
Line 30: 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 ==
==Related pages==
*The microformats MediaWiki customizations enable [[how-to-play]] and better [[naming-conventions]].
*[[mediawiki]]
*[[mediawiki-mark-up-issues]]
*[[to-do#Wiki_improvements]]
*[[wiki2]]
*[[admin-to-do]]


The microformats MediaWiki customizations enable [[how-to-play]] and better [[naming-conventions]].
== 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