Extension talk:Semantic MediaWiki/Archive
This page is an archive. Do not edit the contents of this page. Please direct any additional comments to the current talk page. |
Creating a SemanticForm and using tags
Hi guys hope you can help. If I can get this working ok , 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.
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)
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:
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)
- No, that doesn't do it at all. That just gives me
[[[:Page|Page]] custom text]
. —Sledged (talk) 05:08, 7 March 2008 (UTC)
- No, that doesn't do it at all. That just gives me
- 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)
- 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
- For anyone stumbling upon this years later:
- The answer is (meanwhile) |mainlabel=-|?#-
- See http://semantic-mediawiki.org/wiki/Help:Inline_queries#Changing_the_first_result_column and http://semantic-mediawiki.org/wiki/Help:Displaying_information#The_main_result_column
- --Achimbode 13:56, 24 August 2011 (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 [[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)
- Did you ever find an answer to this? I'm struggling with this now and looking for how to do it. --82.241.196.155 14:34, 3 November 2011 (UTC)
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)
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. [[ 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)
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
[[Location::{{#geocode:{{{First Line of Address|}}}, {{{Second Line of Address|}}}, {{{City|}}}, {{{Province or State|}}}, {{{Post Code|}}}, {{{Country|}}} }} ]]
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:
''The city is [[City::Dublin]].<br /> I said that the city is {{#show: {{PAGENAME}} | ?City}}''
Then I'd get:
I said that the city is Dublin
Pnelnik 15:29, 24 October 2008 (UTC)
Returning to this once more, it does not seem to be working very well. In fact I think I've found a bug.
Using #show and #geocode on their own works fine, but they fail when used together.
To see an example have a look at bug example on GingerWiki
Pnelnik 15:28, 12 March 2009 (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 - ..... {{Summary|keyword=Best practice|subject=Details of General Motors|importance=2|}} 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 - ..... {{Summary|keyword=Production |subject=Nice story from Peter|importance=4|}} 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 - ..... {{Summary|keyword=Finance|subject=Ford and BMW|importance=4|}}
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)
- Extension:Semantic_Internal_Objects looks like this --Alex Brown
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)
Show Attribut in Skin
I want to show single attributes of an Page in the skin. I do use MediaWiki 1.12.4, and uptodate SMW, Forms, Resultforms and External Data. But still it seems impossible to have Attributes as PHP Variables for the Skin.
Please help, and thank you for pushing boarders of Wiki into the direction of Semantic Web. Sincerely yours Burgy PS the Documentation is realy difficult to understand and sometimes very spare
Adding graphics to resulting forms.
I am new to the MediaWiki and Semantic forms. I am attempting to have a user enter in some data on their forms. One of the data items is a color selected from a dropdown. What I would like to see happen is when the actual form is displayed, a graphic of the appropriate color is displayed instead of the word "Red", "Green" or "Blue".
Is this possible? If so, how can it be done?
- Such a question belongs in the Semantic Forms talk page or mailing list, but - I think it might be possible through the CSS. Each of those inputs in the form will have a different ID in the HTML, so setting their appearance in, say, MediaWiki:Common.css might do the trick. Yaron Koren 16:34, 3 April 2009 (UTC)
Part of SMW_LanguageZh_tw.php
protected $m_Namespaces = array(
SMW_NS_RELATION => '關聯', //'Relation',
SMW_NS_RELATION_TALK => '關聯討論', //'Relation_talk',
SMW_NS_PROPERTY => '性質', //'Property',
SMW_NS_PROPERTY_TALK => '性質討論', //'Property_talk',
SMW_NS_TYPE => '型態', //'Type',
SMW_NS_TYPE_TALK => '型態討論', //'Type_talk'
SMW_NS_CONCEPT => '概念', //'Concept'
SMW_NS_CONCEPT_TALK => '概念討論', //'Concept_talk'
);
--Roc michael 13:29, 28 April 2009 (UTC)
#ask sort
I am having an issue within the sorting function.
{| class=xxxtable sortable |{{#ask: [[Category:xxx]] |?Date |?A |?B |sort=Date |order=descending |format=template |template=TemplateX }} |}
So, my desired end result is to have the table format I have within the template be sortable.
Here is the problem I encounter. When the table is first created the sorting is correct. When the sorting icon within the "Date" column is clicked to changing the sorting from descending to ascending the dates become out of order and can never achieve any type of logical order again (until the table is refreshed).
Now, to fix this I have used the following code:
{{#ask: [[Category:xxx]] |?Date |?A |?B |?View Page |sort=Date |order=descending |format=table |mainlabel=- }}
This works, but I want the "mainlabel" result to display a linked image/icon or "View More Info..."
Thank you in advance for all responses and comments.
-Dgennaro 13:31, 16 July 2009 (UTC)
making a property without linking
Is there a way to make a property and not have an automatic link be generated from it? I read the SMW documentation on "Properties" and it eludes to this being possible but doesn't say how.--Iloveemeryville 23:35, 16 August 2009 (UTC)
- Sure thing - add the property has type:String or has type:Number to the property page. (Alex Brown)
- Help:Type String mentions that "Values cannot be longer than 255 characters (if you use non-Latin characters, this number might be smaller). For longer strings, use datatype Text instead."
Dynamic Pagelist <= vs. => Semantic Mediawiki
I have started a Comparison of Dynamic Pagelist x Semantic Mediawiki. Please help to give valuable information for a good choice. --Jannis 19:19, 22 December 2009 (UTC)
Sémantique
Bonjour,
À mon avis, il est abusif de parler de wiki sémantique. La sémantique, ce n'est pas juste classer des mots par classes, sous-classes, propriétés, attributs ; ça c'est de la logique. La sémantique, c'est la signification, ce qui va des rapports pas forcement logiques entre les mots aux significations en contexte. Je ne vois rien de cela dans cette extension qui est tout au plus une manière plus sophistiquée de catégoriser des pages. 92.158.202.166 09:26, 29 December 2009 (UTC)
Missing Factboxes?
I have just installed SMW 1.5 in MW 1.14 (PHP and MySQL versions both 5.x).
I see the Special Pages, and I see the Types and Properties listed, but I see no Factboxes anywhere. I added a TestSMW page with the appropriate content, but no factboxes. Tried IE and FF (just in case) and disabled all other extensions, still no factboxes.
I'm concerned that I could only find one other guys with this issue...in the meanwhile, will verify I can get it going on a new wiki, again, just in case. Any ideas?
--John Thomson 20:08, 21 March 2010 (UTC)
- Found it, sort of. Looks like I have a problem with my custom skin that is preventing the Factboxes from appearing. Digging now!
--John Thomson 20:24, 21 March 2010 (UTC)
- We're having the same problem here and it seems to be related to the skin configuration since the factboxes appear on some skins (like Modern) but not on other skins (like Monobook). Did you find anything on your side? Factboxes stopped working after upgrading MW from 1.13 to 1.15. --Mlirette 22:34, 19 July 2010 (UTC)
Hi, if someone would like to use this parser function one should install the latest version of SMW available from trunk. This is due to intensive and helpful improvements since the latest stable release of SMW 1.5.0 Cheers --kgh 14:51, 23 April 2010 (UTC)
#show not working well with {{PAGENAME}}
Has anyone else encountered issues with #show not working well with {{PAGENAME}}? Tisane 05:36, 10 May 2010 (UTC)
Sqlite
Interesting, but still doesn't work with sqlite. 90.31.177.152
SMW 1.5.1.1 breaks SCQ in MW 1.13.4
SMW 1.5.1.1 does not fully opperate correctly with MW 1.13.4. The only thing that I have found breaks is Semantic Compound Queries. It works great with MW 1.14
--Dgennaro
Show pages without a property
Hi, I know how to show all the pages of the wiki that, for example, have [[Location::London]]. I also know how to show all the pages that have a location info, but it's not London: [[Location::!London]]. Finally, I know how to show all the pages that have a location info: [[Location::+]]. However, I don't know how to show the list of the pages that don't have the Location property, so that I can generate that list in order to fullfill the missing information. Thanks! --Wikypedista 00:15, 9 July 2010 (UTC)
Adding templates?
Hi, I'd just like to know if it's possible to use the extension to add a new template each time you go to form edit? Rather than edit a template? For example, if I edit a forum and what to add this template each time I edit with form and want to add a new one each tiume, could FormEdit do that for that form only (as in, not for any other form)?--Technobliterator 19:14, 20 July 2010 (UTC)
Czech language
Hi, is it available also in the Czech language?--Juan de Vojníkov 14:19, 25 July 2010 (UTC)
Nice, was prepared for "ne".--Juan de Vojníkov 06:25, 26 July 2010 (UTC)
Putting default form in a template?
Is there any way to put a default form edit in a template? Like, does page has default form::foo work? Oh and thanks for your other answers.--Technobliterator 18:50, 28 July 2010 (UTC)
- Sorry wrong talk page--Technobliterator 18:50, 28 July 2010 (UTC)
Edit with Form button?
So we'd like to add an image to the Edit with Form button, can you tell me what the button is called in the .css? Or how to make an image for it?--Technobliterator 12:45, 4 September 2010 (UTC)
- Try installing "FireBug" for Firefox to detect and alter CSS Classes on the fly. Dunno if it helps but for me the "Edit with Form" Button is a list point with id="ca-form_edit". Using the Vector Skin myself.
Mediawiki is buggy all the sudden
the property pages are giving me Property:Subcategory of and Property:Modification Date
Database appears not to be updating
When I have the following wiki text:
- Set Attr3: [[Attr3::value3]]
- Attr3: {{#show:{{PAGENAME}}|Attr3}}
I would expect to see:
- Set Attr3: value3
- Attr3: value3
But the second 'value3' above does not appear.
The database is not updating as fast as it should.
Over the course of 15 minutes, I did the following 10 times:
- Click 'Edit'
- Made a very minor change to the text
- Clicked 'Save'
but even still the call to: {{#show:{{PAGENAME}}|Attr3}}
still didn't return anything.
Also it seemed that old attributes were left from earlier versions that should have been removed from the data-base.
Aberdeen01 05:07, 16 November 2010 (UTC)
- Experiencing the same issue. I get updates only after i edit a page twice after changing a property and then using {{#show:{{PAGENAME}}|Attr3}}.
Best way to check property existance?
I'm currently messing around with the ParserFunctions extension to check existance of a property. However, the update rate is rather poor. This results in a wrong output on my templates that only can be corrected by editing a page twice.
Example: A template showing grafics depending on a Property "Type of Information"
{{#switch: {{#show: {{PAGENAME}} | ?Type of Information}} | Concept = [[File:Questionmark_48.png]] | Manual = [[File:Manual_48.png]] | General Information = [[File:Info.png]] | #default = [[File:Info.png]] }}
Can this be optimized?
SOLUTION: #show in combination with Semantic Properties (and other parser commands)
As multiple people (including me) have the problem described above, here is my working quick and dirty solution:
- Edit LocalSettings.php
- Add the line: $wgEnableParserCache = false;
Note: $wgCachePages = true; can be left as is to increase Wiki performance.
This results in an instant update of #shown properties in the wikitext which allows insta-switching of template output depending on a given parser-condition (i.e. #switch)
Cons: May negatively influence wiki performance in parser-heavy situations. Probably has any other severe effects that i don't know about.
A way to query starting from a certain page within a category?
Hi,
I want to create an alphabetical navigation (back, forward) from ~18000 images within a certain category. Now: how can I ask for the member before and after the current page? I tried several things, but I don't want to read out all entries from the database, just the members before and behind. As far as I know it's not possible, is it? With the API I can achieve this by fetching two results sorted in ascending and descending order when the current page is named for instance File:File10.jpg:
/o/api.php?action=query&list=categorymembers&cmtitle=Category:MyLargeCategory&cmdir=asc&cmcontinue=FILE10.JPG| /o/api.php?action=query&list=categorymembers&cmtitle=Category:MyLargeCategory&cmdir=desc&cmcontinue=FILE10.JPG|
The first will give me File:File10.jpg, File:File11.jpg, File:File12.jpg etc. and the second will give me File:File10.jpg, File:File09.jpg, File:File08.jpg, File:File07.jpg etc. So I can get follower and forerunner. Can this be done with #ask? Something like {{#ask: [[Category:MyLargeCategory]] | offset = FILE10.JPG}}. If not, could this be implemented in the future to build a browsing through categories? --Andreas 23:30, 14 January 2011 (UTC)
- Well I can answer this myself: just use an additional property with the > and < operator:
{{#ask: [[Category:MyLargeCategory]] [[PagenameAsString::<File:File10.jpg]]}} {{#ask: [[Category:MyLargeCategory]] [[PagenameAsString::>File:File10.jpg]]}}But remember these alphabetic ranges will work only for a string property. --Andreas 23:45, 14 January 2011 (UTC)
Piped links?
I have a couple of string-type properties whose values contain one or several URLs. I would like to be able to have them displayed as piped links in inline queries. By default, square brackets are not allowed in properties (and setting $smwgLinksInValues to true would probably pose a risk to the system), so I was wondering if inline queries could be tweaked in such a way that URLs are shown as piped links or alternatively as numbered links. For instance, is there a way one can wrap two square brackets around the requested property values? Or to define placeholder symbols in the property value and then to have the placeholders replaced with square brackets in the inline query? Regards, Cavila 09:24, 18 January 2011 (UTC)
- Check out the "template" format. Yaron Koren 13:19, 18 January 2011 (UTC)
- Thanks, that's what I suspected and what I've been focusing on so far, but the SMW documentation is a little sparse for a newbie like me. The idea described here is to render results as plain text and then to relink them in the format template (eg. [{{{2|}}} ] for a numbered link, I suppose?), but the symbol # (as in
?URL # -
) does nothing to remove the external link. Having multiple values per property per page (i.e. per row) may also present something of a challenge. An example:
- Thanks, that's what I suspected and what I've been focusing on so far, but the SMW documentation is a little sparse for a newbie like me. The idea described here is to render results as plain text and then to relink them in the format template (eg. [{{{2|}}} ] for a numbered link, I suppose?), but the symbol # (as in
inline query format template "Template:X" {{#show: Pufferfish dish | ?Recipe | ?URL # | format=template | template=X }}
- Recipe = property of type "Text"
- URL = property of type "String"
The recipe is: "{{{1|}}}". It is described on the following websites: [{{{2|}}} ].
- 1 = recipe; 2 = URLs
- ... is the wrong way to go. Cavila 23:47, 18 January 2011 (UTC)
- Okay - as noted above, the mailing list is probably the best place for this sort of question. Yaron Koren 01:21, 19 January 2011 (UTC)
- Well, it's the lack of anonymity that kept me from directing my questions to the mailing list, but I've found another workaround anyway: Extension:Labeled Section Transclusion. I don't know if it can handle large sets of data without straining the server too much, but for more modest purposes it seems to work very well. Cavila 10:18, 20 January 2011 (UTC)
- Okay - as noted above, the mailing list is probably the best place for this sort of question. Yaron Koren 01:21, 19 January 2011 (UTC)
Duplicated tableheader sort-arrows and Js-error
When creating normal inline queries (table output) on any wiki page the clickable header icons look normal. But whenever i put the query on my mainpage i have two sort-arrows show up in the header instead of one per property. Also i get theses JS errors shown in the IE8 status bar when i click one of the arrows:
Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; FDM) Timestamp: Thu, 3 Feb 2011 08:01:19 UTC Message: 'undefined' is null or not an object Line: 213 Char: 2 Code: 0 URI: http://localhost/wiki/extensions/SemanticMediaWiki/skins/SMW_sorttable.js Message: 'undefined' is null or not an object Line: 132 Char: 2 Code: 0 URI: http://localhost/wiki/extensions/SemanticMediaWiki/skins/SMW_sorttable.js
I'm using: SMW Version 1.5.5 on MW 1.16 (Mike)
Making the inline query list pages that do not have a property set?
I currently have some wiki articles set up where I use a template to mark certain pages as "Unapproved". The template comes with a "Approved::No" property that also marks that page as unapproved.
Ideally, I would like to have a query that searches for all the pages in a category that does not have the "Approved" property. Is this currently possible? --Gossamer 00:36, 8 February 2011 (UTC)
- So you're trying to show not pages with a property but instead the ones missing it? Sounds rather impractical to me since you could get a lot of unwanted "sideload" from this query in terms of different namespaces or "non-content" pages that you don't want to display at all. My suggestion would be giving your pages a "non approved" property by default (i.e. upon their creation, within their template, default values, etc.). Assigning them to a special (hidden) category (i.e. "Draft") also helped me a lot with the later queries since i can narrow these down with ease. (Mike)
- I have a similar issue, if Wildcards are written as "+" and allow any value for a given condition. For example, [[born in::+]] returns all pages that have any value for the property «born in». What is the wildcard for when there is no value? In the example below I am trying to find the pages where the review date is still blank - what should be where the (?) is in [[Date for review::?]]
Thanks, Rich
{{#ask: [[Category:Equality Impact Assessments]] [[Date for review::?]] | ?Name of policy owner | ?Creation date | sort=Creation date | order=DESC | format = broadtable | limit=10 | mainlabel= etc etc
variable inside brackets in an ask
I have a table which I am trying to populate with a nested ask.
{ !Thumbnail !Member |- {{#ask:[[Has project::{{FULLPAGENAME}}]] | ? has person = Member | template=PeopleTable |}} |} Template:PeopleTable is defined as <includeonly> | {{#ask:[[{{{2}}}]] }} || {{{2}}} | |- </includeonly>
In the {{#ask:[[{{{2}}}]] }}: parameter {{{2}}} evaluates to 'empty' but {{{2}}} on its own transcludes as expected.
Any ideas greatly appreciated.
sementic mediawiki doesnt supported oracle?
Dear all
Here same i have installed mediawiki1.17 with oracle database.it working fine but whenever i add extension like sementic mediawiki,external data, give some error. how can i remove the error. and search option also not working.
if mediawiki cant work with oracle then why oracle as a database there in installation. please give some suggestion..
error: databaseOracle:doQuery" database returned error "942:ORA-00942 table or view does not exist...
Property as part of link?
I currently have a field set up that allows a user to fill in their own name and mark themselves as the author of an article.
[[author::{{{player|player}}}]]
Ideally, I would like this to automatically link to that member's user page on the wiki.
I tried the following, but that didn't seem to work.
[[user:[[author::{{{player|player}}}]]]]
Is this possible? Posted by User talk:Gossamer on 30 May 2011
- I don't think so. You're trying to embed a semantic property within a regular internal link. Regardless of the data type your property belongs to (page, string, type, etc.), that's not supposed to work, but there's a workaround:
[[author::{{{player|}}}| ]]
would assign to a value to the property 'author' without displaying anything to the page, and[[User:{{{player|}}}]]
would give you a link to the user page. Hope that helps. Cavila 14:20, 24 June 2011 (UTC)
Italics in property type 'Text'?
A normal query for properties with the type 'text' fortunately preserves italics. However, when the limit is set to zero so that a link is provided rather than the actual results, the new query does not render any italics, instead showing the double apostrophes that are used in the wiki markup for italics. Is this a known bug or an ordinary database issue? Cavila 16:00, 21 June 2011 (UTC)
A new bug?
Normally, when a query is limited to a predefined maximum number of results (e.g. limit=0
), one can click a link and continue browsing a table which contains all results. I know this feature is somewhat limited (see my comment abouts italics not being rendered, for instance; also, mainlabel
can't be suppresed; etc.), but since MW 1.17 and SMW 1.6, there's a more serious defect: the "next 20" button sends me to a Special:Ask page, rather than allowing me to continue. The page is mostly empty except for the "limit" field, which is pre-filled with a long string containing parts of the query. So the inevitable question is: is this a new bug? Cavila MW 1.17, MySQL 5.1.57, Php 5.2.17 15:00, 14 August 2011 (UTC)
- For the record, SMW 1.6.1 has just been released. Although there appears to be a new, possibly related bug (escaping issues?), the one I reported here has been taken care of! Many thanks, Cavila MW 1.17, MySQL 5.1.57, Php 5.2.17 18:55, 22 August 2011 (UTC)
- Please report issues on bugzilla. This particular one was fixed 2 or 3 months ago, shortly after 1.6.1 rel. -- Jeroen
- It seems to be working much better now. I have only been able to find one minor bug [1] that does not prevent usage of the feature. Badon 01:51, 9 January 2012 (UTC)
extermely complex
I give up. In my 6 years wiking have never seen an extension that is so complex. Everytime I enable this coding in my localsettings.php, my wiki goes blank. Okip 23:04, 3 September 2011 (UTC)
- Certainly, it is an extension with advanced features and not always easy to have a clear starting point. Documentation is available but not always sufficient for someone who is starting to understand SMW, but anyone involved in improving SMW is trying to help, meaning that if you have a specific problem you can post it here (with as much detail as possible) and people are willing to lend a hand but generalizations are not helpful in solving any issues.
- Our first advise would be to install a clean 1.17 MW system, install SMW 1.6 only (no other Semantic extensions are installed), add parameters as described under LocalSettings Extension:Semantic MediaWiki, and at last run Special:SMWAdmin to ensure tables are initialized. With those steps the system is prepared and ready to go. Having a clean system allows you to familiarize yourself with the functionality of properties and values and how to apply them in a wiki environment. The migration of content can be done at any time and is advisable only after you identified taxonomies and ontologies you want to use in connection with SMW. --MWJames 03:20, 4 September 2011 (UTC)
- I agree, it is complex. It is much more complex than I first thought it would be. But, it is always getting better, and I'm sure we can help you troubleshoot your issues. It's probably just something simple. Once it is working, you will never go back to a MediaWiki without SMW :) Badon 01:48, 9 January 2012 (UTC)
Roman numerals
Just a thought for users who like me, occasionally need to use Roman (rather than Arabic) numerals, for instance for page numbers. Unfortunately, Roman numerals are not understood by Type:Number or Type:Quantity, but there may be a workaround, however imperfect it may be. Extension:RomanNumbers - not to be confused with Extension:RomanNumerals - can be used to convert between Roman and Arabic numerals, which means that it can control the display of numerals. I haven't tested this, but I imagine that something like the following might work:
{{#if:{{{Foo|}}}|{{#roman:[[PropertyName::{{{Foo|}}}]]}}}}
- where Foo represents an Arabic numeral.
When the property value is queried, you should be able to use the #roman tag again, for instance in a special formatting template. One disadvantage with the extension is that allows only for capitalised Roman numerals, but it should be fairly easy to write a custom extension for lowercase numerals (just a copy the php code and replace whatever needs replacing).
Of course, when using templates with semantic forms, things become a little more complicated, but it may be a good starting point. Any further thoughts would be welcome. Cavila MW 1.17, MySQL 5.1.57, Php 5.2.17 10:33, 16 September 2011 (UTC)
- It just occurs to me that in the example for page numbers, something like p. xi should obviously not be equated with p. 11. So if you want to query a list of articles in a book and sort it by page number (where a separate property would be required for the first page only - number ranges are not understood in SMW), prefaces and introductions whose pages are numbered in Roman numerals present something of a problem. Since Type:Number has become stricter in SMW 1.17, non-numeric values are no longer accepted, so I can't think of any solution at the moment. Cavila MW 1.17, MySQL 5.1.57, Php 5.2.17 10:49, 16 September 2011 (UTC)
- You are in luck, this can be done very simply with CSS list numbering styles, no need for an extension: http://www.w3schools.com/cssref/pr_list-style-type.asp
- Badon 01:38, 9 January 2012 (UTC)
FlaggedRevs + Semantic MediaWiki issue
We are trying to build a QMS (Quality Management System) using MediaWiki. With FlaggedRevs we build the workflow of document states (In process, Prepared, Revised and Approved). With Semantic MediaWiki's special Search Data page we have an automatic updated index (this is our "All Documents" page).
When we change a page's state, the page disappears from "All Documents". When the page is edited, even if not modified, the page appears again. This is a problem because the people that revise (and approve) the documents should change the state and then edit the document (without change it) to make it available in "All Documents".
With a trace in the database, we determine that the problem is in the "semantic metadata" in the mw_smw_* tables.
Specifically, the problem is the following code during the review (or approval):
680 Query DELETE /* SMW::deleteSemanticData Sgc03 */ FROM `mw_smw_rels2` WHERE s_id = '53' 680 Query DELETE /* SMW::deleteSemanticData Sgc03 */ FROM `mw_smw_atts2` WHERE s_id = '53' 680 Query DELETE /* SMW::deleteSemanticData Sgc03 */ FROM `mw_smw_text2` WHERE s_id = '53' 680 Query DELETE /* SMW::deleteSemanticData Sgc03 */ FROM `mw_smw_spec2` WHERE s_id = '53' 680 Query DELETE /* SMW::deleteSemanticData Sgc03 */ FROM `mw_smw_subs2` WHERE s_id = '53' 680 Query DELETE /* SMW::deleteSemanticData Sgc03 */ FROM `mw_smw_subp2` WHERE s_id = '53' 680 Query DELETE /* SMW::deleteSemanticData Sgc03 */ FROM `mw_smw_inst2` WHERE s_id = '53' 680 Query DELETE /* SMW::deleteSemanticData Sgc03 */ FROM `mw_smw_redi2` WHERE s_title = 'Gestión_de_la_documentación' AND s_namespace = '0' 680 Query SELECT /* SMW::deleteSemanticData Sgc03 */ smw_id FROM `mw_smw_ids` WHERE smw_title = AND smw_namespace = '53' AND smw_iw = ':smw' 680 Query UPDATE /* SMW::deleteSemanticData Sgc03 */ `mw_smw_ids` SET smw_namespace = '0' WHERE smw_title = AND smw_namespace = '53' AND smw_iw = ':smw'
This code is in ./extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
We try to comment this code in the case of a review (or approval), the semantic metadata is not deleted, and the page dont disappear from "All Documents" (OK). But then, when the page is legitimately re-edited, the semantic metadata is inserted again, and this result in a hang in subsequent edits.
We are looking for a way in which the state changes do not eliminate the document for "All Documents" that also intelligently handle subsequent edits
Any advice is wellcome
Regards, Alfonso
- I recommend reporting a bug: https://bugzilla.wikimedia.org/
- SMW should be compatible with the FlaggedRevs extension. Badon 01:29, 9 January 2012 (UTC)
Semantic Mediawiki and Bluespice fully featured
Hello,
do anyone know, if Semantic Mediawiki Extension and Bluespice fully featured are compatible?
Thanks for answering
- I just took a look at Extension:BlueSpice, and I don't see anything there that would be incompatible with SMW. I have not tried it myself though, so it will need to be tested. It appears to me that Extension:BlueSpice is just a custom bundle of ordinary MediaWiki extensions, with a few added features that are not intended to fork MediaWiki away from the normal codebase that everything (including SMW) is supposed to compatible with. If it works for you, report back and let us know. I am curious. Badon 01:28, 9 January 2012 (UTC)
RUN_MAINTENANCE_IF_MAIN issue with 1.16.x
I'm still using 1.16.5 and tried the latest stable version (and the latest svn version) and hit the problem of require_once( RUN_MAINTENANCE_IF_MAIN ) being unavailable. Some online research showed this being the fix in ~/extensions/SemanticMediaWiki/maintenance/SMW_setup.php:
At the bottom of the file, replace
require_once( RUN_MAINTENANCE_IF_MAIN );
with
if( defined('RUN_MAINTENANCE_IF_MAIN') ) { require_once( RUN_MAINTENANCE_IF_MAIN ); } else { require_once( DO_MAINTENANCE ); # Make this work on versions before 1.17 }
--Salquint 04:28, 22 December 2011 (UTC)
- Trunk has a SMW_setup1.16.php file, which should work on 1.16. If it doesn't please let me know. --Jeroen De Dauw 19:00, 22 December 2011 (UTC)
Query with "limit=0" does not render markup for bold or italics
Any news on Extension talk:Semantic MediaWiki/Archive#Italics in property type 'Text'? I was hoping I could recreate this issue on Referata, but Referata appears to be down at the moment. Cavila MW 1.17, MySQL 5.5.16, Php 5.3.8 13:36, 4 January 2012 (UTC)
- Referata is up and running again - see now http://scratchpad.referata.com/wiki/Main_Page#Italics_and_bold_are_not_rendered for a test case. Cavila MW 1.17, MySQL 5.5.16, Php 5.3.8 09:06, 5 January 2012 (UTC)
- This bug has just been filed at MediaZilla. Cavila MW 1.17, MySQL 5.5.16, Php 5.3.8 09:25, 5 January 2012 (UTC)
- Thanks for reporting that one. It slipped by me, even though I'm sure I encountered it previously. Badon 01:35, 9 January 2012 (UTC)