[SMW-devel] Using #ifexist with images

2011-09-22 Thread asafbareket
Hi all, I have a very large wiki site for literature. I want to upload a photo for each author on the site, but I don't have all the photos. So I thought I can upload the images that I have, and the authors that don't have a photo will get the default image No photo Available. So I guess I

Re: [SMW-devel] Using #ifexist with images

2011-09-22 Thread Krabina Bernhard
Hi, I am not the parser functions guru, but in my template for displaying images, I use the following: {{#if: {{{Diagramm1|}}}| [[Diagramm::Image:{{{Diagramm1|}}}| ]] [[Image:{{{Diagramm1|}}}|thumb|800px|left|{{Datei:{{{Diagramm1|}]] |}} You don't need this: {{Datei:{{{Diagramm1|} it

Re: [SMW-devel] SMW 1.6.2 bug: SMWResultPrinter::$mInline always false !?

2011-09-22 Thread Daniel Werner
I have found the bug now doing some stack trace: It's in SMWParamFormat::doManipulation() where SMWQueryProcessor::getResultPrinter() is called, but with only one parameter, while the second parameter is defining the context e.g. whether the query is coming from an special page. Default is

Re: [SMW-devel] Using #ifexist with images

2011-09-22 Thread badon
Here's how I suggest solving the problem: {{#if: {{#ask:[[Category:Images]] [[Belongs to::{{PAGENAME}}]] [[Main::Yes]] [[Image of::Portrait]]|?}} | {{#ask:[[Category:Images]] [[Belongs to::{{PAGENAME}}]] [[Main::Yes]] [[Image of::Portrait]]|?}} | {{#formlink:

Re: [SMW-devel] SMW 1.6.2 bug: SMWResultPrinter::$mInline always false !?

2011-09-22 Thread Jeroen De Dauw
Hey, It's in SMWParamFormat::doManipulation() where SMWQueryProcessor::getResultPrinter() is called, but with only one parameter, while the second parameter is defining the context e.g. whether the query is coming from an special page. Default is special page, so the context isn't set to inline

Re: [SMW-devel] SMW 1.6.2 bug: SMWResultPrinter::$mInline always false !?

2011-09-22 Thread Daniel Werner
Yeah, I am using it in getParameters() because within the context of semantic search special page I cant use Parser::preprocessToDom() to parse some of my config parameters. In this case I use some fallback value for the special page. Otherwise, I think I had to use Parser::parse() and I am