mediawiki

How to use correct lang parameter?

十年热恋 提交于 2019-12-11 07:46:06
问题 I have a fresh Mediawiki installed into fresh UBUNTU 18 LTS... The ''SyntaxHighlight'' extension not works for Unix shell, lang="sh" , lang="shell" , lang="bash" , ... no one is working. It is not at #Supported_languages, and there are no clues about how to install "Other markup". At mediawiki.org/list there are no clues. So, how to solve the problem? It is a config, env or syntax problem? NOTES AND TESTS Notes. It is a corporative Wiki, no way to offer public URL... But it is a fresh,

Access restriction on MediaWiki: make pages private until approved

无人久伴 提交于 2019-12-11 07:08:52
问题 I am stuck over an access right situation, What I Want is: I have users creating articles/pages on MediaWiki, I have restricted it over registered/autoconfirmed users to only, But now the requirement is, that, Only an article can be displayed to anyone other than , creator or sysop only after the sysop approves that page/article. till then only the creator or sysop can edit that article. I have tried FlaggedRevs extension, and several other small restrictions, but couldn't get exactly what I

Convert SQL dump to JSON?

▼魔方 西西 提交于 2019-12-11 05:55:52
问题 I have a SQL dump from MediaWiki and I want to export it to JSON - I've tried different ways but I can't seem to find any solution. The sql-file looks like this: DROP TABLE IF EXISTS `geo_tags`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `geo_tags` ( `gt_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `gt_page_id` int(10) unsigned NOT NULL, `gt_globe` varbinary(32) NOT NULL, `gt_primary` tinyint(1) NOT NULL, `gt_lat`

Open-source parser code for Mediawiki markup [closed]

给你一囗甜甜゛ 提交于 2019-12-11 04:16:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm interested in selectively parsing Mediawiki XML markup to generate a customized HTML page that's some subset of the HTML produced by the actual PHP Mediawiki render engine. I want it for BzReader, an offline Mediawiki compressed dump reader written in C#. So a C# parser would be ideal, but any good code

LocalSettings.php not readable even if I set permission to 777

亡梦爱人 提交于 2019-12-11 04:00:26
问题 I'm on a freshly installed fedora 21. I am using mediawiki 1.24.1 and created the LocalSettings.php file through the installation page. I have also chown -R apache:apache the mediawiki folder. However, when I try to open the actual wiki the page says 'LocalSettings.php not readable' even if I set the permission of LocalSettings.php to 777 回答1: I was having the same issue and resolved this by running the following command: sudo restorecon -r /var/www/wiki/ It seems like SELinux was blocking us

LDAP: filter multiple UIDs

三世轮回 提交于 2019-12-11 03:54:40
问题 I am trying to set up mediawiki for a team and would like to LDAP authenticate only a set of users. I am aware I could come up with a group LDAP authentication. But is there a shortcut to filter only a set of uids to authenticate. 回答1: The LDAP search filter you could use is: (|(uid=a)(uid=b)(uid=c)(uid=...)) But as noted in the comments, a group is much easier and more maintainable. However if you cannot use a group, consider using an attribute of the users, like description , resulting in

How to delete old MediaWiki revisions when deleteOldRevisions run out of memory

走远了吗. 提交于 2019-12-11 03:35:30
问题 is there a possibilty to delete revisions , when the maintenance skript deleteOldRevisions runs out of memory (tried to allocate more than 2 GB under 32bit). I not even get the list of the ids to delete it step by step. Maybe directly using SQL? I tried/read already https://www.mediawiki.org/wiki/Manual:Reduce_size_of_the_database and also Use SQL to delete old MediaWiki revisions without shell access? 回答1: Mmm, yeah... after taking a peek at that script, I'm not surprised it fails. It really

Where to call addModules()?

旧巷老猫 提交于 2019-12-11 03:02:36
问题 I would like to add some scripts and styles to all my wiki pages. So I have create the file /extensions/MyExtension/MyExtension.php and I put a following array like this: $wgResourceModules['ext.MyExtension.foo'] = array( 'scripts' => 'modules/ext.MyExtension.foo.js', 'styles' => array('modules/ext.MyExtension.foo.css','modules/ext.MyExtension.bar.css'), 'localBasePath' => __DIR__, 'remoteExtPath' => 'MyExtension', ); But in the documentation they say that I have to call $this->getOutput()-

Programatically determining the URL of a MediaWiki image

旧城冷巷雨未停 提交于 2019-12-11 02:24:38
问题 I'm trying to download images from specific MediaWiki pages (Or just specific images) using a PHP script. I can run a query through the api, by retrieving the page at the following URL .../w/action=query&prop=images&titles=Abakanskiy and get a response <?xml version="1.0"?> <api> <query> <pages> <page pageid="260" ns="0" title="Abakanskiy"> <images> <im ns="6" title="File:Abakanskiy.jpg" /> </images> </page> </pages> </query> </api> So far, so good. Now, no matter what I've done with the

Azure websites & MediaWiki: how to enable emails sending

▼魔方 西西 提交于 2019-12-11 01:28:06
问题 for example, when user creates an account, resets password etc. First step is to set mail server credentials in LocalSettings.php file, as per this document: http://www.mediawiki.org/wiki/Manual_talk:$wgSMTP#Example_using_Google_Mail But after you do this, you will get "PEAR mail package is not installed" error message. How to solve this? 回答1: Turns out it's relatively simple: Make sure your mail server credentials are correct FTP to root folder and rename index.php into index.php.old -