mediawiki

Differency normal characters and half characters on keydown

不想你离开。 提交于 2019-12-01 10:57:25
We forked experimental Mediawiki VisualEditor. This WYSIWYM editor work with a hidden textarea and a representation of the content in DOM. When you focus the view, the focus is given to the textarea, and the view listen to keydown event to add each typed characters to the content, then empty the textarea's value. The problem occurs with half characters on Mac OS X only. If you type ^or ¨ or any characters which need a second character to be printed, keydown event is fired. So, when user want a 'ê', he types '^'. View get the textarea value ('^') and clean the textarea value. Then, the user

How to approve new articles and edits in Mediawiki?

旧时模样 提交于 2019-12-01 06:15:54
When users create or edit articles I want to approve them first and then publish them. How can I achieve that or What extension make this possible? Try the FlaggedRevs extension. It adds a status to each article, the status can change when the article is edited (based on the permissions of the editor), and certain user groups can change the status by hand. You can use the status to hide the article from readers or show them the last approved state. The extension is used in several Wikimedia projects so it is reliably maintained. Its main disadvantage is that it is very flexible and has way

Mass-upload many text files to MediaWiki

丶灬走出姿态 提交于 2019-12-01 05:40:32
I have many text files that I want to upload to a wiki running MediaWiki. I don't even know if this is really possible, but I want to give it a shot. Each text file's name will be the title of the wiki page. One wiki page for one file. I want to upload all text files from the same folder as the program is in. Perhaps asking you to code it all is asking too much, so could you tell me at least which language I should look for to give it a shot? What you probably want is a bot to create the articles for you using the MediaWiki API . Probably the best known bot framework is pywikipedia for Python,

Adding CSS or JS file to MediaWiki?

大兔子大兔子 提交于 2019-12-01 05:19:17
I've been following some tutorials at mediawiki.org but I didn't make it. I need to add a new CSS or JS code to be available in all my wiki (basically be cause I need to add some div tags). Can you guys help me? Appreciate that. You can edit the CSS or JS files used by your wiki at the page names: MediaWiki:Common.css MediaWiki:Common.js For instance, here is the Common.css used by Wikipedia . There are also similar pages used for specific themes. For instance, if your wiki is using the Vector theme, you can place code specific to that theme at: MediaWiki:Vector.css MediaWiki:Vector.js Editing

How to approve new articles and edits in Mediawiki?

吃可爱长大的小学妹 提交于 2019-12-01 04:18:45
问题 When users create or edit articles I want to approve them first and then publish them. How can I achieve that or What extension make this possible? 回答1: Try the FlaggedRevs extension. It adds a status to each article, the status can change when the article is edited (based on the permissions of the editor), and certain user groups can change the status by hand. You can use the status to hide the article from readers or show them the last approved state. The extension is used in several

Mass-upload many text files to MediaWiki

巧了我就是萌 提交于 2019-12-01 03:51:31
问题 I have many text files that I want to upload to a wiki running MediaWiki. I don't even know if this is really possible, but I want to give it a shot. Each text file's name will be the title of the wiki page. One wiki page for one file. I want to upload all text files from the same folder as the program is in. Perhaps asking you to code it all is asking too much, so could you tell me at least which language I should look for to give it a shot? 回答1: What you probably want is a bot to create the

Change all website links to affiliate links automatically

雨燕双飞 提交于 2019-12-01 00:18:42
I would like to be able to automatically change links into affiliate links automatically on my MediaWiki installation. This would help to reduce the amount of time managing links in case the code needs to be changed in the future. This is the setup of my GOG.com affiliate scheme: I need to append this key to the end of every GOG.com link: ?pp=708a77db476d737e54b8bf4663fc79b346d696d2 gog.com/en/gamecard/baldurs_gate_the_original_saga/?pp=708a77db476d737e54b8bf4663fc79b346d696d2 Is it possible for a piece of code, like Javascript, to intercept all links (like http://www.gog.com/en/gamecard

How to do an accent and case-insensitive search in MediaWiki database?

你离开我真会死。 提交于 2019-11-30 21:23:57
Let's pretend that I have these page titles in my wiki (MediaWiki 1.19.4): SOMETHIng Sómethìng SomêthÏng SÒmetHínG If a user searches something I want that all 4 pages are returned as the result. At the moment the only thing I could think of is this query (MySQL Percona 5.5.30-30.2): SELECT page_title FROM page WHERE page_title LIKE '%something%' COLLATE utf8_general_ci Which only returns SOMETHIng . I must be on the right path, because if I search sóméthíng OR SÓMÉTHÍNG , I get SOMETHIng as the result. How could I modify the query so I get the other results as expected? Performance is not

Get all Wikipedia Infobox Templates and all Pages using them

旧巷老猫 提交于 2019-11-30 12:43:22
Given a Wikipedia page like Wikipedia: Stack Overflow there are often Infoboxes (mostly on the right hand at the top of the page). Example screenshot: DBPedia lists all these attributes as RDF triples. You can see the example at DBPedia: Stack Overflow . There you see the property dbpprop:wikiPageUsesTemplate with the value dbpedia:Template:Infobox_website which is interesting. I want to know which Wikipedia pages use this template. How can i do that and list all pages which use the Infobox_website template? Preferably with a SPARQL query but i am open to other easy solutions. Next thing is a

Exporting and importing images in MediaWiki

蓝咒 提交于 2019-11-30 09:29:13
How do I export and import images from and into a MediaWiki? There is no automatic way to export images like you export pages, you have to right click on them, and choose "save image". To get the history of the Image page, use the Special:Export page. To import images use the Special:Upload page on your wiki. If you have lots of them, you can use the Import Images script. Note: you generally have to be in the sysop group to upload images. Peter Krauss Terminal solutions MediaWiki administrator, at server's terminal, can perform maintenance tasks using the Maintenance scripts framework . New