[SMW-devel] Ask query in extension

2014-11-01 Thread James Montalvo
I'm creating a parser function in which I'm going to include an ask query. In this particular case I'd like it just return a normal HTML table of results, as if I were to do: {{#ask: [[Category:Some category]] |? Property 1 |? Property 2 | limit = 10 | sort = Property 2 }} Once I understand this

Re: [SMW-devel] Ask query in extension

2014-11-02 Thread James Montalvo
moso Pulido wrote: > >> Hi James, > >> > >> I found this link some weeks ago: > >> > https://semantic-mediawiki.org/wiki/User:Yury_Katkov/programming_examples > >> > >> Even though Semantic Tasks is unmaintained, I found some piece of cod

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

2015-07-02 Thread James Montalvo
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 2, 2015 6:21 AM, "Frank Baxmann" wrote: > Hi Bernhard, > > JavaScript (on browser) can not access php v

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

2015-07-02 Thread James Montalvo
gt; } > > But where and how to "attach the hook", whatever that means. > > $wgHooks['ResourceLoaderGetConfigVars'][] = > 'MyExtensionHooks::onResourceLoaderGetConfigVars'; > > probably here, but I don't understand how: > > https://github

[SMW-devel] Is enableSemantics required?

2015-11-06 Thread James Montalvo
Is enableSemantics() required? What are the potential problems if this is not included in LocalSettings.php? Assume SMW 2.2 or 2.3. These discussions are unclear: [1] https://semantic-mediawiki.org/wiki/Thread:User_talk:Kghbln/enableSemantics_no_longer_needed [2] http://semanticmediawiki.org/w/ind