[CHNOSZ-commits] r282 - www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 9 08:43:29 CET 2017


Author: jedick
Date: 2017-11-09 08:43:29 +0100 (Thu, 09 Nov 2017)
New Revision: 282

Removed:
   www/images/
Modified:
   www/index.php
Log:
www: simplify R-forge project home page; remove random image


Modified: www/index.php
===================================================================
--- www/index.php	2017-11-08 15:43:12 UTC (rev 281)
+++ www/index.php	2017-11-09 07:43:29 UTC (rev 282)
@@ -44,55 +44,9 @@
 
 <!-- end of project description -->
 
-<p> The <strong>project summary page</strong> you can find <a href="http://<?php echo $domain; ?>/projects/<?php echo $group_name; ?>/"><strong>here</strong></a> on R-Forge. (Development site, source code management)</p>
+<p> <strong>Link 1:</strong> <a href="http://<?php echo $domain; ?>/projects/<?php echo $group_name; ?>/"><strong>project summary page</strong></a> on R-Forge.</p>
 
-<p> Currently (Jan. 2013) the main website for the project is located at <a href="http://www.chnosz.net"><strong>chnosz.net</strong></a>. (Downloads, help pages, output from examples and vignettes) </p>
+<p> <strong>Link 2:</strong> <a href="http://chnosz.net"><strong>project website</strong></a> at chnosz.net.</p>
 
-<p> As a teaser, here's a random image from the examples of CHNOSZ 0.9-9, released on CRAN on 2013-01-01. Click <a href="images/"><strong>here</strong></a> for a directory listing of all 54 images, or <a href="http://www.chnosz.net/examples/examples.html"><strong>here</strong></a> for the images in context of the code running the examples. </p>
-
-<!-- random image code -->
-
-<?php
-function getImagesFromDir($path) {
-    $images = array();
-    if ( $img_dir = @opendir($path) ) {
-        while ( false !== ($img_file = readdir($img_dir)) ) {
-            // checks for gif, jpg, png
-            if ( preg_match("/(\.gif|\.jpg|\.png)$/", $img_file) ) {
-                $images[] = $img_file;
-            }
-        }
-        closedir($img_dir);
-    }
-    return $images;
-}
-
-function getRandomFromArray($ar) {
-    mt_srand( (double)microtime() * 1000000 ); // php 4.2+ not needed
-    $num = array_rand($ar);
-    return $ar[$num];
-}
-
-/////////////////////////////////////////////////////////////////////
-// This is the only portion of the code you may need to change.
-// Indicate the location of your images 
-
-$root = '';
-// use if specifying path from root
-//$root = $_SERVER['DOCUMENT_ROOT'];
-
-$path = 'images/';
-
-// End of user modified section 
-/////////////////////////////////////////////////////////////////////
-
-// Obtain list of images from directory 
-$imgList = getImagesFromDir($root . $path);
-$img = getRandomFromArray($imgList);
-?> 
-
-<p>Image filename: <?php echo $img ?></p>
-<img src="<?php echo $path . $img ?>" alt="" />
-
 </body>
 </html>



More information about the CHNOSZ-commits mailing list