[BETA] Phoogle (Google) Map

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
eloolds
Registered User
Posts: 4
Joined: Mon Jun 04, 2007 8:37 am

Re: [BETA] Phoogle (Google) Map

Post by eloolds »

Hello antisa33,
what did you change?
Did you insert line 1457 on another place?
Greetings
Michael

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

eloolds wrote:
antisa33 wrote:Hello
I have just set up the last version of this mod on my phpbb 2.0.17

but now i have this error in profile.php?mode=register&agreed=true : when a user want to subscribe.

Code: Select all

Fatal error: Call to a member function on a non-object in /var/www/vhosts/site.com/httpdocs/includes/usercp_register.php on line 1457
line 1457 is :

Code: Select all

"PHOOGLE_SCRIPT" => $userMap->printGoogleJS(),
All works, there is just this little error, do you have an idea to fix it ?

Regards and thanks a lot for all this work!!
Isa
Hi,
Could you post a link to your map page? Or PM it to me here.

I have tested my registrypage and I have the same problem. :shock:
My phpbb-version is 2.0.22

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

antisa33 wrote:I have paste an other time on usercp_register.php and now i dont have this error, but i can't see any language : i can see the map but no text near the map : it is blank.
I don't understand. A link to your site would help a lot.

User avatar
Sammy Sandbag
Registered User
Posts: 184
Joined: Fri May 23, 2003 2:07 am
Location: Savannah, GA
Contact:

Re: [BETA] Phoogle (Google) Map

Post by Sammy Sandbag »

Just checking in to see how the mod is coming along?
-Sammy

junks2001
Registered User
Posts: 16
Joined: Sun Sep 12, 2004 8:04 am

Re: [BETA] Phoogle (Google) Map

Post by junks2001 »

I'm getting this error within the

Code: Select all

usercp_register.php on line 1210
when I go to register. I've searched the forums but haven't found anything.

Any Ideas what I might be doing wrong:?:

TIA :geek:

raqman
Registered User
Posts: 51
Joined: Tue Jul 23, 2002 4:03 pm
Contact:

Re: [BETA] Phoogle (Google) Map

Post by raqman »

Hi Bassface,

I have a problem on my phoogle map at http://www.italiansunited.co.uk and hope you can help.

If you look at the map, you will see over 190 users there, however many of them do not appear on the map unless you click on their name and then you will see the marker.

I have tried to go through all your thread, but on page 20, saw someone managed over a 1000 users on your phoogle, so I think it is something buggy at my end, do you have any ideas?

Thanks

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

junks2001 wrote:I'm getting this error within the

Code: Select all

usercp_register.php on line 1210
when I go to register. I've searched the forums but haven't found anything.

Any Ideas what I might be doing wrong:?:

TIA :geek:
what is the error?

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

raqman wrote:Hi Bassface,

I have a problem on my phoogle map at http://www.italiansunited.co.uk and hope you can help.

If you look at the map, you will see over 190 users there, however many of them do not appear on the map unless you click on their name and then you will see the marker.

I have tried to go through all your thread, but on page 20, saw someone managed over a 1000 users on your phoogle, so I think it is something buggy at my end, do you have any ideas?

Thanks
can't register - keep getting this: Il valore che hai messo per Presentati non e valido. But I don't speak italian and can't figure out what i'm doing wrong! :(

junks2001
Registered User
Posts: 16
Joined: Sun Sep 12, 2004 8:04 am

Re: [BETA] Phoogle (Google) Map

Post by junks2001 »

Code: Select all

Fatal error: Call to a member function on a non-object in /phpBB2/includes/usercp_register.php on line 1210
That's the full error.

Here's the code on line 1210.

Code: Select all

"PHOOGLE_SCRIPT" => $userMap->printGoogleJS(),

raqman
Registered User
Posts: 51
Joined: Tue Jul 23, 2002 4:03 pm
Contact:

Re: [BETA] Phoogle (Google) Map

Post by raqman »

Hi Bass

No worries, the Roman Emprie died 2000 years ago, otherwise everyone would know Italian and New York would have been Nuova York :D

Presentati, just write any old thing, it is more a countermeasure against spammers (custom Profile hack helped me kill spammers in their tracks by putting so many custom fields), anything with a * is a field that has to be filled in, however if you want me to create you an account, more that happy to.

Seems to me that all olders members are not seen on phoogle unless you actually click on their name.

Now I did do a server migration, and everything did seem to go well, the fact that thier marker is still there upon clicking their name means the DB is intact, it is just on the full map with all markers that most of them are not on it.

Also one other quick question, I am going to upgrade to 1.5, but coming in from 1.3, do I have to do 1.4 and then 1.5, or 1.3 to 1.5 direct is ok as an upgrade path, as in the readme I did not see which is ok?
Many thanks!!

User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Re: [BETA] Phoogle (Google) Map

Post by freddie »

raqman wrote:Hi Bass

No worries, the Roman Emprie died 2000 years ago, otherwise everyone would know Italian and New York would have been Nuova York :D
off topic: 1531 years ago ;)

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

junks2001 wrote:

Code: Select all

Fatal error: Call to a member function on a non-object in /phpBB2/includes/usercp_register.php on line 1210
That's the full error.

Here's the code on line 1210.

Code: Select all

"PHOOGLE_SCRIPT" => $userMap->printGoogleJS(),
Not certain exactly, but it looks like the phoogle class file is not being included. There is a closing curly brace '}' right before the Phoogle map code that includes the class - I'm wondering if maybe you edited that section of usercp_register.php properly??? It's around line 872.

It should look like this:

Code: Select all

$user_style = $userdata['user_style'];
	$user_lang = $userdata['user_lang'];
	$user_timezone = $userdata['user_timezone'];
	$user_dateformat = $userdata['user_dateformat'];
}
// Phoogle Map
// ---------------------------------------
// Bring in phoogle class
	include($phpbb_root_path . 'includes/phpbb_phoogle_class.'.$phpEx);
// sql for map config
	$sql_map_config = "SELECT * 
					 FROM " . PHOOGLE_CONFIG_TABLE;
	if( !($result_map_config = $db->sql_query($sql_map_config)) )
	{
		message_die(GENERAL_ERROR, 'Could not query Map Config', '', __LINE__, __FILE__, $sql_map_config);
	}
	while ( $mapConfig = $db->sql_fetchrow($result_map_config) )
	{
			$api_key = $mapConfig['api_key'];
			$map_width = $mapConfig['profile_map_width'];
			$width_measure = $mapConfig['profile_width_measure'];
			$map_height = $mapConfig['profile_map_height'];
			$height_measure = $mapConfig['profile_height_measure'];
			$show_control = $mapConfig['show_control'];
			$show_type = $mapConfig['show_type'];
			$control_type = $mapConfig['control_type'];
			$show_scale = $mapConfig['show_scale'];
			$show_overview = $mapConfig['show_overview'];
			$init_zoom = $mapConfig['init_zoom'];
			$user_zoom = $mapConfig['user_zoom'];
			$map_center_c = $mapConfig['map_center'];
			$marker_folder = $mapConfig['marker_folder'];
			$target_folder = $mapConfig['target_folder'];
	}
// Create a new map and show Zoom slider
	$userMap = new PhoogleMap();
	$userMap->setAPIKey("$api_key");
	$userMap->setWidth("$map_width");
	$userMap->setHeight("$map_height");
	$userMap->showControl = 'true'; 
	$userMap->controlType = 'small';
	$userMap->showType = 'true';
	$userMap->showScale = 'false'; 
	$userMap->showOverview = 'false'; 
	if(!empty($map_center))
	{
		$parens = array('(',')');
		$map_center = str_replace($parens, '', $map_center);
		$userMap->centerMap = "map.setCenter(new GLatLng($map_center), $user_zoom);";
	} else 
	{
		$parens = array('(',')');
		$map_center_c = str_replace($parens, '', $map_center_c);
		$userMap->centerMap = "map.setCenter(new GLatLng($map_center_c), $user_zoom);";
	}
/**************************************************************************************************************************************/
// sql for map markers	
	$sql_map_markers = "SELECT marker_id, marker_image, marker_width, marker_height 
											FROM " . PHOOGLE_MARKERS_TABLE;
	if( !($result_map_markers = $db->sql_query($sql_map_markers)) )
	{
		message_die(GENERAL_ERROR, 'Could not query Map Markers', '', __LINE__, __FILE__, $sql_map_markers);
	}
	while ( $mapMarker = $db->sql_fetchrow($result_map_markers) )
	{		
			$mid = $mapMarker['marker_id'];
			$marker[$mid]['id'] 					= $mapMarker['marker_id'];
			$marker[$mid]['image'] 				= $marker_folder.$mapMarker['marker_image'];
			$marker[$mid]['image_width'] 	= $mapMarker['marker_width'];
			$marker[$mid]['image_height'] = $mapMarker['marker_height'];
			$marker[$mid]['filename']			= $mapMarker['marker_image'];
	
	$template->assign_vars(array(
		"MARKER_".$mid 						=> $marker[$mid]['image'],
		"MARKER_".$mid."_WIDTH" 	=> $marker[$mid]['image_width'],
		"MARKER_".$mid."_HEIGHT" 	=> $marker[$mid]['image_height'],
		"MARKER_".$mid."_NAME" 		=> $marker[$mid]['filename']
	));		
	}	
// End Phoogle Map
//
// Default pages
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);


If needed, you can pm me your usercp_register.php file and I'll have a look at it. Good luck! :D

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

raqman wrote:Hi Bass

No worries, the Roman Emprie died 2000 years ago, otherwise everyone would know Italian and New York would have been Nuova York :D

Presentati, just write any old thing, it is more a countermeasure against spammers (custom Profile hack helped me kill spammers in their tracks by putting so many custom fields), anything with a * is a field that has to be filled in, however if you want me to create you an account, more that happy to.

Seems to me that all olders members are not seen on phoogle unless you actually click on their name.

Now I did do a server migration, and everything did seem to go well, the fact that thier marker is still there upon clicking their name means the DB is intact, it is just on the full map with all markers that most of them are not on it.

Also one other quick question, I am going to upgrade to 1.5, but coming in from 1.3, do I have to do 1.4 and then 1.5, or 1.3 to 1.5 direct is ok as an upgrade path, as in the readme I did not see which is ok?
Many thanks!!
Your user fracomoro has an invalid lat,long which is messing up the Google Map API javascript. In User Management, you can change his map coords from Cambridge to something else valid, like 45,0. Then PM him and have him correct it.

Not sure about your upgrade question - it would be safest to go to 1.4 then to 1.5 - but feel free to be the test case! :D
Good luck! Viva Italia!

raqman
Registered User
Posts: 51
Joined: Tue Jul 23, 2002 4:03 pm
Contact:

Re: [BETA] Phoogle (Google) Map

Post by raqman »

Hi Bass,

Hey welcome to our Forums at Italiansunited.co.uk, mamma mia :D
Checked Phoogle, but still seems to have problems, however I can see how Fraco could create problems, so I need to check if other users have the same, so my questions are two:

How did you spot that, I am baffled, unless you go down one user at a time :o

Can we take out the long lat line as it seems to confuse peopel?

thanks a million

User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Re: [BETA] Phoogle (Google) Map

Post by freddie »

raqman wrote: Can we take out the long lat line as it seems to confuse peopel?
BassFace wrote:
pjjacobs wrote: Ok, so far only one issue i have come across...if one of the members co-ordinates is wrong, the whole map doesnt load...my one friend for some dumb reason copied his co-ordinates from Google Earth and the whole map didnt show...maybe you must "lock" the co-ordinates field? i.o.w. the co-ordinates only change when you change it on the map


The only way to do it is to hide that text field. It's a strange thing about html forms - if a field is "hidden", it can still be submitted and it's value modified (via javascript in this instance), but it can't be seen. On the other hand, you can set a field to 'disabled' and it can be seen but not modified like Phoogle map needs it to change the user's location.

Sooo, let's try this...
Open templates/subSilver/profile_add_body.tpl
FIND

Code: Select all

<input name="map_center" type="text" class="post" id="map_center" value="{MAP_CENTER}" size="60" maxlength="60" />
REPLACE WITH

Code: Select all

<input name="map_center" type="hidden" class="post" id="map_center" value="{MAP_CENTER}" size="60" maxlength="60" />
To hide the text that labels that row (which may now look silly with no form field next to it)
FIND

Code: Select all

{L_PHOOGLE_CENTER}:
REPLACE WITH

Code: Select all

&nbsp;
This is probably something I should have done a long time ago actually. :roll:
this works ;)

Post Reply

Return to “[2.0.x] MODs in Development”