19

If you don't want to use the export-and-reinstall method suggested by danlefree, you might also find the Nuke extension useful. Once installed, visiting the special page Special:Nuke as an administrator gives you a form like this: There are also several built-in MediaWiki maintenance scripts that could be useful, including: cleanupSpam.php, which can ...


12

You can take the -pages-articles.xml.bz2 from the Wikimedia dumps site and process them with WikiTaxi (download in upper left corner). Wikitaxi Import tool will create a .taxi(around 15Gb for Wikipedia) file out of the .bz2 file. That file will be used by WikiTaxi program to search through articles. The experience is very similar to the browser experience. ...


8

Your example [http://example.com/image.jpg] is correct. You will need to enable this by setting $wgAllowExternalImages to true in your configuration file. The default is false. Optionally, you can set $wgAllowExternalImagesFrom to allow exceptions while $wgAllowExternalImages remains set to false. You can also use $wgEnableImageWhitelist to allow exceptions ...


6

Assuming you have the ParserFunctions extension, you can use the #if function, as documented on MediaWiki: This function evaluates a test string and determines whether or not it is empty. A test string containing only white space is considered to be empty. {{#if: test string | value if test string is not empty | value if test string is empty (or only white ...


5

Your question is unclear, and appears to be based on several misunderstandings of how the software works. Assuming I'm guessing correctly: You have a website running the MediaWiki software, and this site is not one of the ones operated by the Wikimedia Foundation. You have reasonably high privileges within the software, but no privileges outside the ...


5

You generally won't want these excess pages in your sitemap. The sitemap should only contain links to URLs you actually indexed & listed by search engines. If you have property/form URLs in your sitemap, you've probably used a 3rd party Sitemap Generator. These just crawl all links on your website indescriminately, whereas something like https://www....


5

The following picks up on a fresh working LAMP installation under Red Hat 7 or clone (CentOS 7, Scientific Linux 7, Orcale 7, etc). Set Selinux to permissive for the installation. setenforce 0 First get the Mediawiki version you want from https://releases.wikimedia.org/mediawiki/ , at time of writing latest is https://releases.wikimedia.org/mediawiki/1.27/...


5

When you create an Adsense ad, you can select it to be either responsive or fixed size. If it's a fixed size, you'll get the sizing thrown into the ad as part of the styling: style="display:inline-block;width:728px;height:90x" However, if you choose a responsive size, it will display something like this: style="display:block" data-ad-format="auto" ...


4

You can do that by editing (or creating, if it doesn't exist) the page Project:Book sources (or a translated version of that name, if the language of your wiki is not English). In the source of that page, MAGICNUMBER will be replaced by the ISBN. You can look at the version of this page on English Wikipedia for inspiration.


4

Another way is: Go to Special:SpecialPages of a given wiki, and check if it has Special:PopularPages; example: http://en.wikipedia.org/wiki/Special:SpecialPages - doesn't have it http://www.alsa-project.org/main/index.php/Special:SpecialPages - has it If you have Special:PopularPages, then you can use that to list page views (counts); but not if it isn't ...


4

Note: Since MediaWiki 1.6, the MediaWiki core has a Google site map generator... It is a command-line utility, and it is located at maintenance/generateSitemap.php in your MediaWiki directory. The command line is "php generateSitemap.php sitename" and is run from the maintenance directory at the server's command line interface. See Manual:...


4

When you have no shell access use the WikiTeam DumpGenerator.py script. This can do a XML dump of the current pages or with all their history and also does a dump of all available images along with their descriptions.


4

(MediaWiki 1.31.0, edited 2020) Add to LocalSettings.php: $wgHooks['AuthChangeFormFields'][] = function ($requests, $fieldInfo, &$formDescriptor, $action) { $formDescriptor['rememberMe'] = ['type' => 'check', 'default' => true]; return true; }; See Hooks/AuthChangeFormFields and HTMLForm.


4

You can use the API to export all the text content, with something like action=query&generator=allpages&export. Files you'll have to scrape via some script, such as pywikibot. You can see what extensions are installed via Special:Version if you want to set up an identical wiki; some of the configuration settings are available via the siteinfo API, ...


4

I seem to have resolved this by explicitly adding the socket to the $wgDBserver variable in LocalSettings.php. To get the socket path, I ran this query in Sequel Pro: show variables like 'socket' The only result was the following: /Applications/MAMP/tmp/mysql/mysql.sock So I changed the variable as follows: $wgDBserver = "localhost:/Applications/MAMP/...


3

You can have clean URLs with the following step. Install the wiki into http://localhost/w and NOT into http://localhost/wiki then Modify the following in LocalSettings.php after you have set it up: $wgArticlePath = "/wiki/$1"; In the ROOT directory place the following .htaccess file: RewriteEngine on ## uncomment this rule if you want to redirect to ...


3

Fix Method 1 Update your MediaWiki to the latest version and this resolves this problem. Fix Method 2 If you prefer to use an outdated version then this will fix this problem. Edit includes/ProxyTools.php, after line 70 wfGetIP(). After static $ip: { $ip = "10.10.10.10"; return $ip; } Change 10.10.10.10 to the same IP address of your external internet ...


3

The characters that MediaWiki disallows in URLs need to be percent-encoded. So, for example, your link should be written as http://chemapps.stolaf.edu/jmol/jmol.php?model=C%5BC@H%5D(N)CC1=CC=CC=C1 (%5B and %5D are the codes for [ and ]).


3

The workarounds: Explicitly precede the argument with the (numerical) parameter name in the call to the template, like this: {{MyUrl|1=http://www.example.com/abstract.cfm?uri=aa-123456}} Another solution: one can create a symbolic name for the parameter. Then the template may look something like this: See here: [{{{link}}} (link)] And the call like this:...


3

Configure the wiki job queue. Link colour is not updated immediately across all of your wiki to save on resources.


3

As Stephen Ostermiller says, in this case you want to add "conf" to the line beginning with "text/plain" in: includes/mime.types In other cases though it may not be this simple. When you upload a file, mediawiki executes the PHP function mime_content_type("my_uploaded.wth"); which takes the result and looks it up in includes/mime.types. If you find ...


3

Yes. Use vardefine. #vardefine {{#vardefine:variablename|specifiedvalue}} https://www.mediawiki.org/wiki/Extension:Variables


3

Actually, [http://example.com/image.jpg] is not correct. The correct way to insert an external image into a wikimedia page is http://example.com/image.jpg eg. no square brackets. Of course, make sure that you have added $wgAllowExternalImages = true to your configuration file to enable display of the image, as wikimedia defaults to not allowing externally ...


3

Use wgWhitelistRead in your LocalSettings.php configuration file.


3

You can use the External Data extension for MediaWiki. This will pull data as CSV, GFF, JSON or XML, or LDAP server or database, which can then be displayed on the page. The External Data extension allows MediaWiki pages to retrieve, filter, and format structured data from one or more sources. These sources can include external URLs, regular wiki pages, ...


3

Not by default. You can find the list of permissions here, and the permissions each user group on a wiki has at Special:ListGroupRights. There is editmyusercss/editmyuserjs which allows users to edit user subpages ending in .css/.js, but probably even that requires the normal edit right. It would be pretty simple to write an extension granting that right, ...


3

It stops the parser from eating whitespace at the beginning of the template parameter. The * needs to be at the beginning of the line (ie. preceded by a newline) to be turned into a list.


3

You can add * {{SITENAME}} to MediaWiki:Sidebar and use some script to replicate that, or use the AddMessages extension or the MessagesPreLoad hook to set the text from code.


3

The other answer is incorrect. This can be done using the line option: # First # Second <source line lang="CSharp">Some Multi Line C Sharp Code </source> # Third Look, the output is correct: https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=1915324


3

Is this not what you are looking for? https://www.mediawiki.org/wiki/Extension:CookiePolicy?


Only top voted, non community-wiki answers of a minimum length are eligible