[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.
gansert
Registered User
Posts: 581
Joined: Wed Mar 08, 2006 8:48 pm
Location: KÖLN, GERMANY
Contact:

Re: [BETA] Phoogle (Google) Map

Post by gansert » Thu Mar 29, 2007 4:30 pm

Hi,
Looks Great!
Yes, all members will need to go back into their Profile and select that they want to be shown on the map - the default is to be 'Not Shown'. The sql update you just did sets all current users to the default. BassFace did it this way so newly registered members have to select to be shown.
Or you can do it in the ACP Manage Users (but you'd have to do it one-by-one). :twisted:
He'd suggest putting up a message telling your members about the upgrade, and asking them to go to their profile to set that they Want to be shown on the map.


It's there - it's just the small version - just a + and - box. bassface did that so people could use a smaller map in the forms and not have the Zoom panel stick out the bottom of the map :lol:. You can set the main map and the Profile map to different sizes in this version. :D

If you'd like to change it back, open usercp_register.php and find

Code: Select all

$userMap->controlType = 'small';
and replace it with

Code: Select all

$userMap->controlType = 'large';

User avatar
cherryworld4u
Registered User
Posts: 32
Joined: Wed Feb 14, 2007 7:39 pm

Re: [BETA] Phoogle (Google) Map

Post by cherryworld4u » Thu Mar 29, 2007 5:40 pm

Hye BassFace

I Hav Completed upgrading frm 0.04 to ur latest ver that u gave me but now the prob i got map is dissappeared as i change users profile to see in google marker. but the user can browse map in his profile very well nd working fine but the prob is with main map which is nt showing map zoom bar jus check it out

http://www.cherryworld4u.org/forum/


You can check user profile map by entering
username and password as demo . i hav made this account to do any new experiment so you can also check it out plz

i lov ur mod very much

with regards
cherryworld4u

Thanx

User avatar
Aahz
Registered User
Posts: 39
Joined: Sun Nov 02, 2003 9:44 pm
Location: ...Behind The Curtain
Contact:

Re: [BETA] Phoogle (Google) Map

Post by Aahz » Thu Mar 29, 2007 6:29 pm

Thanx for your help. guys. I used my backups of both files and redid the steps and it's showing up now!

A big thanx to BassFace for a sweet mod.

-Aahz

User avatar
Aahz
Registered User
Posts: 39
Joined: Sun Nov 02, 2003 9:44 pm
Location: ...Behind The Curtain
Contact:

Re: [BETA] Phoogle (Google) Map

Post by Aahz » Thu Mar 29, 2007 8:47 pm

Hmmm... okay, I had been viewing it in Firefox 2, where it works fine. But when I check it in IE7 (specifically 7.0.5730.11) the map itself doesn't show and I get a "Done, but with errors on page" in the bottom of my browser :(

Edit: Here's the error 'report' -

Line:197
Char: 5
Error: Expected ';'
Code: 0
Url: http://forum.itswickedfun.net/phpBB2/ph ... efb32903a0

Edit2: Another user reports-

The names appear but no map in both Safari 2.0.4 and IE 5.2 on the Mac (OS 10.4.9)

User avatar
Aahz
Registered User
Posts: 39
Joined: Sun Nov 02, 2003 9:44 pm
Location: ...Behind The Curtain
Contact:

Re: [BETA] Phoogle (Google) Map

Post by Aahz » Fri Mar 30, 2007 4:44 am

There is, indeed, a missing semicolon. I guess Firefox is just more forgiving.

Here's the relevant code section from the demo page-

Code: Select all

map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.addControl(new GScaleControl());
map.addControl(new GOverviewMapControl());
var infoTabs0 = [
			new GInfoWindowTab("BassFace","<img src=\"http://www.bassface3d.com/phpBB2/images/avatars/151627834845711886c63ad.gif\" width=\"100\" height=\"100\" alt=\"\" border=\"0\" />"),
			new GInfoWindowTab("Comment","<div class='gen'>PhoogleMap Mothership</div><a href=privmsg.php?mode=post&u=2&sid=d2f922516231bae14acbd52435c37643><img src=templates/subSilver/images/lang_english/icon_pm.gif alt=Send private message title=Send private message border=0 /></a>&nbsp;&nbsp;<a href=profile.php?mode=viewprofile&u=2&sid=d2f922516231bae14acbd52435c37643><img src=templates/subSilver/images/lang_english/icon_profile.gif alt=View user's profile title=View user's profile border=0 /></a>")
			];
var point0 = new GLatLng(39.665334943007565, -104.8410701751709);
			var options = {
			icon:icon2,
			title:"BassFace"
			};
			var marker0 = new GMarker(point0, options);
            marker0.type = 'user';
			GEvent.addListener(marker0, "click", function() {marker0.openInfoWindowTabsHtml(infoTabs0);
});
And here's the same section of code from my forums-

Code: Select all

map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
var infoTabs0 = [
			new GInfoWindowTab("Aahz","<img src=\"images/avatars/172433280245d7f7119682c.jpg\" width=\"80\" height=\"80\" alt=\"\" border=\"0\" />"),
			new GInfoWindowTab("Comment","<div class='gen'>Anime 101</div><a href=privmsg.php?mode=post&u=2><img src=templates/AcidTechBlood/images/lang_english/icon_pm.gif alt=Send private message title=Send private message border=0 /></a>&nbsp;&nbsp;<a href=profile.php?mode=viewprofile&u=2><img src=templates/AcidTechBlood/images/lang_english/icon_profile.gif alt=View user's profile title=View user's profile border=0 /></a>")
			]var point0 = new GLatLng(37.13227054066109, -121.65538251399994);
			var options = {
			icon:icon5,
			title:"Aahz"
			};
			var marker0 = new GMarker(point0, options);
            marker0.type = 'user';
			GEvent.addListener(marker0, "click", function() {marker0.openInfoWindowTabsHtml(infoTabs0);
});
the semicolon should be on line 12 of my code after the ] and then a line break before the var ...

So, the question is, since this section is dynamically created, what do I need to change to get that semicolon and line break?

My map's at http://forum.itswickedfun.net/phpBB2/phoogle_map.php
Play HorrorClix? Then you should be a member of It's Wicked Fun

User avatar
cherryworld4u
Registered User
Posts: 32
Joined: Wed Feb 14, 2007 7:39 pm

Re: [BETA] Phoogle (Google) Map

Post by cherryworld4u » Fri Mar 30, 2007 12:21 pm

Hey BassFace,
I hav also chked my phoogle map with firefox. the browser is showing the map but there is no zooming but in ie even there is no map displayed. i dont no what the prob is that i met. so plz help

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 » Fri Mar 30, 2007 3:06 pm

Aahz wrote: There is, indeed, a missing semicolon. I guess Firefox is just more forgiving.

So, the question is, since this section is dynamically created, what do I need to change to get that semicolon and line break?

My map's at http://forum.itswickedfun.net/phpBB2/phoogle_map.php


Bahhhhh!!!! :twisted: First, I apologize for the delay in my reply - busy at home these past few days. Aahz, you've found it (and probably the other browsers' issue as well). I thought I had repaired that, but apparently not. :roll: Gansert, didn't we cover this problem before?

The code to fix will be in 'includes/phpbb_phoogle_class.php'. I am at work right now, so I can't test anything or even access the source files on the demo site, but the fix will be to add a

Code: Select all

;\n
right after that

Code: Select all

]
in the echo statement before

Code: Select all

var point[$i]
starts getting echoed.

If you are comfortable testing this, please do so and post your results. Otherwise, I'll be able to post a fix and a new zip tomorrow.

User avatar
cherryworld4u
Registered User
Posts: 32
Joined: Wed Feb 14, 2007 7:39 pm

Re: [BETA] Phoogle (Google) Map

Post by cherryworld4u » Fri Mar 30, 2007 5:31 pm

The error message that i got is attached in image file when i open phoogle map with ie

Plz Help mee bro. i need ur help
Attachments
Error Message That Appears
Error Message That Appears
pm.JPG (28.36 KiB) Viewed 69 times

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 » Fri Mar 30, 2007 5:56 pm

cherryworld4u wrote: The error message that i got is attached in image file when i open phoogle map with ie

Plz Help mee bro. i need ur help

Yes, this is the same problem as above, I'll post an 'official' fix tomorrow - I'm at work right now.

User avatar
cherryworld4u
Registered User
Posts: 32
Joined: Wed Feb 14, 2007 7:39 pm

Re: [BETA] Phoogle (Google) Map

Post by cherryworld4u » Fri Mar 30, 2007 5:57 pm

BassFace wrote:
cherryworld4u wrote: The error message that i got is attached in image file when i open phoogle map with ie

Plz Help mee bro. i need ur help

Yes, this is the same problem as above, I'll post an 'official' fix tomorrow - I'm at work right now.



Oh Thanx very much BassFace

User avatar
Aahz
Registered User
Posts: 39
Joined: Sun Nov 02, 2003 9:44 pm
Location: ...Behind The Curtain
Contact:

Re: [BETA] Phoogle (Google) Map

Post by Aahz » Fri Mar 30, 2007 6:02 pm

WooHoo! I found it!

in includes/phpbb_phoogle_class.php I added ;\n twice in this section of code:

Code: Select all

    $numPoints = count($this->validPoints);
    for ($g = 0; $g<$numPoints; $g++)
	{
	// If user has no avatar, put their comment and username in one 'tab'. 
	if(empty($this->validPoints[$g]['tab'][0]))
	{	echo "var infoTabs".$g." = [
			new GInfoWindowTab(\"\",\"".$this->validPoints[$g]['username']."<br/>".$this->validPoints[$g]['tab'][1]."\")
			];\n";
	}
	// If user has an avatar separate the avatar into first tab, comment into 2nd tab
	else 
	{
	echo "var infoTabs".$g." = [
			new GInfoWindowTab(\"".$this->validPoints[$g]['username']."\",\"".$this->validPoints[$g]['tab'][0]."\"),
			new GInfoWindowTab(\"Comment\",\"".$this->validPoints[$g]['tab'][1]."\")
			];\n";
	}
On lines 9 & 18

Thanks for the help, BassFace!
Play HorrorClix? Then you should be a member of It's Wicked Fun

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

Re: Map not showing in IE - Possible Fix

Post by BassFace » Fri Mar 30, 2007 6:11 pm

Excellent work! 8) Thanks for digging into that. Everyone with v1.0.2 copy and paste the code from the post above from the EXACT SAME start and end points to overwrite that section in 'includes/phpbb_phoogle_class.php'.

Thanks again, and I'll update the zip with that fix tomorrow. :D

gansert
Registered User
Posts: 581
Joined: Wed Mar 08, 2006 8:48 pm
Location: KÖLN, GERMANY
Contact:

Re: [BETA] Phoogle (Google) Map

Post by gansert » Fri Mar 30, 2007 9:28 pm

Aahz wrote: WooHoo! I found it!

in includes/phpbb_phoogle_class.php I added ;\n twice in this section of code:

Code: Select all

    $numPoints = count($this->validPoints);
    for ($g = 0; $g<$numPoints; $g++)
	{
	// If user has no avatar, put their comment and username in one 'tab'. 
	if(empty($this->validPoints[$g]['tab'][0]))
	{	echo "var infoTabs".$g." = [
			new GInfoWindowTab(\"\",\"".$this->validPoints[$g]['username']."<br/>".$this->validPoints[$g]['tab'][1]."\")
			];\n";
	}
	// If user has an avatar separate the avatar into first tab, comment into 2nd tab
	else 
	{
	echo "var infoTabs".$g." = [
			new GInfoWindowTab(\"".$this->validPoints[$g]['username']."\",\"".$this->validPoints[$g]['tab'][0]."\"),
			new GInfoWindowTab(\"Comment\",\"".$this->validPoints[$g]['tab'][1]."\")
			];\n";
	}
On lines 9 & 18

Thanks for the help, BassFace!



THX Aahz :D

gansert
Registered User
Posts: 581
Joined: Wed Mar 08, 2006 8:48 pm
Location: KÖLN, GERMANY
Contact:

Re: [BETA] Phoogle (Google) Map

Post by gansert » Fri Mar 30, 2007 9:35 pm

I am gettin this with IE only. Anybody knows a fix??
Attachments
mistake with IE
mistake with IE
mistake.JPG (132.08 KiB) Viewed 74 times

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 » Fri Mar 30, 2007 11:13 pm

gansert wrote: I am gettin this with IE only. Anybody knows a fix??


Do you have:

Code: Select all

<script language="javascript">
function showOrNo() 
{
	for (var i=0; i<document.forms.length; i++)
	{
		if (document.forms[i].show_me[0].checked == true){
		document.getElementById('show_confirm').innerHTML='{L_PHOOGLE_SHOW_CONFIRM_YES}';
		} else {
		document.getElementById('show_confirm').innerHTML='{L_PHOOGLE_SHOW_CONFIRM_NO}';
		}
	}
}	
showOrNo();
</script>	
At the bottom of templates/subSilver/profile_add_body.tpl?

Post Reply

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