From: <sk...@us...> - 2008-08-18 15:42:58
|
Revision: 1096 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1096&view=rev Author: sknappe Date: 2008-08-18 15:42:55 +0000 (Mon, 18 Aug 2008) Log Message: ----------- now links in the tripel list can be used to see other articles, for example Angela Merkel->birthplace leads to the article Germany Modified Paths: -------------- trunk/src/dbpedia-navigator/helper_functions.php Modified: trunk/src/dbpedia-navigator/helper_functions.php =================================================================== --- trunk/src/dbpedia-navigator/helper_functions.php 2008-08-18 15:33:18 UTC (rev 1095) +++ trunk/src/dbpedia-navigator/helper_functions.php 2008-08-18 15:42:55 UTC (rev 1096) @@ -125,7 +125,10 @@ $table .= '<tr style="background-color:#'.$backgroundcolor.';"><td><a href="'.$predicate.'">'.nicePredicate($predicate).'</a></td>'; $table .= '<td><ul>'; foreach($object as $element) { - if ($element['type']=="uri") $table .= '<li><a href="'.$element['value'].'" target="_blank">'.$element['value'].'</a></li>'; + if ($element['type']=="uri"){ + if (strpos($element['value'],"http://dbpedia.org/resource/")===0&&substr_count($element['value'],"/")==4) $table .= '<li><a href="#" onclick="get_article(\'label='.$element['value'].'&cache=-1\');return false;">'.$element['value'].'</a></li>'; + else $table .= '<li><a href="'.$element['value'].'" target="_blank">'.$element['value'].'</a></li>'; + } else $table .= '<li>'.$element['value'].'</li>'; } $table .= '</ul></td>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |