FAQ Database Discussion Community


What API does facebook use for displaying the full wikipedia articles?

facebook,mediawiki,wikipedia,wikipedia-api,mediawiki-api
I couldn't find any api that return the article in a usable html form. Most of them return extracts which have very poor HTML formatting which makes them useless for anything.

Where can I find the code that convert internal MediaWiki links into article URLs?

hyperlink,mediawiki,wikipedia,article
I need to replicate exactly, Wikipedia's behavior regarding the conversion of [[links]] in the page body to URLs that open the articles they refer to. The link syntax and its behavior (conversion) are described here. While that article only mentions a few very basic modifications being applied, I think that's...

Can a form insert preformatted text within an existing Mediawiki page?

forms,mediawiki,mediawiki-extensions
I want unskilled users to be able to make a personal entry in a "Member Lookup" page, which I've implemented as a table in standard Mediawiki markup. I have a large userbase, most of which is not skilled Mediawiki editors. They all have edit permissions, just not skill or interest....

Retrive first paragraph from Wikipedia in Chinese

mediawiki,wikipedia-api
I want to retrieve the first paragraph of Wikipedia in Chinese language. I found an API; http://en.wikipedia.org/w/api.php?action=query&prop=extracts&rawcontinue=1&format=xml&exintro=&titles=samsung but it returns data in English. How can I get data from this API in Chinese language?...

Wikipedia API - How to get all links from multiple pages?

mediawiki,wikipedia,wikipedia-api,mediawiki-api
I'm new to wiki api. I have read how to get all links from a specific page, and managed to do so, but in my case I need a list of links from many pages. And sending a request for each page is inefficient. This is the kind of request...

How to login using mediawiki's api, curl, and bash?

bash,curl,mediawiki
My understanding of the process: From mediawikis login manual https://www.mediawiki.org/wiki/API:Login When using MediaWiki's web service API, you will probably need your application or client to log in. This involves submitting a login query, constructing a cookie, and confirming the login by resubmitting the login request with the confirmation token returned....

Absolute positioning in MediaWiki

css,mediawiki
How to absolute position (i.e. relative to browser window) an element in a MediaWiki article with wikicode and css? What I need to do is put some icons in the empty space of the header area. For instance, in my movies wiki, in "Star Trek" articles I want to put...

texvc does not render latex math in Mediawiki

latex,mediawiki,mediawiki-extensions
I have the Math extension installed in my MediaWiki 1.19. After I updated Ubuntu Server from 12.04 to 14.04 something seems to have messed it up and it has stopped working. Basically I get the following error when I try to display anything between the <math> and </math> tags: Failed...

Pretty URLs aren't working after upgrade to Mediawiki 1.24.2

.htaccess,ubuntu,mediawiki
So I am moving a Mediawiki site of mine to a new server. The version 1.20.3 worked fine on the old server running Ubuntu 12.04. However, when I copied everything over to my new server running Ubuntu 14.04 it didn't. So after messing with it for a while I decided...

How to specify a default content in the text editor on MediaWiki page creation?

mediawiki,mediawiki-templates
On a MediaWiki, I would like that when someone creates a new page, the content of the text editor is automatically set to a certain value. For instance when one creates a new page called MyPage, the content of the text editor would be: Please modify this content and then...

Restore MediaWiki site from physical files (MySQL)

mysql,linux,debian,mediawiki
One of our servers crashed last week and it wouldn't boot. So I got a full copy of the whole file system, and restored a previous backup. Now it is up and running, but there is a problem: the most recent changes made to a MediaWiki site were lost (the...

Is it possible to continue numbering after inserting a table?

mediawiki
I want my list to show up as: 1. Step 1 2. Step 2: <table> 3. Step 3 but it shows up as: 1. Step 1 2. Step 2: <table> 1. Step 3 Code: # Step 1 # Step 2: :: {| ... |} # Step 3 Is it possible...

MediaWiki page edit causes “Load denied by X-Frame-Options: does not permit cross-origin framing”

dns,mediawiki,frames
I am running a MediaWiki on a VM, accessing it through http://12.34.56.78/wiki -- I was able to edit pages. Now I've redirected my domain http://foo.org to http://12.34.56.78/wiki http://foo.org/wiki does indeed find my wiki, but when I attempt to edit a page I get a blank page. Inspecting the console yields:...

Hand over parameters from a MediaWiki template to a included one

mediawiki,mediawiki-extensions,mediawiki-templates
I'm using the MediaWiki extension DynamicPageList (third-party) which can be used as a template: {{#dpl: |category=foo |notcategory=bar }} I try to use this template in one of my templates which uses more parameter e.g.: {{myTemplate |category=foo |notcategory=bar |mypara1=bla |mypara2=lala }} myTemplate looks like this: do something with mypara1 ... do...

How do I add Special:PrefixIndex/FULLPAGENAME to the toolbox in my local MediaWIki installation?

javascript,mediawiki
I would like a tool in the sidebar's "Tools" section that takes readers to Special:PrefixIndex/FULLPAGENAME where FULLPAGENAME is replaced with the current page's full name. For example, say I was on the page Module:Citation/CS1 then I would like a tool in the sidebar called Subpages that takes me to Special:PrefixIndex/Module:Citation/CS1....

Displaying edit count on MediaWiki

mediawiki,mediawiki-api,mediawiki-extensions
I would like to display number of edits / contribution on user page. Is there any way to do that? I tried to use link mentioned here: http://en.wikipedia.org/wiki/Help:User_contributions So if follow that, I got a URL something like this: http://ourdomain/api.php?action=query&list=users&ususers=MYUSERNAME&usprop=editcount And if I use it, it shows me a page...

Rendering of MediaWiki Infoboxes

mediawiki
I've been creating templates based on Infoboxes on my local wiki (i.e., installed MediaWiki via Bitnami) but it isn't being rendered properly. I was hoping for a infobox similar to this one I created on Wikia. instead I got Granted the 1st is in the monobook skin and 2nd is...

Can I set different colours for content contributed by different users in MediaWiki?

mediawiki
Is there a way of assigning default colours for content contributed by different users in MediaWiki? For example, I would like to have content contributed by user A green by default, by user B blue by default etc....

googlebot reading site in incorrect language

mediawiki,user-agent,googlebot
My site was hacked and the useragent is sending googlebot the incorrect page. It looks like it is reading it the wrong language as a result of the extra code: dir="ltr" lang="ja" xml:lang="ja"> <head> <meta http-equiv="Content-Type" http-equiv="content-type" content="text/html; charset=UTF-8" /> I can't find where the code is in the files....

All my mediawiki pages are blank after PHP upgrade

php,mediawiki
Server Team upgraded PHP version to latest 5.6.5. Now All pages are blank. Could you please guide me how to resolve this. MediaWiki Version: 1.20.2 Thanks!

Mediawiki: Error sending mail

php,email,mediawiki
I'm absolutely new to MediaWiki. I've installed it, set up smtp settings and trying to create a new user with sending him a password by email. But I'm getting the following error: Account creation error Error sending mail: Validation failed for: =?UTF-8?Q?=D0=92=D0=B8=D0=BA=D0=B8=20=D0=BC=D1=83=D0=B6=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D1=85=D1=80=D0=B8=D1=81=D1=82=D0=B8=D0=B0=D0=BD=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D1=81=D1=82=D0=B2=D0=B0=20"=D0=9F=D1=83=D1=82=D1=8C"?= My email settings in LocalSettings.php...

MediaWiki cant get LDAP authentication to work

linux,ldap,mediawiki
I am running out of ideas here. I cant get LDAP authentication to work on my network, i have a local machine (Linux Ubuntu 14 with mediawiki) Domain Name - XXXX Domain Controllers - OBI1.XXXX.local cg-p-dc-04.XXXX.local cg-p-dc-05.XXXX.local Here is my LocalSettings.php require_once "$IP/extensions/LdapAuthentication/LdapAuthentication.php"; $wgAuth = new LdapAuthenticationPlugin(); $wgLDAPDomainNames = array(...

Nesting templates as part of a table is mysteriously eating a word in MediaWiki

templates,mediawiki,mediawiki-templates
When I use templates as individual lines in a table, it mostly seems to work perfectly, except for one spot where it keeps eating the first word of the second column, and I don't know why. Background: I have a small MediaWiki, just large enough to need several navigation lists,...

Convert docx to mediawiki and preserve [[Image:]]

converter,mediawiki,docx,libreoffice,soffice
Currently, I'm trying to move a docx to a mediawiki file and preserve the proper filenames in the [[Image:]] tags. For some reason, the proper image file gets swallowed (ie, normally it'd be media/image4.jpg, but instead it's just empty). I've tried extracting the docx and looking at docx/word/_rels/document.xml.rels but I...

What kind of CSS is this?

php,mediawiki
I was looking at an old installation of mediawiki which is not rendering css properly the code in the Chrome Dev Tools is showing CSS like this {{{border-width|1}}}px solid {{{titleborder|{{{border|#ababab}}}}}} Not able to understand what is the pre-processor used and why its not working. Can someone hint to some direction....

MediaWiki 1.25 - show content for logged out users only

php,mediawiki
In my MediaWiki skin (Vector) I want to only show some content for logged out users. In the past I would do this with something like: <?php if( $wgUser->isAnon() ) { ?> <p>My content</p> <?php } ?> However, it appears that in MediaWiki 1.25 the $wgUser global has been deprecated....

Mediawiki custom namespaces id change

namespaces,mediawiki,identifier
I am currently working on an internal Mediawiki and we are using a lot of custom written extensions. Because we did no know better, defined custom namespaces for our own extensions and articles with an id that is smaller than 3000. For example: define('NS_bla', 1100); $wgExtraNamespaces[NS_bla] = "bla"; define('NS_bla_TALK', 1101);...

Mediawiki Call hook function from another file

php,function,hook,mediawiki
Hello I need to save some content to database in MediaWiki when a new page is created. So I added hook in my LocalSettings.php: $wgHooks['PageContentSaveComplete'][] ='assign_responsibility'; But I need to call the function assing_responsibility() from a extension php file Responsibility.php not LocalSettings. I am new at Mediawiki system and I...

wikipedia edit - how to “go to” the content of a subtitle?

mediawiki
In my wikipedia page, I have a subtitle called subtitleA. Before arriving at this point when reading, I have one sentence that has a link that jumps to the content of that subtitle. To be more clear, this is a simple illustration: To do this, you will need `this` (link...

Why use ImageMagick in CMS like MediaWiki instead of simply using browser methods?

imagemagick,mediawiki,graphicsmagick
Can somebody explain to me why I should possibly use ImageMagick (or the fork GraphicsMagick) in a CMS instead of simply displaying and sizing my images via CSS? The browser methods cannot fail and are automatically updated on client side, the ImageMagick-binary can fail on the server and I have...

How to not reveal a third party secret api key in MediaWiki

mediawiki,api-key,mediawiki-extensions
I've got an API key from themoviedb.org and I want to use it with the MediaWiki extension External Data. But if I put it as plain wikitext it will be in plain sight. Is there a simple way to add it as a custom variable in LocalSettings.php and then call...

How does Composer know what MediaWiki extensions to load?

composer-php,mediawiki,semantic-mediawiki
We've switched from using Semantic Bundle to install extensions by using Composer. Now we can skip, for some extensions, manually including entry points at the LocalSettings.php file (http://www.bn2vs.com/blog/2013/11/24/introduction-to-composer-for-mediawiki-developers). But how does MediaWiki know which extensions to load. Does it read composer.json?

MediaWiki SVG thumbnailing

svg,thumbnails,mediawiki
My Wiki has had repeated issues with thumbnailing. Using ImageMagick I received this thumbnailing result: When I changed $wgSVGConverter = 'librsvg' and (keeping in mind I installed librsvg using cygwin) $wgSVGConverterPath = 'C:\cygwin64\usr\include\librsvg-2.0\librsvg'; no thumbnailing occurred, e.g., ...

How does MediaWiki sort page links in category overviews?

php,mediawiki,category,wiki,alphabetical
The answer should be: alphabetically. Currently, I have a page starting with 'A' appearing in the 'S' section of the category overview page. Screenshot: http://i.stack.imgur.com/pKide.jpg I have a small Wiki running for my team: MediaWiki 1.22.2 PHP 5.3.29 (litespeed) MariaDB 5.5.40-MariaDB and this is the first time I have ever...