Skip to content
Snippets Groups Projects
Commit 2094a963 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

work on the globe plugin

parent b788095a
Branches
No related tags found
No related merge requests found
......@@ -21,12 +21,12 @@
// Set up the menu for logged in users
if (isloggedin())
{
add_menu(elgg_echo('globe'), $CONFIG->wwwroot . "pg/globe/");
add_menu(elgg_echo('Globe'), $CONFIG->wwwroot . "pg/globe/");
//add_menu(elgg_echo('groups:alldiscussion'),$CONFIG->wwwroot."mod/groups/discussions.php");
}
else
{
add_menu(elgg_echo('globe'), $CONFIG->wwwroot . "pg/globe/");
add_menu(elgg_echo('Globe'), $CONFIG->wwwroot . "pg/globe/");
}
register_page_handler('globe', 'globe_page_handler');
......
......@@ -6,8 +6,8 @@
<script type="text/javascript">var config_url = "<?php echo $CONFIG->url ?>";</script>
<script type="text/javascript" src="http://globe.poly9.com/api.js"></script>
<script type="text/javascript" src="<?php echo $CONFIG->url ?>mod/customindex/witw_people.js"></script>
<script type="text/javascript" src="<?php echo $CONFIG->url ?>mod/customindex/views/default/customindex/globesplash.js"></script>
<script type="text/javascript" src="<?php echo $CONFIG->url ?>mod/globe/views/default/globe/globefeatured.js"></script>
<script type="text/javascript" src="<?php echo $CONFIG->url ?>mod/globe/views/default/globe/globecontrol.js"></script>
<div id="globeInner" style="opacity:1 !important; display: block !important;width:940px;height:705px;background-color:#000;"></div>
<!-- begin poly9 globe js -->
var setT;
var counter=0;
//number of featured huskers
var counterMax=36;
function startMap() {
//turn off the overlay
this.toggleDashboard();
//set the initial zoom level
map1.zoomTo(10505000,1.5,"easeInOutQuad");
//put in the pins for featured huskers
for(counter=0;counter<counterMax;counter++){
per = husker[counter];
placePin(per.lng,per.lat,per.username,per.location,per.displayname,per.title,per.comment,per.linkname);
}
//auto fill the globe with featured huskers
counter=Math.floor(Math.random()*counterMax);
setTimeout("displayFeatured();",1000);
};
function displayFeatured(){
p = husker[counter];
openLocation(p.lng,p.lat,p.username,p.location,p.displayname,p.title,p.comment,p.linkname);
counter++;
if(counter>=counterMax)
counter=0;
setT=setTimeout("displayFeatured()",3000);
};
function placePin(lng, lat, username, location, displayname, title, comment, linkname) {
var latlng = new FE.LatLng(lat,lng);
label = window.label = new FE.Pushpin(latlng,new FE.Icon(config_url+'mod/customindex/map-pin-12.png'));
//make pins clickable
FE.Event.addListener(label, 'click', function() { openLocation(lng, lat, username, location, displayname, title, comment, linkname);});
map1.addOverlay(label);
};
function openLocation(lng, lat, username, location, displayname, title, comment, linkname) {
clearTimeout(setT);
var latlng = new FE.LatLng(lat,lng);
setTimeout(function(){map1.panTo(latlng,1.5,"easeInOutQuad")}, 50);
label = window.label = new FE.Pushpin(latlng,new FE.Icon(config_url+'mod/customindex/map-pin-12.png'));
map1.addOverlay(label);
applylabel(latlng, location, title, comment, displayname, username, linkname);
};
function applylabel(latlng, location, title, comment, displayname, username, linkname) {
if(!linkname){ //these are the most recently joined users, they dont have a linkname to a featured profile
if(comment != undefined && comment != "")
label.openInfoWindowHtml('<div id="witw_wrapper">'+
'<a href="'+config_url+'pg/profile/' + username + '"><img class="witw_icon" src="'+config_url+'mod/profile/icondirect.php?username=' + username + '&size=medium" width="60" height="60" /></a><h1>' + displayname + '</h1>'+
'<p class="witw_location">' + location + '</p><p class="witw_title">' + title + '</p>'+
'<p class="witw_comment"><strong>Why here?</strong><br /><em>\"' + comment + '\"</em></p><p class="witw_comment" style="margin-top:-6px; padding-right: 12px; text-align:right;"><a href="'+config_url+'pg/profile/' + username + '">View Profile</a></p>'+
'</div>', 256, 154);
else
label.openInfoWindowHtml('<div id="witw_wrapper">'+
'<a href="'+config_url+'pg/profile/' + username + '"><img class="witw_icon" src="'+config_url+'mod/profile/icondirect.php?username=' + username + '&size=medium" width="60" height="60" /></a><h1>' + displayname + '</h1>' +
'<p class="witw_location">' + location + '</p><p class="witw_title">' + title + '</p>'+
'<p class="witw_comment"></p><p class="witw_comment"><a href="'+config_url+'pg/profile/' + username + '">View Profile</a></p>'+
'</div>', 256, 154);
}
else //these are the featured WITW Huskers (like Buffett, etc)
label.openInfoWindowHtml('<div id="witw_wrapper"><img class="witw_icon" src="'+config_url+'mod/customindex/witw_icons/' + linkname + '_medium.jpg" width="60" height="60" /><h1>' + displayname + '</h1><p class="witw_location">' + location + '</p><p class="witw_title">' + title + '</p><p class="witw_comment">' + comment + ' <a href="'+config_url+'featured/husker/' + linkname + '/">Continue Reading...</a></p></div>', 256, 154);
};
WDN.jQuery(document).ready(function() {
try{
window.map1 = new FE.Map(document.getElementById("globeInner"));
map1.onLoad = startMap;
map1.load();
}catch(e){}
WDN.jQuery('#globeInner').height(501);
});
<!-- end poly9 globe js -->
// lng, lat, username, location, displayname, title, comment(text area), linkname(the username with the underscore)
function person(lng, lat, username, location, displayname, title, comment, linkname)
{
this.lng=lng;
this.lat=lat;
this.username=username;
this.location=location;
this.displayname=displayname;
this.title=title;
this.comment=comment;
this.linkname=linkname;
};
var husker = new Array();
husker[0]=new person('-91.5330870','41.6578850','demouser','USA - Iowa City, IA','Nancy Andreasen',
'Andrew H. Woods Chair of Psychiatry and Director of its Neuroimaging Research Center',
'Nancy Andreasen\'s Breakthrough Research Changed The Way Modern Science Understands Schizophrenia.',
'Nancy_Andreasen');
husker[1]=new person('126.9779692','37.5665350','demouser','South Korea','Atorod Azizinamini',
'Professor of Civil Engineering and Director of NaBRO',
'Atorod Azizinamini is developing better ways to renovate existing bridges and to build new ones that last a century or longer.',
'Atorod_Azizinamini');
husker[2]=new person('-77.0240550','38.8920910','demouser','USA - Washington, D.C.','Claude M. Bolton, Jr.',
'',
'Air Force "Top Gun" Claude Bolton Thrives On New Challenge: Acquiring Equipment For The Army.',
'Claude-M_Bolton-Jr');
husker[3]=new person('-96.0247270','41.2532250','demouser','USA - Omaha, NE','Warren Buffett',
'Chairman, Berkshire Hathaway',
'Warren Buffett, \'50, has some investment advice for everyone: invest in yourself.',
'Warren_Buffett');
husker[4]=new person('4.4699360','50.5038870','demouser','Belgium','Ann Chang-Barnes',
'Interim Executive Director, Lied Center for Performing Arts, and Artist-in-Residence',
'Ann Chang-Barnes champions performing arts for Nebraska - she even plays a little piano herself.',
'Ann_Chang-Barnes');
husker[5]=new person('-96.7','40.8','demouser','USA - Lincoln, NE','Bing Chen',
'Chair of Computer & Electronics Engineering',
'Bing Chen has taken his robotics-based curriculum to school - in Nebraska and across the U.S.',
'Bing_Chen');
husker[6]=new person('116.3979471','39.9081726','demouser','China','Xun-Hong Chen',
'Professor of Hydrogeology',
'Xun-Hong Chen studies water in the Nebraska Sandhills in the fight against global water shortage.',
'Xun-Hong_Chen');
husker[7]=new person('-98.4937220','29.4250370','demouser','USA - San Antonio, TX','Granville Coggs',
'',
'Granville Coggs, \'49, triumphed over 1940s racial discrimination to become part of a living American legend.',
'Granville_Coggs');
husker[8]=new person('-80.2064440','25.9794980','demouser','USA - Miami Gardens, FL','Dr. L Trey Coleman',
'Director of Grants and Sponsored Research, Florida Memorial University',
'Football delivered Dr. L. Trey Coleman out of a troubled past to Nebraska. He left with a future.',
'Dr-L-Trey_Coleman');
husker[9]=new person('-96.7','40.8','demouser','USA - Lincoln, NE','Pam Dingman',
'CEO of Engineering Design Consultants (EDC)',
'Pam Dingman is one of a handful of U.S. women who manages and owns a civil engineering firm.',
'Pam_Dingman');
husker[10]=new person('-94.5836440','39.0904310','demouser','USA - Kansas City, MO','Christopher Elbow',
'',
'Christopher Elbow, \'96, has developed a national reputation for his exquisite handmade chocolates.',
'Christopher_Elbow');
husker[11]=new person('-96.7','40.8','demouser','USA - Lincoln, NE','Shane Farritor',
'Associate Professor, Mechanical Engineering',
'Shane Farritor, \'92, has conducted promising research on railcar derailment and surgical robots.',
'Shane_Farritor');
husker[12]=new person('-69.3831079','-15.7961915','demouser','Bolivia - Lake Titicaca','Sheri Fritz',
'Willa Cather professor, Department of Geosciences',
'Sheri Fritz studies lake mud to research climate change and human impact on the environment.',
'Sheri_Fritz');
husker[13]=new person('151.2071140','-33.8671390','demouser','Australia - Sydney','Rulon Gardner',
'Olympic gold medal-winning wrestler',
'Rulon Gardner, \'96, won Olympic gold, but he\'ll never stop pushing.',
'Rulon_Gardner');
husker[14]=new person('160.336071','-79.464507','demouser','Antarctica','David Harwood',
'Professor and Stout Chair in Stratigraphy',
'David Harwood brings the entire continent of Antarctica into his UNL classroom.',
'David_Harwood');
husker[15]=new person('15.4729620','49.8174920','demouser','Czech Republic, Slovakia and Hungary','John Hoerner',
'',
'John Hoerner, \'61, has been a leader in European retail for more than 20 years.',
'John_Hoerner');
husker[16]=new person('30.8540570','36.9598850','demouser','Turkey - Mediterranean Coast','Michael Hoff',
'Professor of Art History',
'Michael Hoff explores ruins of a Roman temple in Turkey - and takes students along for the ride.',
'Michael_Hoff');
husker[17]=new person('-101.7204980','41.1309980','demouser','USA - Ogallala, NE','John Janovy, Jr.',
'Varner Professor of Biological Sciences',
'John Janovy, Jr., is at his best teaching biology in the field.',
'John_Janovy-Jr');
husker[18]=new person('-122.4192090','37.7752060','demouser','USA - San Francisco, CA','Jay Keasling',
'',
'Jay Keasling, \'86, runs a lab that is creating a cure for malaria.',
'Jay_Keasling');
husker[19]=new person('117.2523808','39.1038561','demouser','China - Tianjin','Scott Killinger',
'',
'Scott Killinger (\'61) specializes in planning new housing and commercial buildings in China.',
'Scott_Killinger');
husker[20]=new person('2.3509871','48.8566667','demouser','France, Poland and Italy','Karen Kunc',
'',
'Karen Kunc, \'75, is an artist whose work has been shown in galleries around the world.',
'Karen_Kunc');
husker[21]=new person('28.2871670','-15.4081930','demouser','Zambia - Lusaka','Nithal Kuwa',
'Graduate student, Biological Sciences',
'Nithal Kuwa\'s research could impact more than 1.8 million children in sub-Saharan Africa.',
'Nithal_Kuwa');
husker[22]=new person('-122.0851100','37.4219470','demouser','USA - San Francisco, CA','Cindy McCaffrey',
'',
'Cindy McCaffrey, \'80, shaped marketing blitz that helped make "Google" what it is today.',
'Cindy_McCaffrey');
husker[23]=new person('-77.0265910','38.8856150','demouser','USA - Washington, D.C.','Betsy O\'Brien',
'',
'Betsy O\'Brien, \'67, made a career of quantifying future energy sources and costs.',
'Betsy_O\'Brien');
husker[24]=new person('-77.0240550','38.8920910','demouser','USA - Washington, D.C.','Juanita Page',
'',
'Juanita Page, \'04, is the network manager and advertising sales producer for Discovery Health Channel.',
'Juanita_Page');
husker[25]=new person('18.4904100','-22.9576400','demouser','Nambia','Larkin Powell',
'',
'Larkin Powell blogs about his year-long Fulbright experience in Namibia.',
'Larkin_Powell');
husker[26]=new person('-122.1155690','47.6722350','demouser','USA - Redmond, WA','Jeffrey Raikes',
'CEO, Bill &amp; Melinda Gates Foundation',
'Jeffrey Raikes, a native of Ashland, NE, is a major supporter of the University of Nebraska-Lincoln.',
'Jeffrey_Raikes');
husker[27]=new person('-88.4976500','17.1898770','demouser','Belize, Guatemala, Mexico','Brett Ratcliffe',
'',
'Brett Ratcliffe, who some call an extreme scientist, studies beetles in Central America.',
'Brett_Ratcliffe');
husker[28]=new person('-58.3731613','-34.6084175','demouser','Argentina','Jorge Alberto Rodriguez',
'',
'Jorge Rodriguez, \'79, \'80, is a past chief of the Cabinet of Ministers for the Republic of Argentina.',
'Jorge-Alberto_Rodriguez');
husker[29]=new person('-95.9423630','41.2597510','demouser','USA - Omaha, NE','Avery Schwer',
'Associate Professor of construction systems',
'Avery Schwer, associate professor of construction systems, is building the house of the future.',
'Avery_Schwer');
husker[30]=new person('-73.9856550','40.7484330','demouser','USA - New York, NY','Ted Sorensen',
'',
'Ted Sorensen, \'49, \'51 spent 11 years as JFK\'s highly influential speechwriter and domestic policy adviser.',
'Ted_Sorensen');
husker[31]=new person('-87.6348870','41.8776540','demouser','USA - Chicago, IL','Bob Thacker',
'',
'Bob Thacker (\'70) is a legendary retail marketer whose secret is "Look before you leap - but leap!"',
'Bob_Thacker');
husker[32]=new person('-98.9770470','42.5366690','demouser','USA - Atkinson/Crofton, NE','Ken Vogel',
'USDA-ARS plant geneticist at UNL',
'Ken Vogel, \'74, studies what may become the next generation of biofuels - switchgrass.',
'Ken_Vogel');
husker[33]=new person('35.2007000','31.7857000','demouser','Isreal; Palestinian Terretories','Sidnie White Crawford',
'Willa Cather Professor and Chair, Department of Classics and Religious Studies',
'Sidnie White Crawford\'s work sheds light on Middle East conflict.',
'Sidnie_White-Crawford');
husker[34]=new person('31.1825290','-10.2084000','demouser','Zambia','Charles Wood',
'',
'Charles Wood empowers Zambians to fight the HIV/AIDS battle themselves.',
'Charles_Wood');
husker[35]=new person('34.8888220','-6.3690280','demouser','Tanzania','John Yohe',
'Associate Prof and Dir, Int Sorghum/Millet Collaborative Research Support Prgm',
'John Yohe is delivering higher sorghum and millet yields in Africa - and back home.',
'John_Yohe');
husker[36]=new person('23.7166470','37.9791800','demouser','Athens, Seoul, Barcelona, Sydney, Beijing','Trischa Zorn-Hudson',
'',
'Trischa Zorn-Hudson, \'87, was an athlete at Nebraska. She may be the Huskers\' biggest fan, too.',
'Trischa_Zorn-Hudson');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment