semantic-mediawiki

MediaWiki Special:MyPage/common.js not working

我的梦境 提交于 2019-12-11 18:38:22
问题 MediaWiki Version and LocalSettings.php MediaWiki 1.22.4 $wgAllowUserJs = true; $wgUseSiteJs = true; Browser Version FireFox 28.0 JavaScript Code $ gvim common.js function myFunction() { alert("Hello World!"); } var onClickAttribute = document.createAttribute("onclick"); onClickAttribute.value="myFunction()"; var button = document.createElement("button"); button.setAttributeNode(onClickAttribute); button.innerHTML = "Say hello"; if (document.URL === 'http://mywiki.com/w/index.php/User:Pjc

Semantic MediaWiki: How do I make a query for pages with intermediate relationships?

会有一股神秘感。 提交于 2019-12-11 10:19:57
问题 Suppose I would like to link several wiki pages in a "knowledge graph". Let's say, here is a quick list of geographic objects from bigger to smaller, where arrows denote a direct MediaWiki link: Continent:Europe ^__Country:Netherlands ^__City:Amsterdam ^__Venue:Heineken Music Hall The pages above have the following content: Continent:Europe {{#set: | self:name = Europe }} [[Category:Continents]] Country:Netherlands {{#set: | ref:continent = Continent:Europe | self:name = Netherlands }} [

Semantic mediawiki #ask query: Displaying nested properties on the same query

China☆狼群 提交于 2019-12-07 07:27:11
问题 I would like to display in the same query properties of a page which is related to the pages im querying for. Let's say I would like to query all the pages in the City category, which are located in Germany, and I want to display the title of the page, but also I want to display the surface data of Germany, for example. Something like this: {{#ask: [[Category:City]] [[location::Germany]] |?mainlabel |?Location.surface }} I know this wont work, but you can see what I want to achieve. 回答1: I'm

Semantic mediawiki #ask query: Displaying nested properties on the same query

孤街醉人 提交于 2019-12-05 18:42:40
I would like to display in the same query properties of a page which is related to the pages im querying for. Let's say I would like to query all the pages in the City category, which are located in Germany, and I want to display the title of the page, but also I want to display the surface data of Germany, for example. Something like this: {{#ask: [[Category:City]] [[location::Germany]] |?mainlabel |?Location.surface }} I know this wont work, but you can see what I want to achieve. I'm not sure if there's a way to nest queries directly inside other queries. The normal method of doing it is