Extension talk:Semantic MediaWiki/LQT Archive 1

The best way for getting support for Semantic MediaWiki is to post to its user mailing list. Comments made below are not very well monitored by the developers. There are various options for making yourself heard:


 * If you have a usage question, please post them to the SMW support mailing lists (archives).
 * If you found a bug or want to propose a new feature, please file it at MediaZilla. Bugs and requests are regularly considered by core developers and have a great impact on the future development of SMW.
 * If you want to contribute to the development, please contact the development community at the SMW developers' mailing list (archives).

When asking for help or describing bugs, do not forget to provide necessary details about your configuration, version details for all relevant components, information about other extensions that are used, and, if possible, a URL where the problem can be seen.

The below talk page is most useful for comments regarding the wiki page, but of course you may do as you like (it's a wiki, after all). --Markus Krötzsch 16:47, 19 January 2009 (UTC)

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  into a wiki page, then you manually insert parameters as follows..

 Task = This task completed at.. Time = 6pm Priority = Severe Updated by =   Task = Time = Priority = Updated by = 

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 ?

To further clarify what Im trying to say is the following.

If I want to use the  in a wiki page, I just go to a new page, click on Edit, and enter the following:

 Task = Time = Priority = Updated by =   Task = Time = Priority = Updated by = 

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  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 = Time = etc etc

And that all these text boxes are enclosed in the  tag?

2) How could you create a form that automatically enters a  tag, then the required text boxes, with each one corresponding to a parameter required for the newtasktag, then a closing ? 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.

Anchors in syntax conflict
There seems to be a small issue where links (including interwiki) with section linking anchors such as Help:ParserFunctions which renders as M:Help:ParserFunctions will confuse with Semantic linking, and an interwiki link such as Help:ParserFunctions will fail with the Semantic MediaWiki extension installed. --Zven 01:22, 17 November 2007 (UTC)

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)

Templating #ask:</tt> Results
So I'm using the <tt>#ask:</tt> parser function and using a template to format each result. Is there a way to have <tt>#ask:</tt> send the full page name to the template instead of a link (e.g. <tt> Page <tt> instead of <tt> Page <tt>? 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 <tt>#ask:</tt>ing page?  —Sledged (talk) 03:34, 7 March 2008 (UTC)


 * For the first question, you can set the link text with "[ custom text]" in the template. Yaron Koren 04:38, 7 March 2008 (UTC)


 * No, that doesn't do it at all. That just gives me <tt> Page custom text] </tt>.  —Sledged (talk) 05:08, 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 <tt></tt> and <tt></tt>).  —Sledged (talk) 21:35, 4 April 2008 (UTC)

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 <tt> [[State Capitol::Lincoln]] </tt>, but it doesn't work. It seems I can only get it to work if I have two separate "Lincoln" texts like so: <tt> Lincoln State Capitol::Lincoln </tt>. I'm hoping for something that's a little less heavy-handed. —Sledged (talk) 07:13, 7 March 2008 (UTC)

<tt>Subproperty of</tt> 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 <tt>  </tt>, but it's not giving any results.  —Sledged (talk) 18:44, 7 March 2008 (UTC)

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 ?

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. 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. 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)

Feedback
I'm noticing a lack of response to a number of queries on this talk page. Is the this right spot for reporting bugs, asking for support, requesting features, etc...? —Sledged (talk) 22:22, 23 July 2008 (UTC)


 * No - I think I'm one of very few people who actually watch this page. The best place for all of those is the semediawiki-user mailing list (though you can also report bugs on Bugzilla). Yaron Koren 22:55, 23 July 2008 (UTC)

Referencing a property on its own page
Can I set a property in one line on a page and then retrieve it later in the same page? For example, if I set the Location to be <tt> Location:: </tt> and later in the same page I'd like to use the Location property. Is there any way I can retrieve it again or do I need to call the #geocode function every time I want the location? Pnelnik 12:59, 22 October 2008 (UTC)

A few days later I stumbled across the answer to my own question. The answer is that it can indeed be done using #show. For example if I type: <tt> ''The city is City::Dublin. I said that the city is '' </tt> Then I'd get: ''The city is Dublin. ''I said that the city is Dublin Pnelnik 15:29, 24 October 2008 (UTC)

Moving ERROR
Hi, I recently moved my wiki from one server to another and new I'm getting a SMW error. I'm getting this error

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /var/www/html/wiki/extensions/SemanticMediaWiki/languages/SMW_LanguageEn.php on line 11

Do I need to reset a script?

thanks.

A bug in 1.4.1
Running the update jobs more quickly from console results in the progress bar to go over 100% (referring to this: To finish this update more quickly, you can invoke the MediaWiki maintenance script runJobs.php (use the option --maxjobs 1000 to restrict the number of updates done in one batch). Estimated progress of current update:) --83.145.207.200 18:26, 16 December 2008 (UTC)

Use property more than once in an article
I would like to use a property more than once in an article. The properties should be capsuled in templates.

article ist "First chapter of my book" some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - .....   some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - .....   some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - some text - .....  

Then I want to generate a List like this keyword       | subject                   | importance Best practice | Details of General Motors | 2 Production    | Nice story from Peter     | 4 Finance       | Ford and BMW              | 4

and not a (for my needs) useless list like this: keyword:   Best practice, Production, Finance subject:   Details of General Motors, Nice story from Peter, Ford and BMW importance: 2, 4

I know, till now the articles are the items you use for the relations - but why not use the templates in the articles too? Yes I also know that DPL is able to do the job and I use it as a workaround - nevertheless I would be happy to do it all with SMW because SMW is great.

Regards, Jan--89.52.191.30 23:44, 18 January 2009 (UTC)

Refreshing Pages
Why not use the right "purge" to verefy if the tab for purging pages should be shown in the interface?

I changed the source of "SMW_RefreshTab.php" to this: <?php /** * @file * @ingroup SMW */

/* * Protect against register_globals vulnerabilities. * This line must be present before any global variable is referenced. */ if (!defined('MEDIAWIKI')) die; global $wgHooks; $wgHooks[ 'SkinTemplateTabs' ][] = 'smwfAddRefreshTab';

/** * Adds an action that refreshes the article, i.e. it purges the article from * the cache and thus refreshes the inline queries. */ function smwfAddRefreshTab($obj, $content_actions) { global $wgUser, $wgTitle; if($wgUser->isAllowed('purge')){ wfLoadExtensionMessages('SemanticMediaWiki'); $content_actions['purge'] = array(			'class' => false,			'text' => wfMsg('smw_purge'),			'href' => $wgTitle->getLocalUrl( 'action=purge' )		); }	return true; // always return true, in order not to stop MW's hook processing! } --W.stoettinger 11:04, 23 January 2009 (UTC)