Lowercase page names in Mediawiki

I am creating Mediawiki in here.

Everything is going well, but now I want to have some articles to document things that start with a lowercase letter, such as Unix commands: "man", "chmod", "ls", "iPod", etc. I don’t want them to display as Mediawiki tries to make all page titles and article titles begin with an uppercase letter.

Also, I do not want the searches to be case sensitive. I want to find "apple" to find "Apple" etc.

I believe that I have achieved case insensitive by following the instructions from the web page .

I think this is good, but I am a bit dismissive of what I need to do:

  • Change the page structure of the _pages database by changing the page title type to VARCHAR (255) and changing the sort sequence as utf-8 case-insensitive.

  • Adding a global function to globalFunctions.php.

  • Change php code in the wiki skin.

It seems like it should just be a php variable in LocalSettings.php

But it all works. I mean, I can go into the "apple" and he will find the article on "Apple" instead of prompting me to create a new article called "apple".

But then I noticed that the page names were still capitalized for things like a new article, such as an article about "chmod".

I went back to googling and I found a webpage that said that the Mediawiki global variable was used:

$wgAllowDisplayTitle = true;

and that this will allow me to use patterns such as:

{{DISPLAYTITLE:chmod}}

http://www.learnbymac.com/wiki/index.php?title=Chmod

It partially works. The title of the article is now “chmod”, but actually the title in the database is still “Chmod”, which will not be so bad, but when I move to the “Unix” category, all Unix commands will appear starting with an uppercase letter.

I read on the Mediawiki website that beginning a page title with a lowercase letter in any language is prohibited.

I would like my wikipedia to look like they are on my Mac, not case sensitive, but case sensitive.

I know that Mediawiki has to consider every language in the world, but I do not.

I would prefer not to change the structure of my Mediawiki database anymore, but perhaps this was required. I just noticed that the names of the pages not only on the category pages, but also in the title are incorrect when you edit the pages.

Here is a link to the category that lists the headers in the wrong case:

--- Edit ---

I get it. I believe that everything is in order now. I missed the following line in the Mediawiki configuration file called "LocalSettings.php :.

 # disable first-letter capitalization of page names $wgCapitalLinks = false; 

I know that I did it for the first time. I believe that there have been changes that were saved on my local file system instead of being saved by my text editor, via ftp, to my website.

+4
source share
1 answer

As you noted, setting $wgCapitalLinks = false; in LocalSettings.php will do the trick. If you already have pages on your wiki, you probably want to run the script support service CleanupCaps: http://www.mediawiki.org/wiki/Manual:CleanupCaps.php

For your second question: to keep your search case insensitive, you can use the TitleKey extension ( http://www.mediawiki.org/wiki/Extension:TitleKey ). It is stable and is used on many large wikis. There is also the option of connecting the Lucene serach engine if you want more control over the behavior ( http://www.mediawiki.org/wiki/Extension:MWSearch )

+2
source

Source: https://habr.com/ru/post/1491058/


All Articles