OSDN Git Service

Web: Add "Tracker Statistics" to support page
authorTim Gerundt <tim@gerundt.de>
Sun, 21 Dec 2008 00:02:33 +0000 (00:02 +0000)
committerTim Gerundt <tim@gerundt.de>
Sun, 21 Dec 2008 00:02:33 +0000 (00:02 +0000)
Web/support/index.php

index 8569a48..41235e8 100644 (file)
@@ -1,5 +1,6 @@
 <?php\r
   include('../page.inc');\r
+  include('../engine/simplepie/simplepie.inc');\r
 \r
   $page = new Page;\r
   $page->printHead('WinMerge: Support', TAB_SUPPORT);\r
@@ -19,6 +20,24 @@ public and free), so that you may get email notifications if we post follow-up q
 It is not at this time required that you register to post a bug report (although, we do generally\r
 give less priority to unregistered bug reports, because it has been our experience that unregistered\r
 posters often do not remember to return and check to answer follow-on questions).</p>\r
+<h3>Tracker Statistics</h3>\r
+<?php\r
+  $feed = new SimplePie();\r
+  $feed->set_feed_url('http://sourceforge.net/export/rss2_projsummary.php?group_id=13216');\r
+  $feed->set_cache_location('../engine/simplepie/cache');\r
+  $feed->enable_order_by_date(false);\r
+  $feed->init();\r
+  print("<ul class=\"rssfeeditems\">\n");\r
+  foreach ($feed->get_items() as $item) { //for all project summary items...\r
+    $title = $item->get_title();\r
+    if (stristr($title, "Tracker:")) {\r
+      $title = str_replace('Tracker: ', '', $title);\r
+      print("  <li><a href=\"".$item->get_link()."\">".$title."</a></li>\n");\r
+    }\r
+  }\r
+  print("</ul>\n");\r
+?>\r
+<h3>Donate</h3>\r
 <p>Since WinMerge is an Open Source project, you may use it free of charge.\r
 But please consider making a <a href="http://sourceforge.net/project/project_donations.php?group_id=13216">donation</a>\r
 to support the continued development of WinMerge.</p>\r