Changeset 4516
- Timestamp:
- 12/29/07 01:04:28 (1 year ago)
- Files:
-
- trunk/nuxleus/Source/Nuxleus.Geo/LatLongLocation/LatLongLocation.cs (modified) (2 diffs)
- trunk/nuxleus/Source/Nuxleus.Web/HttpHandler/NuxleusHttpSessionRequestHandler.cs (modified) (3 diffs)
- trunk/nuxleus/Web/Development/css/base.css (modified) (1 diff)
- trunk/nuxleus/Web/Development/css/base_993300-999999.css (modified) (1 diff)
- trunk/nuxleus/Web/Development/index.page (modified) (1 diff)
- trunk/nuxleus/Web/Development/page/controller/atomictalk/base.xsl (modified) (4 diffs)
- trunk/nuxleus/Web/Development/page/output/body/search/base.xml (modified) (1 diff)
- trunk/nuxleus/Web/Development/page/view/module/get-plugged-in.xml (modified) (1 diff)
- trunk/nuxleus/Web/Development/page/view/module/header/m/base.xml (modified) (1 diff)
- trunk/nuxleus/Web/Development/page/view/module/search/base.xml (modified) (2 diffs)
- trunk/nuxleus/Web/Development/page/view/search/base.xml (modified) (2 diffs)
- trunk/nuxleus/Web/Development/service/session/service.op (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/nuxleus/Source/Nuxleus.Geo/LatLongLocation/LatLongLocation.cs
r4482 r4516 47 47 set { m_locationArray = value; } 48 48 } 49 public LatLongLocation (string name)50 {51 m_locationArray = Parse(name);52 m_city = m_locationArray[0];53 m_country = m_locationArray[1];54 m_countryCode = m_locationArray[2];55 m_lat = m_locationArray[3];56 m_long = m_locationArray[4];57 }58 49 public LatLongLocation (string[] geoInfo) 59 50 { … … 70 61 return String.Join(delimiter, location.LocationArray); 71 62 } 72 73 public static string[] Parse (string name)74 {75 string[] geoInfoArray = new string[5];76 int maxRows = 1;77 78 XmlReader xGeoIPReader = XmlReader.Create(String.Format("http://ws.geonames.org/search?name={0}&maxRows={1}", name, maxRows));79 while (xGeoIPReader.Read())80 {81 if (xGeoIPReader.IsStartElement())82 {83 switch (xGeoIPReader.Name)84 {85 case "name":86 {87 geoInfoArray[0] = xGeoIPReader.ReadString();88 break;89 }90 case "countryName":91 {92 geoInfoArray[1] = xGeoIPReader.ReadString();93 break;94 }95 case "countryCode":96 {97 geoInfoArray[2] = xGeoIPReader.ReadString();98 break;99 }100 case "lat":101 {102 geoInfoArray[3] = xGeoIPReader.ReadString();103 break;104 }105 case "lng":106 {107 geoInfoArray[4] = xGeoIPReader.ReadString();108 break;109 }110 default:111 break;112 }113 }114 }115 return geoInfoArray;116 }117 63 } 118 64 } 119 trunk/nuxleus/Source/Nuxleus.Web/HttpHandler/NuxleusHttpSessionRequestHandler.cs
r4489 r4516 40 40 HttpCookieCollection cookieCollection = context.Request.Cookies; 41 41 String hostAddress = context.Request.UserHostAddress; 42 IPLocation location = new IPLocation();42 LatLongLocation location = new LatLongLocation(); 43 43 String guid = "not-set"; 44 44 String openid = "not-set"; … … 66 66 if (client.KeyExists(hostAddress)) 67 67 { 68 location = new IPLocation(((String)client.Get(hostAddress)).Split(new char[] { '|' }));68 location = new LatLongLocation(((String)client.Get(hostAddress)).Split(new char[] { '|' })); 69 69 } 70 70 else 71 71 { 72 72 location = GetIPLocation(hostAddress); 73 //client.Add(hostAddress, IPLocation.ToDelimitedString("|", location));73 //client.Add(hostAddress, LatLongLocation.ToDelimitedString("|", location)); 74 74 } 75 75 } … … 155 155 } 156 156 157 private IPLocation GetIPLocation (String hostAddress)157 private LatLongLocation GetIPLocation (String hostAddress) 158 158 { 159 IPLocation location = new IPLocation(hostAddress);159 LatLongLocation location = new LatLongLocation(); 160 160 161 //if (location.City.Contains("Unknown")) 162 //{ 163 Location maxMindLocation = m_lookupService.getLocation(hostAddress); 161 Location maxMindLocation = m_lookupService.getLocation(hostAddress); 164 162 165 try 166 { 167 location.City = maxMindLocation.city; 168 location.Country = maxMindLocation.countryName; 169 location.CountryCode = maxMindLocation.countryCode; 170 location.Lat = maxMindLocation.latitude.ToString(); 171 location.Long = maxMindLocation.longitude.ToString(); 172 } 173 catch (Exception e) 174 { 175 Console.WriteLine(e.Message); 176 } 177 return location; 178 //} 179 //else 180 //{ 181 // return location; 182 //} 163 try 164 { 165 location.City = maxMindLocation.city; 166 location.Country = maxMindLocation.countryName; 167 location.CountryCode = maxMindLocation.countryCode; 168 location.Lat = maxMindLocation.latitude.ToString(); 169 location.Long = maxMindLocation.longitude.ToString(); 170 } 171 catch (Exception e) 172 { 173 Console.WriteLine(e.Message); 174 } 175 176 return location; 183 177 } 184 178 } trunk/nuxleus/Web/Development/css/base.css
r4463 r4516 295 295 margin:0; 296 296 padding:0 1em; 297 border-right:1px dotted #669900;298 border-left:1px dotted #669900; 297 /* border-right:1px dotted #669900; 298 border-left:1px dotted #669900; */ 299 299 width:auto; 300 300 } trunk/nuxleus/Web/Development/css/base_993300-999999.css
r4296 r4516 52 52 } 53 53 #center { 54 border-right:1px dotted #333;55 border-left:1px dotted #333; 54 /* border-right:1px dotted #333; 55 border-left:1px dotted #333; */ 56 56 } 57 57 #info { trunk/nuxleus/Web/Development/index.page
r4499 r4516 15 15 <page:output> 16 16 <page:head src="/page/output/head/base.xml"/> 17 <!-- <page:include fileType="javascript" src="http://maps.google.com/maps?file=api&v=2&key=@@google.maps.key@@"/> 18 </page:head> --> 17 19 <page:body src="/page/output/body/search/base.xml" /> 18 20 </page:output> trunk/nuxleus/Web/Development/page/controller/atomictalk/base.xsl
r4510 r4516 51 51 <xsl:variable name="view" select="document($page/page:view/@src)/page:config|$page/page:view"/> 52 52 53 < xsl:variable name="search.location">53 <!-- <xsl:variable name="search.location"> 54 54 <xsl:call-template name="replace"> 55 55 <xsl:with-param name="string" select="'@@search.location@@'"/> … … 69 69 <xsl:variable name="local-flickr-images" select="document(concat('/service/flickr/return-images-by-tag-name/?topic=music%7Cfilm%7Cmovie&location=', translate($city.location, ' ', '+')))//response:result"/> 70 70 <xsl:variable name="local-blog-entries" select="document(concat('/service/google/return-blog-entries-by-location/?topic=music%7Cfilm%7Cmovie&location=', translate($city.location, ' ', '+')))//response:result"/> 71 <!-- <xsl:variable name="geo.location" select="document(concat('/service/geo/get-geo-info-by-city-name/?name=', translate($city.location, ' ', '+')))/response:message/response:geo"/>-->71 --><!-- <xsl:variable name="geo.location" select="document(concat('/service/geo/get-geo-info-by-city-name/?name=', translate($city.location, ' ', '+')))/response:message/response:geo"/>--> 72 72 <xsl:variable name="navigation" select="$session-info/response:navigation"/> 73 73 … … 249 249 250 250 <xsl:template match="geo:map"> 251 < !-- <script type="text/javascript">251 <script type="text/javascript"> 252 252 <xsl:text>//<![CDATA[</xsl:text> 253 253 function load() { 254 254 if (GBrowserIsCompatible()) { 255 255 var map = new GMap2(document.getElementById("map")); 256 map.setCenter(new GLatLng(<xsl:value-of select="$ geo.location//response:lat"/>, <xsl:value-of select="$geo.location//response:long"/>), 9);256 map.setCenter(new GLatLng(<xsl:value-of select="$lat"/>, <xsl:value-of select="$long"/>), 9); 257 257 } 258 258 } 259 259 <xsl:text>//]]></xsl:text> 260 </script> -->260 </script> 261 261 <div id="map" style="width:{@width}; height:{@height};margin:0;padding:0;" /> 262 262 </xsl:template> … … 290 290 </xsl:choose> 291 291 </xsl:variable> --> 292 < xsl:apply-templates select="$local-news-doc/response:*[local-name() = current()/@topic]" mode="message"/>292 <!-- <xsl:apply-templates select="$local-news-doc/response:*[local-name() = current()/@topic]" mode="message"/> --> 293 293 </xsl:template> 294 294 295 295 <xsl:template match="doc:local-flickr-photos"> 296 < xsl:apply-templates select="$local-flickr-images/response:*[local-name() = current()/@topic]" mode="flickr"/>296 <!-- <xsl:apply-templates select="$local-flickr-images/response:*[local-name() = current()/@topic]" mode="flickr"/> --> 297 297 </xsl:template> 298 298 299 299 <xsl:template match="doc:local-blog-entries"> 300 < xsl:apply-templates select="$local-blog-entries/response:*[local-name() = current()/@topic]" mode="blogs"/>300 <!-- <xsl:apply-templates select="$local-blog-entries/response:*[local-name() = current()/@topic]" mode="blogs"/> --> 301 301 </xsl:template> 302 302 trunk/nuxleus/Web/Development/page/output/body/search/base.xml
r4499 r4516 1 1 <?xml version="1.0"?> 2 2 <page:body xmlns:page="http://atomictalk.org/page" xmlns:body="http://atomictalk.org/page/output/body"> 3 <body:onload action="GetMap()"/>4 <!-- <body:onunload action="GUnload()"/> -->5 3 <body:layout xmlns:view="http://atomictalk.org/page/view"> 6 4 <layout:view xmlns:layout="http://atomictalk.org/page/view/layout"> trunk/nuxleus/Web/Development/page/view/module/get-plugged-in.xml
r4450 r4516 3 3 <view:container type="xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:view="http://atomictalk.org/page/view"> 4 4 <view:item id="icon"> 5 <img style="margin-bottom:-7px" src="/images/ Amp.FM.png" height="80" width="400"/>5 <img style="margin-bottom:-7px" src="/images/amplogo5.png" height="110" width="450"/> 6 6 <span style="font-size:14pt; color:#999;margin-left:.2em;">to <span style="font-size:28pt; color:#CC0000;"><geo:location id="current-region" value="|$$test:@@search.location@@IfTrue:@@search.location@@IfFalse:@@current-location.label@@$$|"/> 7 7 </span> trunk/nuxleus/Web/Development/page/view/module/header/m/base.xml
r4463 r4516 6 6 <view:item id="get-plugged-in" style="width" src="/page/view/module/get-plugged-in.xml"/> 7 7 <view:item id="search-module" style="width" src="/page/view/search/base.xml"/> 8 < view:item id="quick-view-module" style="width" src="/page/view/quick-view/base.xml"/>8 <!-- <view:item id="quick-view-module" style="width" src="/page/view/quick-view/base.xml"/> --> 9 9 </view:container> 10 10 </view:module> trunk/nuxleus/Web/Development/page/view/module/search/base.xml
r4499 r4516 1 1 <?xml version="1.0"?> 2 2 <view:module class="base" id="instance" xmlns="http://www.w3.org/1999/xhtml" xmlns:geo="http://nuxleus.com/geo" xmlns:doc="http://atomictalk.org/feed/doc" xmlns:view="http://atomictalk.org/page/view"> 3 <view:container id="content" style="base list LtoR width"> 4 <view:item id="left"> 5 <view:container> 6 <h4><geo:location value="|$$test:@@search.location@@IfTrue:@@search.location@@IfFalse:@@current-location.label@@$$|"/> Music News</h4> 7 <!-- <view:item src="/page/view/module/adsense/160x600.xml"/> --> 8 <view:item> 9 <doc:local-news topic="music" location="@@search.location@@"/> 10 </view:item> 11 </view:container> 12 </view:item> 3 <!-- <view:container id="content" style="base list LtoR width"> 13 4 <view:item id="center"> 14 5 <view:container> … … 18 9 </h1> 19 10 </view:item> 20 <h2>Recent Music-related Blog Entries</h2> 21 <doc:local-blog-entries topic="music"/> 22 <h2>Recent Music-related Photos via flickr</h2> 23 <doc:local-flickr-photos topic="music"/> 24 <!-- <hr/> 25 <view:item id="unboxed" src="/page/view/module/footer/base.xml"/> 26 <hr/> --> 27 <hr/> 28 <!-- <view:item id="top-keyword" src="/page/view/module/adsense/728x90.xml"/> --> 29 <hr/> 30 <h2>Recent Film-related Blog Entries</h2> 31 <doc:local-blog-entries topic="film"/> 32 <!-- <view:item> 33 <SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822/US/xsltblogcom-20/8006/a1d96271-c402-4f78-ae9c-b59e2f162795"></SCRIPT> 34 <NOSCRIPT> 35 <A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fxsltblogcom-20%2F8006%2Fa1d96271-c402-4f78-ae9c-b59e2f162795&Operation=NoScript">Amazon.com Widgets</A> 36 </NOSCRIPT> 37 </view:item> --> 38 <hr/> 39 <h2>Recent Film-related Photos via flickr</h2> 40 <doc:local-flickr-photos topic="film"/> 11 <doc:local-news topic="music" location="@@search.location@@"/> 41 12 </view:container> 42 13 </view:item> 43 <view:item id="right"> 44 <!-- <view:container> 45 <view:item> 46 <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_62087de2-b8a2-47dc-b105-0a70448e5cfe" WIDTH="160px" HEIGHT="200px"> 47 <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fxsltblogcom-20%2F8009%2F62087de2-b8a2-47dc-b105-0a70448e5cfe&Operation=GetDisplayTemplate"/> 48 <PARAM NAME="quality" VALUE="high"/> 49 <PARAM NAME="bgcolor" VALUE="#FFFFFF"/> 50 <PARAM NAME="allowscriptaccess" VALUE="always"/> 51 <embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fxsltblogcom-20%2F8009%2F62087de2-b8a2-47dc-b105-0a70448e5cfe&Operation=GetDisplayTemplate" id="Player_62087de2-b8a2-47dc-b105-0a70448e5cfe" quality="high" bgcolor="#ffffff" name="Player_62087de2-b8a2-47dc-b105-0a70448e5cfe" allowscriptaccess="always" type="application/x-shockwave-flash" align="middle" height="400px" width="160px"/> 52 </OBJECT> 53 <NOSCRIPT> 54 <A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fxsltblogcom-20%2F8009%2F62087de2-b8a2-47dc-b105-0a70448e5cfe&Operation=NoScript">Amazon.com Widgets</A> 55 </NOSCRIPT> 56 </view:item> 57 </view:container> --> 58 <view:container> 59 <view:item> 60 <h4><geo:location value="|$$test:@@search.location@@IfTrue:@@search.location@@IfFalse:@@current-location.label@@$$|"/> Film News</h4> 61 <doc:local-news topic="film" location="@@search.location@@"/> 62 </view:item> 63 </view:container> 64 </view:item> 65 </view:container> 14 </view:container> --> 66 15 </view:module> trunk/nuxleus/Web/Development/page/view/search/base.xml
r4499 r4516 1 1 <?xml version="1.0"?> 2 2 <view:container id="search-box-container" type="xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:view="http://atomictalk.org/page/view"> 3 <view:item id="search-box" style="transparency-90">3 <view:item id="search-box"> 4 4 <form id="search-form" method="get" action="/summary" target="_top"> 5 5 <input id="search-text" class="single-input" type="text" name="search" maxlength="255"/> … … 9 9 </form> 10 10 </view:item> 11 <!-- <view:item id="search-categories">12 <view:container id="search-categories-container" style="list LtoR">13 <view:item style="selected">14 <a href="#foo">Regions</a>15 </view:item>16 <view:item>17 <a href="#foo">Artists</a>18 </view:item>19 <view:item>20 <a href="#foo">Events</a>21 </view:item>22 <view:item>23 <a href="#foo">Genre</a>24 </view:item>25 <view:item>26 <a href="#foo">Charts</a>27 </view:item>28 <view:item>29 <a href="#foo">On This Page</a>30 </view:item>31 <view:item>32 <a href="#foo">Everything</a>33 </view:item>34 </view:container>35 </view:item> -->36 11 </view:container> trunk/nuxleus/Web/Development/service/session/service.op
r4395 r4516 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <?xml-stylesheet type="text/xsl" href="/transform/base.xslt"?> 3 <service:operation use-clientside-xslt="/ transform/openid-redirect.xsl" xmlns:profile="http://nuxleus.com/profile" xmlns:at="http://atomictalk.org" xmlns:metadata="http://xameleon.org/service/metadata" xmlns:header="http://xameleon.org/service/http/header" xmlns:service="http://xameleon.org/service" xmlns:operation="http://xameleon.org/service/operation" xmlns:aws="http://xameleon.org/function/aws" xmlns:s3="http://xameleon.org/function/aws/s3" xmlns:param="http://xameleon.org/service/session/param">3 <service:operation use-clientside-xslt="/service/transform/openid-redirect.xsl" xmlns:profile="http://nuxleus.com/profile" xmlns:at="http://atomictalk.org" xmlns:metadata="http://xameleon.org/service/metadata" xmlns:header="http://xameleon.org/service/http/header" xmlns:service="http://xameleon.org/service" xmlns:operation="http://xameleon.org/service/operation" xmlns:aws="http://xameleon.org/function/aws" xmlns:s3="http://xameleon.org/function/aws/s3" xmlns:param="http://xameleon.org/service/session/param"> 4 4 <param:s3-bucket-name>session.amp.fm</param:s3-bucket-name> 5 5 <param:s3-folder-name>{cookie:openid}</param:s3-folder-name>
