[SMW-devel] smw.org to provide a TemplateRepository (call for input)?

2014-11-02 Thread James HK
Hi, I'm calling for input and opinions about collecting and providing self-explanatory templates to be bundled as a repository (aka "TemplateRepository") on smw.org that are re-usable in connection with SMW. The objective would be to support first time users in their effort more quickly to become

Re: [SMW-devel] Ask query in extension

2014-11-02 Thread JoelKP
James Montalvo wrote > I spent a lot of time on Friday trying to figure out how to replicate an > ask query in PHP. I was pretty sure I could do something to reuse the > parser, but since I wanted to be able to manipulate the data before > displaying it I did not pursue that method. Thank you, Fran

Re: [SMW-devel] Ask query in extension

2014-11-02 Thread James Montalvo
I spent a lot of time on Friday trying to figure out how to replicate an ask query in PHP. I was pretty sure I could do something to reuse the parser, but since I wanted to be able to manipulate the data before displaying it I did not pursue that method. Thank you, Frank, for the way you described.

[SMW-devel] mStripState (Was: Ask query in extension)

2014-11-02 Thread Markus Krötzsch
Hi Frank, hi Mark, hi all, The post below reminded me of how incredibly useful mStripState is when implementing parser hooks. It can be used to unstrip things (like ) but also to insert things like (e.g. to insert unsafe HTML from within a parser function). It seems that there is no documente

Re: [SMW-devel] Ask query in extension

2014-11-02 Thread Toni Hermoso Pulido
Thanks for the notes, James! El 02/11/14 a les 12:57, James HK ha escrit: > Hi, > >> Even though Semantic Tasks is unmaintained, I found some piece of code >> that could inspire you as well: >> https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FSemanticTasks/5363a0ba564c5c3708c246a4c316260d7

Re: [SMW-devel] Ask query in extension

2014-11-02 Thread James HK
Hi, > Even though Semantic Tasks is unmaintained, I found some piece of code > that could inspire you as well: > https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FSemanticTasks/5363a0ba564c5c3708c246a4c316260d781da1e1/SemanticTasks.classes.php Please try not follow these as general guidelin

Re: [SMW-devel] Ask query in extension

2014-11-02 Thread Toni Hermoso Pulido
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 code that could inspire you as well: https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FSemanticTasks/5363a0

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