From 8e48e67acb3b0845c19241b37023f4588b8028f2 Mon Sep 17 00:00:00 2001 From: Eric Rasmussen <erasmussen2@unl.edu> Date: Wed, 16 Sep 2009 19:11:53 +0000 Subject: [PATCH] added css extended view for the globe --- plugins/globe/start.php | 7 +++- plugins/globe/views/default/globe/content.php | 35 +++++++++++++++++-- plugins/globe/views/default/globe/css.php | 3 ++ .../globe/views/default/globe/globecontrol.js | 2 +- 4 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 plugins/globe/views/default/globe/css.php diff --git a/plugins/globe/start.php b/plugins/globe/start.php index 83092e68..c17bf4af 100644 --- a/plugins/globe/start.php +++ b/plugins/globe/start.php @@ -29,8 +29,13 @@ add_menu(elgg_echo('Globe'), $CONFIG->wwwroot . "pg/globe/"); } - register_page_handler('globe', 'globe_page_handler'); + + // Extend system CSS with our own styles, which are defined in the thewire/css view + extend_view('css','globe/css'); + + + register_page_handler('globe', 'globe_page_handler'); } diff --git a/plugins/globe/views/default/globe/content.php b/plugins/globe/views/default/globe/content.php index c5b704e8..8ee32715 100644 --- a/plugins/globe/views/default/globe/content.php +++ b/plugins/globe/views/default/globe/content.php @@ -20,9 +20,40 @@ <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> +<div id="globeInner" style="opacity:1 !important; display: block !important;width:940px;height:505px;background-color:#000;"></div> + + +<div class="clear"></div> + + +<div id="plotMe"> + <?php + if (isloggedin()) { + $me = get_user($_SESSION['user']->guid); + + ?> + <div class="member_icon"> + <img src="<?php echo $_SESSION['user']->getIcon('small'); ?>" alt="Your Profile Icon" id="YourselfOnTheMap" onclick="window.openLocation(<?php echo "'" . $me->longitude . "','" . $me->latitude . "','" . $me->username . "',"; + if($me->profile_country) + echo "'" . $me->profile_country . " - " . str_replace("'","\'",htmlentities($me->profile_city)) . ", " . $me->profile_state . "',"; + else + echo "'',"; + echo "'" . str_replace("'","\'",htmlentities($me->name)) . "',"; + if($me->profile_attended_from != "Did Not Attend UNL" && $me->profile_attended_from != "" && $me->profile_attended_from != NULL) + echo "'Attended UNL: " . $me->profile_attended_from . "-" . $me->profile_attended_to . "'"; + else + echo "''"; + echo ",'". str_replace("'","\'",htmlentities($me->map_explanation))."'"?>)" /> + </div> + <?php + + } + ?> + +</div> + +<div class="clear"></div> -<div id="plotMe"></div> <div class="col left" id="plotFriends"> <h3 class="sec_header">Your Friends</h3> </div> diff --git a/plugins/globe/views/default/globe/css.php b/plugins/globe/views/default/globe/css.php new file mode 100644 index 00000000..67e221c9 --- /dev/null +++ b/plugins/globe/views/default/globe/css.php @@ -0,0 +1,3 @@ +#plotMe { + background:#eeeeee; +} \ No newline at end of file diff --git a/plugins/globe/views/default/globe/globecontrol.js b/plugins/globe/views/default/globe/globecontrol.js index 67eb8094..5964ca69 100644 --- a/plugins/globe/views/default/globe/globecontrol.js +++ b/plugins/globe/views/default/globe/globecontrol.js @@ -77,7 +77,7 @@ WDN.jQuery(document).ready(function() { map1.load(); }catch(e){} - WDN.jQuery('#globeInner').height(501); + //WDN.jQuery('#globeInner').height(501); }); -- GitLab