[ogb-discuss] HOWTO: show the list of your community's contribs and core contribs on the CG's web page

John Plocher John.Plocher at Sun.COM
Fri Feb 8 08:36:08 PST 2008


Stephen Lau wrote:
> I've created a Yahoo Pipe for this exact purpose, id: 
> 65bec7359860dc79318059c9fd5bdd00
> I'm using it here:
> http://opensolaris.org/os/project/nightingale/desktopgrants/
> to show the list of Core Contributors and Contributors for the Desktop 
> community.


Way cool.  Thanks Stephen!!!

For those who wish to reuse this work, all you need to
do is add the following to your Community Leaders page

Make sure you check the "Content Type (*)HTML" box
and change the value of myCommunity in the script
to match yours from the following list:

myCommunity      Formal name of community
===========      ========================
advocacy	 Advocacy Community Group
approachability	 Approachability
arc		 Architecture Process and Tools
brandz		 BrandZ
desktop		 Desktop
device_drivers	 Device Drivers
documentation	 Documentation
dtrace		 DTrace
edu		 Academic and Research
fm		 Fault Management
ha-clusters	 HA Clusters
install		 Installation and Packaging
int_localization Internationalization and Localization
laptop		 Laptop
ldoms		 Logical Domains
mdb		 Modular Debugger (MDB)
networking	 Networking
nfs		 NFS
ogb		 OpenSolaris Governing Board (OGB)
on		 OS/Net (ON)
performance	 Performance
power_pc	 PowerPC
printing	 OpenSolaris Printing
security	 Security
smf		 Service Management Facility (smf(5))
storage		 Storage
sysadmin	 Systems Administration Community Group
testing		 Testing
tools		 Tools
x_win		 X Window System
xen		 Xen
zfs		 ZFS
zones		 Zones

    -John



----- add the stuff below to your os.o CG leaders page -----


<script type="text/javascript">

var myCommunity = "desktop";

   function getContributors(community) {
     var newScript = document.createElement('script');
     newScript.type = 'text/javascript';
     newScript.src = 'http://pipes.yahoo.com/pipes/pipe.run?_id=65bec7359860dc79318059c9fd5bdd00&_render=json&_callback=pipeCallback&community='+community;
     document.getElementsByTagName("head")[0].appendChild(newScript);
   }

   function pipeCallback(feed) {
     var cctab='<table class="core.contributors">';
     var ctab='<table class="contributors">';
     cctab += "<th class='username'>Username</th><th>Real name</th>";
     ctab += "<th class='username'>Username</th><th>Real name</th>";

     for (var i=0; i<feed.value.items.length; i++) {
         var user = feed.value.items[i];
         var thisRow = '<tr>';
         thisRow += '<td class="username">' + user.Username + "</td>";
         thisRow += '<td>' + user.Realname + "</td>";
         thisRow += '</tr>';
         if (user.ContribLevel == 30)
            cctab += thisRow;
         else
            ctab += thisRow;
     }
     document.getElementById('coreContribDataDiv').innerHTML=cctab;
     document.getElementById('contribDataDiv').innerHTML=ctab;
   }

getContributors(myCommunity)
</script>

<style type="text/css">
#contributorGrants span.title { font-weight: bold; }
#contributorGrants .username { background-color: #bbbbbb; }
#coreContribDiv { float: left; padding-right: 2em; }
#contribDiv { float: left; }

</style>


<div id="contributorGrants">
<div id="coreContribDiv">
<span class="title">Core Contributors:</span>
<div id='coreContribDataDiv'>you need to enable javascript</div>
</div>

<div id="contribDiv">
<span class="title">Contributors:</span>
<div id='contribDataDiv'>you need to enable javascript</div>
</div>
</div>

<div style="clear: both;"></div>


More information about the ogb-discuss mailing list