Thank you Eugene and Yaron. I think you will need to humour me. I have looked
through those files/classes, but my lack of understanding is more
fundamental and I'm struggling to get to grips with the basics.

Taken almost straight from Semantic_calendar:

$params = array('limit' => 100000);
$inline = false;
$format = 'auto';
$printlabel = "";
$printouts = array();
$printouts[] = new SMWPrintRequest(SMWPrintRequest::PRINT_PROP, $printlabel,
Title::newFromText($some_property, SMW_NS_PROPERTY));
$query  = SMWQueryProcessor::createQuery($some_query_string, $params,
$inline, $format, $printouts);
$results = smwfGetStore()->getQueryResult($query);

If I want my result in embedded format, should I be stating that somewhere
in the above code (I tried to put it in $params, but it wouldn't work). What
about as the last input to SMWQueryProcessor::createQuery()?

And then I don't really understand the $results object. I have tried using
various getNext() and getNextObject() functions with different
$some_query_string, but it seems to be very hit and miss whether these will
return anything other an error. 

I'm sorry this is so basic,
Izzy


Eugene Mednikov wrote:
> 
> Greetings, Izzy!
> 
> For SMW 1.2 I'd recommend looking at following files:
> includes/SMW_QueryPrinter.php
> includes/SMW_QP_Table.php
> specials/AskSpecial/SMW_SpecialAsk.php
> 
> As far as I remember there was some change in 1.3 or 1.4 regarding result
> printers.
> 


yaron57 at gmail dot com wrote:
> 
> Hi,
> 
> I don't know how much this helps, but you can find the class and
> constructor
> function for SMWPrintRequest at /includes/storage/SMW_Description.php, in
> the SemanticMediaWiki directory.
> 
> -Yaron
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Writing-an-extension-that-outputs-to-a-given-format-tp20438110p20478489.html
Sent from the Semantic Mediawiki - Development mailing list archive at 
Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to