From: <sk...@us...> - 2007-10-29 13:15:31
|
Revision: 273 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=273&view=rev Author: sknappe Date: 2007-10-29 06:15:28 -0700 (Mon, 29 Oct 2007) Log Message: ----------- Changed view of article Modified Paths: -------------- trunk/src/dbpedia-navigator/Ajax-Test/SparqlConnection.php trunk/src/dbpedia-navigator/Ajax-Test/ajaxfunctions.php Modified: trunk/src/dbpedia-navigator/Ajax-Test/SparqlConnection.php =================================================================== --- trunk/src/dbpedia-navigator/Ajax-Test/SparqlConnection.php 2007-10-29 12:37:30 UTC (rev 272) +++ trunk/src/dbpedia-navigator/Ajax-Test/SparqlConnection.php 2007-10-29 13:15:28 UTC (rev 273) @@ -91,7 +91,7 @@ foreach ($array as $element) { $items=preg_split("[<]",$element,-1, PREG_SPLIT_NO_EMPTY); - $ret[]=$items; + $ret[$items[1]]=$items[2]; } return $ret; Modified: trunk/src/dbpedia-navigator/Ajax-Test/ajaxfunctions.php =================================================================== --- trunk/src/dbpedia-navigator/Ajax-Test/ajaxfunctions.php 2007-10-29 12:37:30 UTC (rev 272) +++ trunk/src/dbpedia-navigator/Ajax-Test/ajaxfunctions.php 2007-10-29 13:15:28 UTC (rev 273) @@ -27,9 +27,8 @@ $sc=new SparqlConnection($settings->dbpediauri,$settings->wsdluri); $triples=$sc->getTriples($subject); $content=""; - foreach ($triples as $triple){ - $content.="Subject: ".urldecode($triple[0])."<br/>Predicate: ".urldecode($triple[1])."<br/>Object: ".urldecode($triple[2])."<br/><br/>\n"; - } + $content.="<img src=\"".$triples['http://xmlns.com/foaf/0.1/img']."\" alt=\"Picture of ".urldecode(substr (strrchr ($subject, "/"), 1))."\" width=\"50\"/ style=\"float:left\">"; + $content.="<div>".$triples['http://dbpedia.org/property/abstract']."</div>"; $contentbuttons="<input type=\"button\" value=\"Positive\" class=\"button\" onclick=\"xajax_addPositive('".$subject."');return false;\" /> <input type=\"button\" value=\"Negative\" class=\"button\" onclick=\"xajax_addNegative('".$subject."');return false;\" />"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |