r7219 - in dumbhippo/trunk/server: src/com/dumbhippo/persistence src/com/dumbhippo/server/impl src/com/dumbhippo/web/pages web/css3 web/images3 web/images3/features_page_samples web/jsp3 web/tags/2 web/tags/3



Author: marinaz
Date: 2008-01-16 16:32:40 -0600 (Wed, 16 Jan 2008)
New Revision: 7219

Added:
   dumbhippo/trunk/server/src/com/dumbhippo/web/pages/FeaturesPage.java
   dumbhippo/trunk/server/web/images3/features_page_samples/mugshot_on_facebook.png
Removed:
   dumbhippo/trunk/server/web/images3/mugshot_on_facebook.png
Modified:
   dumbhippo/trunk/server/src/com/dumbhippo/persistence/ExternalAccountType.java
   dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java
   dumbhippo/trunk/server/src/com/dumbhippo/web/pages/BookmarkPage.java
   dumbhippo/trunk/server/web/css3/styled-form.css
   dumbhippo/trunk/server/web/jsp3/features.jsp
   dumbhippo/trunk/server/web/tags/2/formTableRow.tag
   dumbhippo/trunk/server/web/tags/3/accountEditTableExternals.tag
Log:
Advertise Facebook application on the account page and on the features page.

Modified: dumbhippo/trunk/server/src/com/dumbhippo/persistence/ExternalAccountType.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/persistence/ExternalAccountType.java	2008-01-16 22:04:11 UTC (rev 7218)
+++ dumbhippo/trunk/server/src/com/dumbhippo/persistence/ExternalAccountType.java	2008-01-16 22:32:40 UTC (rev 7219)
@@ -308,6 +308,11 @@
 		public String getSupportType() {
 			return " get new messages, wall messages, pokes or when you are tagged in new photos (some updates are only for you to see)";
 		}
+		
+		@Override 
+		public boolean isNew() {
+			return true;
+		}
 	},
 	ORKUT("Orkut")  { // 5
 		@Override
@@ -976,11 +981,6 @@
 			return handle != null;
 		}
 		
-		@Override 
-		public boolean isNew() {
-			return true;
-		}
-		
 		@Override
 		public ExternalAccountInfoSource getInfoSource() {
 			return ExternalAccountInfoSource.LINK;
@@ -1058,11 +1058,6 @@
 				return count + " albums";
 		}
 		
-		@Override 
-		public boolean isNew() {
-			return true;
-		}
-		
 		@Override
 		public String getSupportType() {
 			return "add new albums";
@@ -1120,12 +1115,7 @@
 		public boolean getHasAccountInfo(String handle, String extra) {
 			return handle != null;
 		}
-		
-		@Override 
-		public boolean isNew() {
-			return true;
-		}
-		
+
 		@Override
 		public ExternalAccountInfoSource getInfoSource() {
 			return ExternalAccountInfoSource.LINK;

Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java	2008-01-16 22:04:11 UTC (rev 7218)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java	2008-01-16 22:32:40 UTC (rev 7219)
@@ -698,13 +698,13 @@
 		// <fb:action> tag doesn't work inside <fb:visible-to-owner>,
 		// so we need to use the following barbaric methods to right align the 'Edit Account' action 
 		fbmlSb.append("<fb:wide>");	
-		for (int i=1; i<=33; i++ ) {
+		for (int i=1; i<=37; i++ ) {
 		    fbmlSb.append("&nbsp;");
 		}
 		fbmlSb.append("</fb:wide>");	
         		
 		fbmlSb.append("<fb:narrow>");	
-		for (int i=1; i<=2; i++ ) {
+		for (int i=1; i<=9; i++ ) {
 		    fbmlSb.append("&nbsp;");
 		}
 		fbmlSb.append("</fb:narrow>");

Modified: dumbhippo/trunk/server/src/com/dumbhippo/web/pages/BookmarkPage.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/web/pages/BookmarkPage.java	2008-01-16 22:04:11 UTC (rev 7218)
+++ dumbhippo/trunk/server/src/com/dumbhippo/web/pages/BookmarkPage.java	2008-01-16 22:32:40 UTC (rev 7219)
@@ -4,7 +4,6 @@
 
 import com.dumbhippo.GlobalSetup;
 import com.dumbhippo.server.Configuration;
-import com.dumbhippo.server.HippoProperty;
 import com.dumbhippo.web.Browser;
 import com.dumbhippo.web.BrowserBean;
 import com.dumbhippo.web.Signin;

Added: dumbhippo/trunk/server/src/com/dumbhippo/web/pages/FeaturesPage.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/web/pages/FeaturesPage.java	2008-01-16 22:04:11 UTC (rev 7218)
+++ dumbhippo/trunk/server/src/com/dumbhippo/web/pages/FeaturesPage.java	2008-01-16 22:32:40 UTC (rev 7219)
@@ -0,0 +1,22 @@
+package com.dumbhippo.web.pages;
+
+import org.slf4j.Logger;
+
+import com.dumbhippo.GlobalSetup;
+import com.dumbhippo.server.FacebookSystem;
+import com.dumbhippo.web.WebEJBUtil;
+
+public class FeaturesPage {
+	@SuppressWarnings("unused")
+	static private final Logger logger = GlobalSetup.getLogger(FeaturesPage.class);
+
+	private FacebookSystem facebookSystem;
+	
+	public FeaturesPage() {
+		facebookSystem =  WebEJBUtil.defaultLookup(FacebookSystem.class);
+	}
+	
+    public String getFacebookApiKey() {
+        return facebookSystem.getApiKey();
+    }
+}
\ No newline at end of file

Modified: dumbhippo/trunk/server/web/css3/styled-form.css
===================================================================
--- dumbhippo/trunk/server/web/css3/styled-form.css	2008-01-16 22:04:11 UTC (rev 7218)
+++ dumbhippo/trunk/server/web/css3/styled-form.css	2008-01-16 22:32:40 UTC (rev 7219)
@@ -25,6 +25,10 @@
     font-weight: bold;
 }
 
-.dh-form-table .dh-info-cell {
+.dh-form-table .dh-info-cell, .dh-form-table .dh-info-cell a:link, .dh-form-table .dh-info-cell a:visited {
 	color:			#9648BC;
 }
+
+.dh-form-table .dh-info-cell a:hover {
+    color:          #8007BC; /* this looks better than text-decoration: underline; */
+}
\ No newline at end of file

Copied: dumbhippo/trunk/server/web/images3/features_page_samples/mugshot_on_facebook.png (from rev 7218, dumbhippo/trunk/server/web/images3/mugshot_on_facebook.png)

Deleted: dumbhippo/trunk/server/web/images3/mugshot_on_facebook.png
===================================================================
(Binary files differ)

Modified: dumbhippo/trunk/server/web/jsp3/features.jsp
===================================================================
--- dumbhippo/trunk/server/web/jsp3/features.jsp	2008-01-16 22:04:11 UTC (rev 7218)
+++ dumbhippo/trunk/server/web/jsp3/features.jsp	2008-01-16 22:32:40 UTC (rev 7219)
@@ -5,6 +5,9 @@
 <%@ taglib tagdir="/WEB-INF/tags/2" prefix="dht" %>
 <%@ taglib tagdir="/WEB-INF/tags/3" prefix="dht3" %>
 
+
+<dh:bean id="features" class="com.dumbhippo.web.pages.FeaturesPage" scope="page"/>
+
 <head>
 	<title>Mugshot Features</title>
 	<dht3:stylesheet name="site" iefixes="true"/>	
@@ -158,7 +161,7 @@
 								 tipIconWidth="250"
 								 tipIconHeight="180"
 								 tipText="Put the mini on your own website">
-			    On your blog or Web page: using <a href="/badges">Mugshot Mini</a> and <a href="/radar-learnmore">Music Radar</a> widgets								 
+			    On your blog or Web page: using the <a href="/badges">Mugshot Mini</a> widget							 
 			  </dht3:featuresItem>
 			</tr>		
 			<tr>
@@ -179,6 +182,24 @@
 			    On your Google Desktop and home page: using the <a href="/google-stacker">Mugshot Google Gadget</a>
 			  </dht3:featuresItem>
 			</tr>	
+			<tr>
+			  <dht3:featuresItem prefix="Facebook"
+			                     icon="favicon_facebook.png"
+			                     tipIcon="mugshot_on_facebook.png"
+			                     tipIconWidth="396"
+			                     tipIconHeight="208"
+			                     tipText="Show your activity on Facebook">
+			    On Facebook: using the <a target="_blank" href="http://www.facebook.com/add.php?api_key=${features.facebookApiKey}";>Mugshot application</a>
+			  </dht3:featuresItem>
+			  <dht3:featuresItem prefix="MusicRadar"
+			                     icon="musicradar_icon.png"
+								 tipIcon="music_radar.png"
+								 tipIconWidth="300"
+								 tipIconHeight="82"
+								 tipText="Display the music you are playing">
+			    On MySpace or any Web page: using the <a href="/radar-learnmore">Music Radar</a> widget								 
+			  </dht3:featuresItem>
+			</tr>	
 			<tr><td colspan="4" class="dh-spacer-row"></td></tr>
 			<tr class="dh-features-list-section">
 			<td class="dh-features-list-header" colspan="4">It's free, fun, and easy to use.</td>

Modified: dumbhippo/trunk/server/web/tags/2/formTableRow.tag
===================================================================
--- dumbhippo/trunk/server/web/tags/2/formTableRow.tag	2008-01-16 22:04:11 UTC (rev 7218)
+++ dumbhippo/trunk/server/web/tags/2/formTableRow.tag	2008-01-16 22:32:40 UTC (rev 7219)
@@ -8,6 +8,7 @@
 <%@ attribute name="prefixIconWidth" required="false" type="java.lang.Integer" %>
 <%@ attribute name="prefixIconHeight" required="false" type="java.lang.Integer" %>
 <%@ attribute name="info" required="false" type="java.lang.String" %>
+<%@ attribute name="infoLink" required="false" type="java.lang.String" %>
 <%@ attribute name="altRow" required="false" type="java.lang.Boolean" %>
 <%@ attribute name="controlId" required="false" type="java.lang.String" %>
 
@@ -41,7 +42,16 @@
 	<c:choose>
 	    <c:when test="${!empty info}">
 	        <td class="dh-control-cell dh-control-cell-next-to-info"><div class="dh-control-cell-div"><jsp:doBody/></div></td>
-	        <td class="dh-info-cell"><c:out value="${info}"/></td>
+	        <td class="dh-info-cell">
+	        <c:choose>
+	            <c:when test="${!empty infoLink}">
+	                <a target="_blank" href="${infoLink}"><c:out value="${info}"/></a>
+	            </c:when>
+	            <c:otherwise>
+	                <c:out value="${info}"/>
+	            </c:otherwise>
+	        </c:choose>    	        
+	        </td>
 	    </c:when>
 	    <c:otherwise>
 	        <td colspan="2" class="dh-control-cell">

Modified: dumbhippo/trunk/server/web/tags/3/accountEditTableExternals.tag
===================================================================
--- dumbhippo/trunk/server/web/tags/3/accountEditTableExternals.tag	2008-01-16 22:04:11 UTC (rev 7218)
+++ dumbhippo/trunk/server/web/tags/3/accountEditTableExternals.tag	2008-01-16 22:32:40 UTC (rev 7219)
@@ -140,6 +140,8 @@
 		</dht2:formTableRow>
 		<c:forEach items="${account.supportedAccounts.list}"
 			var="supportedAccount">
+			<c:set var="facebookAppInfo" value=""/>
+			<c:set var="facebookAppInfoLink" value=""/>
 			<c:if test="${supportedAccount.siteName == 'Facebook'}">
 				<tr valign="top">
 				<td colspan="3">
@@ -153,9 +155,11 @@
 					<c:when test="${account.facebookAuthToken != null}">
 						<div id="dhFacebookNote">Thank you for logging in to Facebook! You will now be getting Facebook updates.</div>
 					</c:when>
-				</c:choose>
+				</c:choose>				
 				</td>
 				</tr>
+				<c:set var="facebookAppInfo" value="Check out Mugshot application on Facebook!"/>
+				<c:set var="facebookAppInfoLink" value="http://www.facebook.com/add.php?api_key=${account.facebookApiKey}"/>
 			</c:if>
 			<c:set var="prefixIcon" value="" />
 			<c:set var="prefixIconWidth" value="" />
@@ -164,10 +168,12 @@
 				<c:set var="prefixIcon" value="/images3/${buildStamp}/new_icon.png" />
 				<c:set var="prefixIconWidth" value="31" />
 				<c:set var="prefixIconHeight" value="10" />
-			</c:if>
+			</c:if>			
 			<dht2:formTableRow controlId="dh${supportedAccount.domNodeIdName}"
-				label="${supportedAccount.siteName}"
+				label="${supportedAccount.siteName}"				
 				icon="/images3/${buildStamp}/${supportedAccount.iconName}"
+				info="${facebookAppInfo}"
+				infoLink ="${facebookAppInfoLink}" 
 				prefixIcon="${prefixIcon}" prefixIconWidth="${prefixIconWidth}"
 				prefixIconHeight="${prefixIconHeight}">
 				<c:choose>



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