[Pomp-commits] r331 - www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 28 16:50:31 CEST 2010


Author: kingaa
Date: 2010-09-28 16:50:31 +0200 (Tue, 28 Sep 2010)
New Revision: 331

Modified:
   www/index.php
Log:
- include versioning information


Modified: www/index.php
===================================================================
--- www/index.php	2010-09-28 11:15:48 UTC (rev 330)
+++ www/index.php	2010-09-28 14:50:31 UTC (rev 331)
@@ -2,7 +2,12 @@
 $domain=ereg_replace('[^\.]*\.(.*)$','\1',$_SERVER['HTTP_HOST']);
 $group_name=ereg_replace('([^\.]*)\..*$','\1',$_SERVER['HTTP_HOST']);
 $themeroot='http://r-forge.r-project.org/themes/rforge/';
-
+$cranpage = file_get_contents("http://cran.at.r-project.org/web/packages/pomp/");
+preg_match("/<tr><td valign=top>Version:<\/td>\\n<td>(.+?)<\/td>/",$cranpage,$matches);
+$cranversion = $matches[1];
+$rforgepage = file_get_contents("http://r-forge.r-project.org/R/?group_id=214");
+preg_match("/Version: <b>(.+?)<\/b>/",$rforgepage,$matches);
+$rforgeversion = $matches[1];
 echo '<?xml version="1.0" encoding="UTF-8"?>';
 ?>
 <!DOCTYPE html
@@ -40,8 +45,8 @@
 <td align="left" width="40%">
 <ul>
 <li><a href="./index.php?nav=about">About <i>pomp</i></a></li>
-<li><a href="http://<?php echo $domain; ?>/projects/<?php echo $group_name;?>">Development version (on R-Forge)</a></li>
-<li><a href="http://cran.at.r-project.org/web/packages/pomp/">Release version (on CRAN)</a></li>
+<li><a href="http://<?php echo $domain; ?>/projects/<?php echo $group_name;?>">Development Version (<?php print $rforgeversion; ?>) on R-Forge</a></li>
+<li><a href="http://cran.at.r-project.org/web/packages/pomp/">Release Version (<?php print $cranversion; ?>) on CRAN</a></li>
 <li><a target="_blank" href="http://cran.at.r-project.org/web/packages/pomp/pomp.pdf"><i>pomp</i> manual (PDF)</a></li>
 <li><a href="http://lists.r-forge.r-project.org/pipermail/pomp-announce/"><i>pomp-announce</i> mailing list archives</a></li>
 <li><a href="./index.php?nav=bib">References to the literature</a></li>



More information about the pomp-commits mailing list