8
votes
What is a "data-ad-slot" for Google Adsense and why is inline styling required?
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-...
6
votes
Accepted
Why can't update.php connect to my database when my site connects to it just fine?
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 '...
5
votes
File system permission for MediaWiki?
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 ...
5
votes
Accepted
How to use Wikipedia templates on an outside MediaWiki?
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 ...
4
votes
Accepted
Clone an abandoned MediaWiki site
Backing up a wiki without server shell access, requires Python v2 (v3 didn't yet work last time I did this).
From the command-line run the the WikiTeam Python script dumpgenerator.py to get an XML ...
4
votes
Clone an abandoned MediaWiki site
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 ...
4
votes
How to set the keep me logged in box to true in Mediawiki Special:UserLogin
(MediaWiki 1.31.0, edited 2020) Add to LocalSettings.php:
$wgHooks['AuthChangeFormFields'][] = function ($requests, $fieldInfo, &$formDescriptor, $action) {
$formDescriptor['rememberMe'] = ['...
4
votes
How do you hot link an external image from a Media Wiki site?
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 ...
3
votes
Accepted
Where is "MediaWiki:Vector.css" of my MediaWiki
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 ...
3
votes
Accepted
How to log-in with more rights than Admin or Bureaucrat?
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'] +...
3
votes
How do i edit Login Required Page
After searching for this answer.
I finally found a Topic on MediaWiki Project:Support desk called
Editing "Login Required" Page.
It told me to
Try editing the page mediawiki:loginreqpagetext on your ...
3
votes
MediaWiki: How to find all web pages with a certain HTML tag?
Take a backup first.
Using phpMyAdmin (or similar) you can run an SQL query using REPLACE to update the tags in place. The 'text' table holds the pages for MediaWiki in the 'old_text' field.
First ...
3
votes
Accepted
<pre> tag generates a blue box behind the pre-formatted text and a table around it on the printable version. How to disable this?
whether or not there is a way to edit this, or change the table in any way or to turn this off when printable=yes?
Yes to all question parts.
The question "how" wasn't there, correct?
Nevertheless:
...
3
votes
When MediaWiki has symbolic links to contents then LocalSettings.php is not found
Since the marked correct answer means copying ~27.5mb as of MediaWiki 1.38.1, which largely defeats the purpose of using symlinks, I found an alternative solution that avoids copying anything extra.
...
3
votes
Accepted
ServerAlias directive not working on Apache 2.4.49
It looks like perhaps the <VirtualHost> containers are defined/loaded in the wrong order and requests for XX.mediawiki.wordpressinstance.example are seemingly matching the wrong vHost.
The first ...
3
votes
Suggestions for tracking a MediaWiki wiki with Git version control?
It's a good impulse, what you're trying to do. You just need to scale back your expectations about what all gets tracked by Git.
Because LocalSettings.php is the main thing, you definitely want to ...
3
votes
Accepted
Is it possible to use the "Pages in category..." list in mediawiki in a template without an extension?
If you wanted a list of subpages without needing to install an extension, yes, you can do that with Special:PrefixIndex.
As for lists of pages in a category, I thought maybe Special:CategoryTree, but ...
2
votes
How to set the keep me logged in box to true in Mediawiki Special:UserLogin
We wanted to change the "Keep me logged in" (in German it's "Angemeldet bleiben") default as well, but overwriting the complete array $formDescriptor['rememberMe'] also removed the ...
2
votes
How to set the keep me logged in box to true in Mediawiki Special:UserLogin
The above answer will now throw fatal exception on Special:CreateAccount if anybody attempts account creation. You have to define the HTML form class. Something like this:
// Check the password "...
2
votes
Accepted
MediaWiki fails to show Ambox
Contrarily to what I originally thought, the AMBox template is not part of a standard MediaWiki installation.
To make it works it is necessary to:
If not already installed, install Scribunto ...
2
votes
Accepted
Legal considerations regarding hosting a MediaWiki site
Any considerations should depend on your business, business model, website functionality, and so on.
Keep in mind that as long as you collect personal data from users through your website, a Privacy ...
2
votes
Clone an abandoned MediaWiki site
Media-Wiki pages can be exported in a special XML format to upload import into another MediaWiki installation
You can use 'Special:Export' usually in most standard Mediawiki.
At lease you can get all ...
2
votes
Accepted
How do you deal with mass spam on MediaWiki?
If configured properly, your proxy will add the IP address of the user to the X-Forwarded-For header of the backend request. If $wgSquidServers (or $wgSquidServersNoPurge) is properly set, MediaWiki ...
2
votes
Accepted
How do I promote a user automatically in Mediawiki and create a log of those promotions?
Use $wgAutopromote (or $wgAutopromoteOnce if you want to be able to manually remove people from the group). It would look something like this:
$wgAutopromote = [
'util' => [ APCOND_EDITCOUNT, ...
2
votes
How can I allow sysops and specific users to hide spam articles in MediaWiki?
Top right side, "More" drop down menu, you can delete the spam pages.
2
votes
Accepted
MediaWiki: Implement HotCat
The install instructions are given at Mediawiki.org, Extension:Gadgets
On your wiki you'll need to edit three pages, (except the format is a little messed up below):
MediaWiki:Gadgets-definition
...
2
votes
Accepted
How to know what are all the MediaWiki web pages without categories?
It's at Special:UncategorizedPages. There are also a couple other Special:Uncategorized* pages for other namespaces (images, categories etc).
2
votes
Accepted
Can it be destructive to disallow all MediaWiki:Special pages in robots.txt?
MediaWiki.org includes this in their robots.txt file:
Disallow: /wiki/Special:
Disallow: /wiki/Spezial:
Disallow: /wiki/Spesial:
Disallow: /wiki/Special%3A
Disallow: /wiki/Spezial%3A
Disallow: /wiki/...
2
votes
Delete all the pages on mediawiki
Documentation is your friend.
purgeList.php:
purgeList.php file is a maintenance script to send purge requests for listed pages to squids.
deleteArchivedRevisions.php:
deleteArchivedRevisions....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mediawiki × 280wiki × 25
php × 24
template × 11
apache × 8
javascript × 8
html × 7
css × 7
images × 7
spam × 7
mysql × 7
authentication × 7
sitemap × 6
permissions × 6
htaccess × 5
configuration × 5
seo × 4
web-crawlers × 4
google-adsense × 4
robots.txt × 4
mod-rewrite × 4
nginx × 4
backups × 4
git × 4
redirects × 3