-extsubproj plugin : manages external subprojects on remote forges
+extsubproj plugin : manages links to external subprojects on remote forges
For the moment, manages URLs that can be displayed in a widget in the project home page.
+If the remote subprojects are on a FusionForge running the doaprdf plugin (or any compatible forge ;-), fetches the project's doap:name dynamically to render the link.
+
TODO : provide compact-preview of the remote projects
Note : may be interfaced with extratabs to provide each sub-project with its own tab, in mostly empty super projects otherwise
function getDescription() {
return _("Displays links to external subprojects of the project");
}
-
+
function getContent() {
global $pluginExtSubProj;
global $group_id;
$html .= $HTML->listTableTop($tablearr);
foreach ($subProjects as $url) {
+
+ include_once("arc/ARC2.php");
+ require_once('plugins/extsubproj/include/Graphite.php');
+
+
+ $parser = ARC2::getRDFParser();
+ //$parser->parse('https://vm2.localdomain/projects/coinsuper/');
+ $parser->parse($url);
+ //print_r($parser);
+ $triples = $parser->getTriples();
+ //print_r($triples);
+ $turtle = $parser->toTurtle($triples);
+ $datauri = $parser->toDataURI($turtle);
+
+
+ $graph = new Graphite();
+ //$graph->setDebug(1);
+ $graph->ns( "doap", "http://usefulinc.com/ns/doap#" );
+ $graph->load( $datauri );
+ //print $graph->resource('https://vm2.localdomain/projects/coinsuper/')->dumpText();
+ $projname = $graph->resource( $url )->get( "doap:name" );
+
+
$html = $html . '
<tr>
- <td><a href="'.$url.'">'.$url.'</a>
+ <td><a href="'.$url.'">'.$projname.'</a>
</td>
</tr>';
}
Package: @PACKAGE@-plugin-extsubproj
Architecture: all
-Depends: @OLDPACKAGE@-common, @OLDPACKAGE@-db-postgresql | @OLDPACKAGE@-db, @OLDPACKAGE@-web-apache2 | @OLDPACKAGE@-web, php5-cli, ${misc:Depends}
+Depends: @OLDPACKAGE@-common, @OLDPACKAGE@-db-postgresql | @OLDPACKAGE@-db, @OLDPACKAGE@-web-apache2 | @OLDPACKAGE@-web, libarc-php, ${misc:Depends}
Description: collaborative development tool - extsubproj plugin