Extension talk:Semantic MediaWiki
From MediaWiki.org
[edit] Creating a SemanticForm and using tags
Hi guys hope you can help. If I can get this working, this will be a MAJOR thing for us :>)
Example:
Lets say I have an extension called NewTaskTag, which lets you insert a <NewTaskTag> into a wiki page, then you manually insert parameters as follows.. <NewTaskTag> Task = This task completed at.. Time = 6pm Priority = Severe Updated by = </NewTaskTag> <NewTaskTag> Task = Time = Priority = Updated by = </NewTaskTag> The extension then renders the html into a table like format. Because this is a manual job, I wanted to make it easier to do this. So, Ive installed Semantic Mediawiki along with SemanticForms. These are great, but I wanted to know if you could use a form to do the above instead of using the normal edit option with Mediawiki. The problem I see is how will the form know how to interpret and pass the entered bits/eg. the fields to the extension, and how would you say, in a form, place a filed to say to use <NewTaskTag>? To further clarify what Im trying to say is the following. If I want to use the <NewTaskTag> in a wiki page, I just go to a new page, click on Edit, and enter the following: <NewTaskTag> Task = Time = Priority = Updated by = </NewTaskTag> <NewTaskTag> Task = Time = Priority = Updated by = </NewTaskTag> I then complete each line, eg.Task = This new task, Time = 6pm, etc etc. What Id like to do is the following: Create a new form that has this format: Task: [___ Text Box for Task entry___] Time: [___ Text Box for Time entry___] Priority: [___ Text Box for Priority entry___] Updated By: [___ Text Box for Updated By entry___] All the user would have to do is then input in the text boxes the required data, then the <NewTaskTag> would do the rest.
The questions I have though are:
1)How would the form know that each text box is actually in the format: Task = <data from text box for Task> Time = <data from text box for Time> etc etc And that all these text boxes are enclosed in the <NewTaskTag> tag? 2) How could you create a form that automatically enters a <NewTaskTag> tag, then the required text boxes, with each one corresponding to a parameter required for the newtasktag, then a closing </NewTaskTag>?
If I can get this working by you wonderful gurus, this would totally change for the better the way we use Mediawiki!
Thanks guys in advance.
[edit] Anchors in syntax conflict
There seems to be a small issue where links (including interwiki) with section linking anchors such as [[Help:ParserFunctions#.23if:]] which renders as M:Help:ParserFunctions#.23if: will confuse with Semantic linking, and an interwiki link such as [[M:Help:ParserFunctions#.23if:|Help:ParserFunctions]] will fail with the Semantic MediaWiki extension installed. --Zven 01:22, 17 November 2007 (UTC)
[edit] How do I get Simile Timeline working with Semantic MW?
Hi, I have SMW extension installed and would love to get the Simile timeline function working, but can not seem to find exact instructions. Would you know please? Thanks 84.24.129.223
- See the demo
- And in my experience, if the setting "$smwgQDefaultNamespaces" is wrong, you will not get timeline.--Roc michael 23:58, 23 December 2007 (UTC)
[edit] Templating #ask: Results
So I'm using the #ask: parser function and using a template to format each result. Is there a way to have #ask: send the full page name to the template instead of a link (e.g. Page instead of [[Page]]? I want to have full control of the displayed text of the link. —Sledged (talk) 03:29, 7 March 2008 (UTC)
- Also, as a minor note, the template used in the results shows up as an orphaned page. Shouldn't it show up as being included in the #ask:ing page? —Sledged (talk) 03:34, 7 March 2008 (UTC)
-
- For the first question, you can set the link text with "[{{{1}}} custom text]" in the template. Yaron Koren 04:38, 7 March 2008 (UTC)
-
-
-
- Given the near month-long lack of a response, I'll just conclude that SMW does not have built-in a way to accomplish this (though I have found a work-around using Extension:StringFunctions), and put in a request for this functionality. The most direct solution is to have the parser function pass the page's namespace and local name through to separate arguments (say {{{ns}}} and {{{page}}}). —Sledged (talk) 21:35, 4 April 2008 (UTC)
-
-
[edit] A String as Both a Property Value and Displayed Text of a Link
Suppose in a page, I have the text "The capitol is Lincoln." Now I want "Lincoln" to be a value of the property "State Capitol," and I want it to be the display text of a link to the page "Lincoln (Nebraskan City)." Is this possible? I've tried [[Lincoln (Nebraskan City)|[[State Capitol::Lincoln]]]], but it doesn't work. It seems I can only get it to work if I have two separate "Lincoln" texts like so: [[Lincoln (Nebraskan City)|Lincoln]]<span style="display: none;">[[State Capitol::Lincoln]]</span>. I'm hoping for something that's a little less heavy-handed. —Sledged (talk) 07:13, 7 March 2008 (UTC)
[edit] Subproperty of Property
When a property is tagged as a subproperty of another, does it inherit the parent property's type? With the given examples on semantic-mediawiki.org, if "spouse" is of the type String, are "wife" and "husband" inherently of type String, or does it have to be declared with each subproperty? —Sledged (talk) 15:16, 7 March 2008 (UTC)
- Also, how can I get a list of all the the subproperties of a given property? I tried {{#ask: [[Subproperty of::Property:Super Property]] }}, but it's not giving any results. —Sledged (talk) 18:44, 7 March 2008 (UTC)
[edit] FckEditor extension incompatibility
MediaWiki 1.12
I installed both FckEditor and SemanticMediaWiki.
First, because i don't want my users need to learn Wikisyntax.
Second, because i want use WebSemantic.
But, everytime you try to edit an article, semantic attributes are interpreted by FckEditor.
Thus, you lose your attributes and the <DIV> with semantic info (normaly after the article and before category) is paste in the article's source as a content.
- If everyone knows how it's possible to have these 2 extensions working together, thanks a lot ?
[edit] Controlling external link anchors
When you define a semantic external link by giving the property:ExternalURL the type URL somewhere in the article [[has type::URL]] the semantic link itself is always full length. e.g. [[ ExternalURL::http://www.google.com|Google ]] will make the link in the article Google but the semantic property in the fact box will be full length : http://www.google.com. I have noticed that if you use interwiki links you can make the rendered link in the factbox identical e.g. [[ ExternalLink::Wikipedia: MediaWiki|MediaWiki]] will render MediaWiki for the link and in the factbox where Wikipedia: is defined in the interwiki table.
The question is can a set of interwiki links be controlled in a MediaWiki: namespace article similar to how Sevice links work? If not currently this would be convenient, the other approach would be to define a new Type:' to allow anchors to be the semantic object in the RDF triples of the form (subject, predicate, object)--Zven 05:05, 22 May 2008 (UTC)

