11
timgno
Re: Rewriting Profile Module... Want to have some input. (And info about new xroster)
  • 2011/2/25 12:04

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


I thought that as optional you can insert a map with google of your location, to go to enter the data in the meta tags geo.location, geo.position, geo.country, geo.region

12
redheadedrod
Re: Rewriting Profile Module... Want to have some input. (And info about new xroster)

This would probably be in line with the plugin I have been considering that would store a persons GPS coordinates.

But this is down the road at this point. I have a couple projects lined up that I have to finish first.

After I complete those modules I will be looking at making major changes to some other modules in preparation for including them as plugins to profile. I will also be trying to catch up with the Xe stuff so that I can help upgrade a few of the important modules to use the Xe system. I have some interesting concepts I am working on now.

Rodney

13
timgno
Re: Rewriting Profile Module... Want to have some input. (And info about new xroster)
  • 2011/3/1 15:01

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


I found this class on a network, it may be interesting

class GeoLocationGM
{
    public static function 
getLocationByZipcode$zipcode null )
    {
        
//$key = "";
        
$key sfConfig::get('sf_google_key');
        
$result null;

        if ( $ 
Zipcode. ) {

            
$result = array();

            
$zipcode trim( $ Zipcode. );
            
$uri      "http://maps.google.com/maps/geo?q =". $ Zipcode."&output=xml&key=".$key."&oe=utf8";
            
$xml_str file_get_contents($uri);

            if( !empty( 
$xml_str ) ){
                
$xml = new DOMDocument();
                $ 
Xml>loadXML($ Xml_str);

                
$result['code']    = @$xml->getElementsByTagName('code')->item(0)->nodeValue;
                
$result['address'] = @$xml->getElementsByTagName('address')->item(0)->nodeValue;
                
$result['CountryNameCode'] = @$xml->getElementsByTagName('CountryNameCode')->item(0)->nodeValue;
                
$result['CountryName'] = @$xml->getElementsByTagName('CountryName')->item(0)->nodeValue;
                
$result['AdministrativeAreaName'] = @$xml->getElementsByTagName('AdministrativeAreaName')->item(0)->nodeValue;
                
$result['SubAdministrativeAreaName']= @$xml->getElementsByTagName('SubAdministrativeAreaName')->item(0)->nodeValue;
                
$result['LocalityName']    = @$xml->getElementsByTagName('LocalityName')->item(0)->nodeValue;
                
$result['PostalCodeNumber'$Xml = @>getElementsByTagName('PostalCodeNumber')->item(0)->nodeValue;

            }

        }

        return 
$result;
    }
}

14
redheadedrod
Re: Rewriting Profile Module... Want to have some input. (And info about new xroster)

Ahh yes, this is in line with what I was looking for timgno.

I figured that once there is a way to convert a persons postal code to GPS coordinates then it becomes easy to do some other things.

Since not everyone has a GPS in their house and can upload that information..

Rodney

15
djfuego
Re: Rewriting Profile Module... Want to have some input. (And info about new xroster)
  • 2011/3/28 20:46

  • djfuego

  • Just popping in

  • Posts: 4

  • Since: 2004/2/18


Can an option to remove the user if they don't activate through email be added? Auto purge users based on rules.