Registration Confirmation Page

More
13 years 11 months ago #2457 by sohopros
By geocoding you mean add value to the fields geoLat, geoLng on jos_comprofiler? It is adding value to these fields on registration and edit profile.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #2468 by sohopros
Where are you located? I am wondering if is possible to schedule a meeting through the internet with you. We use skype for voice and a software called gotomeeting for share screen.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #2502 by nordmograph
Hello
I'm in France but I don't use skype.
Here is a new potential update for the geocoder plugin php file, replace yours with this and let me know if anything gets better. It should get rid of a zipcode not being geocoded issue.

Let me know
Code:
<?php /** * @version Geommunity geocoder.php v1.0 * @author 2010/02/10 Adrien ROUSSEL * http://geommunity.nordmograph.com * Inspired by lanari and David Pollack * @package joomla! community builder * @subpackage Geommunity Geocoder * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ // ensure this file is being included by a parent file if ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); } // register geocoder function $_PLUGINS->registerFunction('onBeforeNewUser', 'geocodeAddress', 'geommunitygeocoder'); $_PLUGINS->registerFunction('onBeforeUserUpdate', 'geocodeAddress', 'geommunitygeocoder'); $_PLUGINS->registerFunction('onBeforeUserRegistration', 'geocodeAddress', 'geommunitygeocoder'); class geocoder { var $address = null; var $city = null; var $state = null; var $country = null; var $zipcode = null; var $latitude = null; var $longitude = null; function geocoder($geoData, $address='address', $city='city', $state='state', $country='country', $zipcode='zipcode', $lat='lat', $lng='lng') { $this->address = $geoData->$address; $this->city = $geoData->$city; $this->state = $geoData->$state; $this->country = $geoData->$country; $this->zipcode = $geoData->$zipcode; $this->latitude = $geoData->$lat; $this->longitude = $geoData->$lng; return true; } function geocodeAddress($option) { global $database; $query = trim($this->address).','.trim($this->city).','.trim($this->state).','.trim($this->zipcode).','.trim($this->country); $query = preg_replace('/^,|,$/', '', preg_replace('/(,)*/', '$1', $query)); //if (_ISO == 'charset=utf-8') $query = utf8_decode($query); $query = urlencode($query); $result = $this->googleGeocode($query); $lat = $result['lat']; $lng = $result['lng']; if ($lat == false && $lng == false) { $result = $this->yahooGeocode($query); $lat = $result['lat']; $lng = $result['lng']; } $this->longitude = $lng ? $lng : $this->longitude; $this->latitude = $lat ? $lat : $this->latitude; return true; } function googleGeocode($query) { $query = $this->sendGeoQuery('http://maps.google.com/maps/geo?output=csv&q='. $query); list($status, $accuracy, $lat, $lng) = explode(',', $query .',,,'); if ($lat == 0 && $lng == 0) $lat = $lng = ''; $result['lat'] = $lat; $result['lng'] = $lng; return $result; } function yahooGeocode($query) { $query = $this->sendGeoQuery('http://api.local.yahoo.com/MapsService/V1/geocode?appid=Yahoo&location='. $query); $query = trim(preg_replace('/(\s*<.*?>\s*)+/', ',', $query), ','); list($lat, $lng) = explode(',', $query .',,,'); $result['lat'] = $lat; $result['lng'] = $lng; return $result; } function sendGeoQuery($url=null, $content=null) { if (function_exists('curl_init')) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); $content = curl_exec($ch); curl_close($ch); } elseif (ini_get('allow_url_fopen')) { $timeout = ini_set('default_socket_timeout', 30); $fp = @fopen($url, 'r'); $content = @fread($fp, 4096); @fclose($fp); } return $content; } } class geommunitygeocoder extends cbTabHandler { function geocodeAddress($user,$cbUser) { $params = $this->params; $mode = $params->get('mode',0); $place = new geocoder($cbUser, $params->get('geoAddress','cb_address'), $params->get('geoCity','cb_city'), $params->get('geoState','cb_state'), $params->get('geoCountry','cb_country'), $params->get('geoZipcode','cb_zipcode'), $lat='geoLat', $lng='geoLng'); $place->geocodeAddress('Geommunity Geocoder'); if ( $mode==1 && ($cbUser->$lat == '' || $cbUser->$lng == '') ) { // on profile update and a missing coordinate $cbUser->$lat = $place->latitude ? $place->latitude : $cbUser->$lat; $cbUser->$lng = $place->longitude ? $place->longitude : $cbUser->$lng; } elseif( $mode==0 ){ // every profile update $cbUser->$lat = $place->latitude ? $place->latitude : $cbUser->$lat; $cbUser->$lng = $place->longitude ? $place->longitude : $cbUser->$lng; } } } ?>

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #2541 by sohopros
The file that you sent us did not work as well. Actually does not change too much from the one we already had.

Do you have any idea? Is it possible to schedule a web meeting with you, so you could show you the website and perhaps fix it.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #2561 by sohopros
How do we bring this to a conclusion??

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago - 13 years 10 months ago #2565 by nordmograph
Well, you are the only one to complain about this and it's been downloaded a lot (as this geocoder is free software). I can not reproduce your error ,and this latest version geocodes perfectly with any address combination. The only thing I can do is to help you if you provide me a ftp access. Email me credentials using the contact form from the footer menu below.

If you want to try a web appointmnet here is my msn, but we'll have to be lucky as we are probably 2 very busy ones msn:adroussel at free.fr

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.
Last edit: 13 years 10 months ago by nordmograph.

Please Log in or Create an account to join the conversation.

Time to create page: 0.340 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.