Re: [SMW-devel] Obtain data as simple array

2015-10-26 Thread Frank Baxmann
Hello Simon, here is an example: $searchStr = "{{#ask: =|mainlabel=-|format=list}}"; // maybe you have to add param "sep" here if comma is not good for you // http://semantic-mediawiki.org/wiki/Help:List_format $searchResult = $parser->mStripState->unstripBoth($parser->recursiveTagParse( $sear

Re: [SMW-devel] Obtain data as simple array

2015-10-23 Thread Frank Baxmann
Hi, I had a similar problem in the past. I used "$parser->recursiveTagParse" to solve it. Meaning I created a string including the ASK query in the common wiki notation. Then I just parsed the string and get the ASK result back: $askResult = $parser->mStripState->unstripBoth($parser->recursive

Re: [SMW-devel] Newbie question: how to use a config variable in javascript

2015-07-02 Thread Frank Baxmann
mailto:jamesmontal...@gmail.com>>: You need to tell MW to expose the PHP variables in JS, which you do by adding a ResourceLoaderGetConfigVars hook. https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars On Jul

Re: [SMW-devel] Newbie question: how to use a config variable in javascript

2015-07-02 Thread Frank Baxmann
Hi Bernhard, JavaScript (on browser) can not access php variables (on server). You have to make them available to JS by sending them to the browser. I use additional JS for this, but there is somewhere in MW a class for adding variables with MW. And these you can then catch in JS with mw.config.ge

Re: [SMW-devel] Ask query in extension

2014-11-02 Thread Frank Baxmann
Hi James, you can try this, works fine in similar case for me: 1) Create the ask string in php like this: /$search = "{{#ask: }}";/ 2) Create the result string which you can manipulate later: $resultString = $parser->mStripState->unstripBoth($parser->recursiveTagParse( $/search/, $frame

Re: [SMW-devel] New (S)MW-based site that might be of interest

2014-10-29 Thread Frank Baxmann
Looks really nice. It would be interesting to be able to see the wikicode. Greetings Frank On 29.10.2014 19:03, Markus Krötzsch wrote: > Hi all, > > I just finished work on a new website for my research group (and maybe > others). The site might be of interest, since it showcases quite a few > te