[gnome-web-www/testing] initial support for listing the foundation members



commit 32cc8d5c8cd02afed4dd3a89e9055f60b7869814
Author: Vinicius Depizzol <vdepizzol gmail com>
Date:   Sat Jan 28 12:06:12 2012 -0200

    initial support for listing the foundation members
    
    it gets the list from members.wml in foundation-web repo

 theme/page-members.php |   57 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/theme/page-members.php b/theme/page-members.php
new file mode 100644
index 0000000..52fb10e
--- /dev/null
+++ b/theme/page-members.php
@@ -0,0 +1,57 @@
+<?php
+
+
+if (false === ($members = get_transient('foundation_members_list'))) {
+
+    $members_url = "http://foundation.gnome.org/membership/members.php?output=json";;
+
+    $members = json_decode(file_get_contents($members_url));
+    
+    // keeps a 12-hour cache until another HTTP request
+    // to get the members list
+    set_transient('foundation_members_list', $members, 60*60*12);
+    
+}
+
+
+
+
+require_once("header.php"); ?>
+
+    <!-- container -->
+    <div id="container" class="two_columns">
+        <div class="container_12">
+        
+            <div class="page_title">
+                <h1><?php the_title(); ?></h1>
+            </div>
+            
+            <div class="content without_sidebar">
+            <?php while ( have_posts() ) : the_post(); ?>
+                <?php the_content(); ?>
+                
+                <?php
+                
+                echo '<ul class="foundation_members_list">'."\n";
+                foreach ($members as $member) {
+                    $email = str_replace($antispam, " ", $member["email"]);
+                    echo "    <li title=\"&lt;" . $email . "&gt; / " . "Last Renewed on " . $member['last_renewed_on'] . "\">" . $member['firstname'] . " " . $member['lastname'] . "</li>\n";
+                }
+                echo '</ul>'."\n";
+                
+                ?>
+                
+            <?php endwhile; // End the loop. Whew. ?>
+                <br />
+                <div class="clear"></div>
+            </div>
+            
+            <?php require_once("footer_art.php"); ?>
+        </div>
+    </div>
+    
+    <div class="clearfix"></div>
+    
+    <?php require_once("footer.php"); ?>
+</body>
+</html>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]