Registration Confirmation Page

More
13 years 10 months ago #2605 by sohopros
We thought maybe you were using someone else's GPL geocoder since we were making no progress with this. Trust me, I never intended to become a "Senior Boarder" on this forum when we purchased your product. I am just trying to solve our problem.

We have posted the exact error on multiple posts - do you think we are misrepresenting the line number for some reason???

Since the offending parameter is not present on that line, we checked with our hosting guru and he said it had to be an external call that only the developer could troubleshoot.

So after spending many hours trying to get a $20 component to work correctly, I would appreciate a little civility.

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

More
13 years 10 months ago #2606 by nordmograph
Yes I understand, sorry if I seemed to be uncivil. ENglish is not my mother language and I hope, I'm not misunderstood. But anyway, know that extension is not a component , only a plugin and if geommunity suite is 14€ , the geocoder plugin is free software. I'm really wanting to fix your notice but understand that it is not easy without the ability to reproduce it. The line number is meaningless, and even the message could be associated with quite a few lines. Now you gave me the line content, I can investigate deeper into this. Can you confirm me this only shows after the registration button is pressed and not after saving a freshely edited profile?

- 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 #2607 by sohopros
That is correct - it does not appear after saving an edited profile. It only appears upon registration.

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

More
13 years 10 months ago #2668 by sohopros
Do you have results from your testing? As we said earlier, we set up a clean Joomla/CB install and still get the registration error from your geocoder.

Our hosting technician says:

It's possible that it's coming from another linked file (or included file). This is something that's going to need to get looked at by your developer or the script vendor as it's not systems related.

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

More
13 years 10 months ago #2676 by nordmograph
Hello Sohopros

I fixed your issue, but I think it would have been faster if you could have given me effective line numbers or corresponding line content.
The latest clue you gave me about the mentioned line
Code:
$_PLUGINS->registerFunction('onBeforeUserRegistration', 'geocodeAddress', 'geommunitygeocoder');
Was not correct...

Anyway
Here is the latest geocoder file:
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') { $this->address = $geoData->$address; $this->city = $geoData->$city; $this->state = $geoData->$state; $this->country = $geoData->$country; $this->zipcode = $geoData->$zipcode; 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)); $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; } } } ?>

Let me know if it finally works as you wanted

- 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 9 months ago #2702 by sohopros
This appears to have done it! :) Rodrigo reports success and no more registration errors. Thank You!

I have another question, but will post a separate thread.

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

Time to create page: 0.367 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.