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


7

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


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


6

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 my SQL database manager: show variables like 'socket' The only result was the following: /Applications/MAMP/tmp/mysql/mysql.sock So I changed the variable in LocalSettings.php as follows: $wgDBserver = &...


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


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

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

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


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

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


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

It's a PITA and unfortunately (unlike extensions or media files) there is no repository of canned templates. Templates load other templates which load others in turn, etc. Templates are there to sabotage the efforts of anyone who just wants to edit their own wiki, instead taking them over to the coder side. By the way Wikia has its own template repository, ...


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

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

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

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

I think there isn't (using off-shelf software) for the following reasons. Sql and git are very different storage systems by design. Sql is about storing lots of deeply interconnected data in a single big lump of a file. Thus allowing efficient indexing and searching. Git is about storing programming text in many small files with the unwritten assumption ...


3

MediaWiki has a storage abstraction layer that makes this technically possible (the linked page talks about using external databases but it's actually not limited to that; see the documentation of the ExternalStore class for details). You would have to write your own ExternalStoreMedium subclass. The wiki would still have an RDBMS backend, of course, but the ...


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

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


3

There are privileges which bureaucrats do not have by default, and it is possible to give those to them (or some other group or a specific user if you prefer), e.g. $wgGroupPermissions['bureaucrat'] += array_fill_keys( $wgAvailableRights, true ); See the manual for details. It won't help you, though. Submitting a page edit works the same way no matter ...


3

I asked a question in superuser and this answer was correct: MediaWiki:Vector.css is not a file on your filessytem. Its "just" a Wikipage. Just type "MediaWiki:Vector.css" in the searchbar and create this Wikipage. After this MediaWiki:Vector.css will be embedded in your css.


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