From af6313113c02b9957232cdaae8443354b4c8837d Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <erasmussen2@unl.edu>
Date: Fri, 28 Aug 2009 14:41:21 +0000
Subject: [PATCH] only show "why here" if they've filled that out

---
 .../views/default/customindex/content.php        |  4 ++--
 .../views/default/customindex/metatags.php       | 16 ++++++++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/customindex/views/default/customindex/content.php b/customindex/views/default/customindex/content.php
index 15f826a6..508c3e78 100644
--- a/customindex/views/default/customindex/content.php
+++ b/customindex/views/default/customindex/content.php
@@ -154,8 +154,8 @@
 					</p>
 					<!-- lat, lng, username, location, displayname, title, comment(text area) -->
 					<?php 
-					$users = get_entities_from_metadata('icontime', '', 'user', '', 0, 8);
-					//$users = get_entities('user', '', 0, '', 8, 0, false, 0, null);
+					//$users = get_entities_from_metadata('icontime', '', 'user', '', 0, 8);
+					$users = get_entities('user', '', 0, '', 8, 0, false, 0, null);
 	                
 	                if($users){
 	                    foreach($users as $user){
diff --git a/customindex/views/default/customindex/metatags.php b/customindex/views/default/customindex/metatags.php
index fcd0ee57..77a40ef3 100644
--- a/customindex/views/default/customindex/metatags.php
+++ b/customindex/views/default/customindex/metatags.php
@@ -168,8 +168,20 @@ function openLocation(lng, lat, username, location, displayname, title, comment,
 };
 
 function applylabel(latlng, location, title, comment, displayname, username, linkname) {		
-	if(!linkname) //these are the most recently joined users
-		label.openInfoWindowHtml('<div id="witw_wrapper"><img class="witw_icon" src="<?php echo $CONFIG->url ?>mod/profile/icondirect.php?username=' + username + '&size=medium" width="60" height="60" /><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></div>', 256, 154);
+	if(!linkname){ //these are the most recently joined users
+		if(comment != undefined && comment != "")
+		label.openInfoWindowHtml('<div id="witw_wrapper">'+
+								'<img class="witw_icon" src="<?php echo $CONFIG->url ?>mod/profile/icondirect.php?username=' + username + '&size=medium" width="60" height="60" /><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>'+
+								'</div>', 256, 154);
+		else
+		label.openInfoWindowHtml('<div id="witw_wrapper">'+
+								'<img class="witw_icon" src="<?php echo $CONFIG->url ?>mod/profile/icondirect.php?username=' + username + '&size=medium" width="60" height="60" /><h1>' + displayname + '</h1>'+
+								'<p class="witw_location">' + location + '</p><p class="witw_title">' + title + '</p>'+
+									'<p class="witw_comment"></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="<?php echo $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="<?php echo $CONFIG->url ?>featured/husker/' + linkname + '/">Continue Reading...</a></p></div>', 256, 154);		
 };
-- 
GitLab