Hot answers tagged

12

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 ...


9

Add to LocalSettings.php: $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['read'] = false; But of course admin is able to edit pages.


9

Yes, you need to protect it so that it can only be edited by administrators: You can designate a page as a protected page by clicking the 'Protect page' tab ('protect' in the drop-down menu in Vector), and supplying a comment (a brief textual description of why you are protecting the page).


8

I've used MediaWiki as a CMS on quite a few occasions, though my goal has been to publish (i.e. allow anyone else to view and only editors access to write) content but restrict edit access. To lock down write privileges: $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['editpage'] = ...


7

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. ...


7

The Special:Version page lists all of the installed extensions for a MediaWiki instance. Also see http://noc.wikimedia.org/conf/ for example of real configuration employing all these extensions, though using it directly would be overkill.


6

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 ...


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 ...


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 ...


5

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 ...


5

You could use a webcrawler tool which will save the site as HTML files. All the links will be converted, so you can open the main page, say, and then click on links and get to all the site. There are a number of these tools available. I use wget, which is command line based and has thousands of options, so not very friendly. However it is quite powerful. ...


5

The easiest way to handle this situation (if you don't mind a nuke'n'pave) would be to export all wiki pages created or edited by your username, reinstall the wiki, and import the export file you'd generated. "Reinstall" in this context would mean: Export articles created by you (presumably logged in as the WikiSysop user or similar) Drop the MW database ...


5

I strongly suggest you run through the Wiki Choice Wizard over at WikiMatrix.org


4

Adding this to LocalSettings.php did the trick. It's probably better to not use unlimited, but pick sane defaults instead of "unlimited". $wgMaxShellMemory = unlimited; $wgMaxShellFileSize = unlimited;


4

http://en.wikibooks.org/wiki/Special:Version Shows you all the extensions that they are using


4

If you're able to install extensions on the site at all then you could try the one for Google Analytics at http://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration Otherwise, another solution might be to try a "web beacon". That's where you insert a resource from an external site into a page so you can track the hits for it when pages are ...


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

Yes, you can use the #switch function to do this. There are some examples on this article - generating dynamic content with mediawiki. The documentation on #switch is here: http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23switch


4

Solution {{#dpl:category=Backup|format=,*,[[%PAGE%]]\n,}}


4

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 ...


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

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.


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

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


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

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 ...



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