Changeset 4516

Show
Ignore:
Timestamp:
12/29/07 01:04:28 (1 year ago)
Author:
xmlhacker
Message:

various updates

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/nuxleus/Source/Nuxleus.Geo/LatLongLocation/LatLongLocation.cs

    r4482 r4516  
    4747            set { m_locationArray = value; } 
    4848        } 
    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         } 
    5849        public LatLongLocation (string[] geoInfo) 
    5950        { 
     
    7061            return String.Join(delimiter, location.LocationArray); 
    7162        } 
    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         } 
    11763    } 
    11864} 
    119  
  • trunk/nuxleus/Source/Nuxleus.Web/HttpHandler/NuxleusHttpSessionRequestHandler.cs

    r4489 r4516  
    4040                HttpCookieCollection cookieCollection = context.Request.Cookies; 
    4141                String hostAddress = context.Request.UserHostAddress; 
    42                 IPLocation location = new IPLocation(); 
     42                LatLongLocation location = new LatLongLocation(); 
    4343                String guid = "not-set"; 
    4444                String openid = "not-set"; 
     
    6666                    if (client.KeyExists(hostAddress)) 
    6767                    { 
    68                         location = new IPLocation(((String)client.Get(hostAddress)).Split(new char[] { '|' })); 
     68                        location = new LatLongLocation(((String)client.Get(hostAddress)).Split(new char[] { '|' })); 
    6969                    } 
    7070                    else 
    7171                    { 
    7272                        location = GetIPLocation(hostAddress); 
    73                         //client.Add(hostAddress, IPLocation.ToDelimitedString("|", location)); 
     73                        //client.Add(hostAddress, LatLongLocation.ToDelimitedString("|", location)); 
    7474                    } 
    7575                } 
     
    155155        } 
    156156 
    157         private IPLocation GetIPLocation (String hostAddress) 
     157        private LatLongLocation GetIPLocation (String hostAddress) 
    158158        { 
    159             IPLocation location = new IPLocation(hostAddress); 
     159            LatLongLocation location = new LatLongLocation(); 
    160160 
    161             //if (location.City.Contains("Unknown")) 
    162             //{ 
    163                 Location maxMindLocation = m_lookupService.getLocation(hostAddress); 
     161            Location maxMindLocation = m_lookupService.getLocation(hostAddress); 
    164162 
    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; 
    183177        } 
    184178    } 
  • trunk/nuxleus/Web/Development/css/base.css

    r4463 r4516  
    295295    margin:0; 
    296296    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; */ 
    299299    width:auto; 
    300300} 
  • trunk/nuxleus/Web/Development/css/base_993300-999999.css

    r4296 r4516  
    5252} 
    5353#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; */ 
    5656} 
    5757#info { 
  • trunk/nuxleus/Web/Development/index.page

    r4499 r4516  
    1515    <page:output> 
    1616      <page:head src="/page/output/head/base.xml"/> 
     17        <!-- <page:include fileType="javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=@@google.maps.key@@"/> 
     18      </page:head> --> 
    1719      <page:body src="/page/output/body/search/base.xml" /> 
    1820    </page:output> 
  • trunk/nuxleus/Web/Development/page/controller/atomictalk/base.xsl

    r4510 r4516  
    5151  <xsl:variable name="view" select="document($page/page:view/@src)/page:config|$page/page:view"/> 
    5252 
    53   <xsl:variable name="search.location"> 
     53  <!-- <xsl:variable name="search.location"> 
    5454    <xsl:call-template name="replace"> 
    5555      <xsl:with-param name="string" select="'@@search.location@@'"/> 
     
    6969  <xsl:variable name="local-flickr-images" select="document(concat('/service/flickr/return-images-by-tag-name/?topic=music%7Cfilm%7Cmovie&amp;location=', translate($city.location, ' ', '+')))//response:result"/> 
    7070  <xsl:variable name="local-blog-entries" select="document(concat('/service/google/return-blog-entries-by-location/?topic=music%7Cfilm%7Cmovie&amp;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"/>--> 
    7272  <xsl:variable name="navigation" select="$session-info/response:navigation"/> 
    7373 
     
    249249 
    250250  <xsl:template match="geo:map"> 
    251     <!-- <script type="text/javascript"> 
     251    <script type="text/javascript"> 
    252252      <xsl:text>//&lt;![CDATA[</xsl:text> 
    253253          function load() { 
    254254            if (GBrowserIsCompatible()) { 
    255255              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); 
    257257            } 
    258258          } 
    259259        <xsl:text>//]]&gt;</xsl:text> 
    260     </script> --> 
     260    </script> 
    261261    <div id="map" style="width:{@width}; height:{@height};margin:0;padding:0;" /> 
    262262  </xsl:template> 
     
    290290      </xsl:choose> 
    291291    </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"/> --
    293293  </xsl:template> 
    294294 
    295295  <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"/> --
    297297  </xsl:template> 
    298298 
    299299  <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"/> --
    301301  </xsl:template> 
    302302 
  • trunk/nuxleus/Web/Development/page/output/body/search/base.xml

    r4499 r4516  
    11<?xml version="1.0"?> 
    22<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()"/> --> 
    53  <body:layout xmlns:view="http://atomictalk.org/page/view"> 
    64    <layout:view xmlns:layout="http://atomictalk.org/page/view/layout"> 
  • trunk/nuxleus/Web/Development/page/view/module/get-plugged-in.xml

    r4450 r4516  
    33  <view:container type="xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:view="http://atomictalk.org/page/view"> 
    44    <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"/> 
    66      <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@@$$|"/> 
    77        </span> 
  • trunk/nuxleus/Web/Development/page/view/module/header/m/base.xml

    r4463 r4516  
    66    <view:item id="get-plugged-in" style="width" src="/page/view/module/get-plugged-in.xml"/> 
    77    <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"/> --
    99  </view:container> 
    1010</view:module> 
  • trunk/nuxleus/Web/Development/page/view/module/search/base.xml

    r4499 r4516  
    11<?xml version="1.0"?> 
    22<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"> 
    134    <view:item id="center"> 
    145      <view:container> 
     
    189          </h1> 
    1910        </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&amp;MarketPlace=US&amp;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&amp;MarketPlace=US&amp;ID=V20070822%2FUS%2Fxsltblogcom-20%2F8006%2Fa1d96271-c402-4f78-ae9c-b59e2f162795&amp;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@@"/> 
    4112      </view:container> 
    4213    </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&amp;MarketPlace=US&amp;ID=V20070822%2FUS%2Fxsltblogcom-20%2F8009%2F62087de2-b8a2-47dc-b105-0a70448e5cfe&amp;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&amp;MarketPlace=US&amp;ID=V20070822%2FUS%2Fxsltblogcom-20%2F8009%2F62087de2-b8a2-47dc-b105-0a70448e5cfe&amp;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&amp;MarketPlace=US&amp;ID=V20070822%2FUS%2Fxsltblogcom-20%2F8009%2F62087de2-b8a2-47dc-b105-0a70448e5cfe&amp;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> --> 
    6615</view:module> 
  • trunk/nuxleus/Web/Development/page/view/search/base.xml

    r4499 r4516  
    11<?xml version="1.0"?> 
    22<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"
    44    <form id="search-form" method="get" action="/summary" target="_top"> 
    55      <input id="search-text" class="single-input" type="text" name="search" maxlength="255"/> 
     
    99    </form> 
    1010  </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> --> 
    3611</view:container> 
  • trunk/nuxleus/Web/Development/service/session/service.op

    r4395 r4516  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<?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"> 
    44  <param:s3-bucket-name>session.amp.fm</param:s3-bucket-name> 
    55  <param:s3-folder-name>{cookie:openid}</param:s3-folder-name>