From: <sk...@us...> - 2008-09-29 07:20:38
|
Revision: 1287 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1287&view=rev Author: sknappe Date: 2008-09-29 07:20:27 +0000 (Mon, 29 Sep 2008) Log Message: ----------- now article view looks if picture '.../depiction' really exists, if not tries to take '.../image' Modified Paths: -------------- trunk/src/dbpedia-navigator/ajax_get_article.php Modified: trunk/src/dbpedia-navigator/ajax_get_article.php =================================================================== --- trunk/src/dbpedia-navigator/ajax_get_article.php 2008-09-28 11:51:41 UTC (rev 1286) +++ trunk/src/dbpedia-navigator/ajax_get_article.php 2008-09-29 07:20:27 UTC (rev 1287) @@ -62,9 +62,15 @@ // display a picture if there is one if (isset($triples['http://dbpedia.org/property/imageCaption'])&&$triples['http://dbpedia.org/property/imageCaption'][0]['type']!='uri') $alt=$triples['http://dbpedia.org/property/imageCaption'][0]['value']; + else if (isset($triples['http://dbpedia.org/property/caption'])&&$triples['http://dbpedia.org/property/imageCaption'][0]['type']!='uri') $alt=$triples['http://dbpedia.org/property/caption'][0]['value']; else $alt='Picture of '.$artTitle; - if(isset($triples['http://xmlns.com/foaf/0.1/depiction'])) + + if(isset($triples['http://xmlns.com/foaf/0.1/depiction'])&&fopen($triples['http://xmlns.com/foaf/0.1/depiction'], 'r')){ $content.='<img src="'.$triples['http://xmlns.com/foaf/0.1/depiction'][0]['value'].'" alt="'.$alt.'" style="float:right; max-width:200px;" \>'; + } + else if(isset($triples['http://xmlns.com/foaf/0.1/img'])&&fopen($triples['http://xmlns.com/foaf/0.1/img'], 'r')){ + $content.='<img src="'.$triples['http://xmlns.com/foaf/0.1/img'][0]['value'].'" alt="'.$alt.'" style="float:right; max-width:200px;" \>'; + } //display where it was redirected from, if it was redirected $redirect=""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |