Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Google Map plugin Question

Quote Reply
Google Map plugin Question
Hi Andy,

My google map plugin was working fine on my directory and it seems its not longer working.

Link

Any ideas or suggestions?

Thanks!

Jesus
Quote Reply
Re: [Jesus] Google Map plugin Question In reply to
Hi,

Its cos you have a weird description for one of your links:

Code:
Error: missing ) after argument list
Source File: http://www.mundoregio.com/Educacion_y_formacion/Colegios/index.html
Line: 269, Column: 39
Source Code:
var marker = addtag(point, "<img src=""><br/><h2>Colegio Americano, ASF</h2><br/>Ignacio Morones Prieto No. 1500 Col. San Isidro, Santa Catarina, Nuevo Leon, 66190, Mexico"<br/>"http://www.mundoregio.com/static/7/147-colegio.png");

The simplest way (without editing the code), is to just use 'xxx' instead of "xxx" Smile

Also, this code seems a bit pointless in this one:

Code:
<img src="">

:)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google Map plugin Question In reply to
Hi Andy, thanks as always for your quick reply.

That code is beign generated from here:

Code:
<%if GoogleLong and GoogleLat and GoogleMapZoom%>
<%Plugins::GoogleMapForCat::Get_Map_Details_700($category_id,$GoogleLat,$GoogleLong,$GoogleMapZoom)%>
<%endif%>
So, should I need to adjust the plugin code to fix this? Will you please point me to the right direction?

Thanks again
Quote Reply
Re: [Jesus] Google Map plugin Question In reply to
Hi,

That isn't a standard function name for this plugin. If you open up /admin/Plugins/GoogleMapForCat.pm, and look for:

Code:
sub Get_Map_Details_700 {

A few lines down you should see:

Code:
if ($DB->table('GoogleMaps')->count( { LinkID => $link->{LinkID} } ) > 0) {

Add the following after it:

Code:
foreach (qw/Title Address City State/) {
$link->{$_} =~ s/"/\\\"/g;
}

This should "escape" the " charachters in those fields (its hard to know which field its coming from, so I made it escape most of them)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google Map plugin Question In reply to
Hi Andy,

After the modification I receive this meesage:

Error: Unable to load module 'Plugins::GoogleMapForCat':
Error: No subroutine 'Plugins::GoogleMapForCat::Get_Map_Details_700' in 'Plugins/GoogleMapForCat.pm',
Can't locate Plugins.pm in @INC (@INC contains: /home/html/cgi-bin/directorio/admin /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at GT::Template::_call_func line 688.

Quote Reply
Re: [Jesus] Google Map plugin Question In reply to
Hi,

Please email me your FTP logins and I will take a look. That code should work fine, so I expect you put it in the wrong place :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Jesus] Google Map plugin Question In reply to
Hi,

I'm not sure that has ever worked? ;)

You had:

Code:
var marker = addtag(point, "<img src="$link->{Logo}"><br/><h2>$link->{Title}</h2><br/>$address"<br/>"$link->{MapMarkerImage}");

...but should be:

Code:
var marker = addtag(point, "<img src=\\\"$link->{Logo}\\\"><br/><h2>$link->{Title}</h2><br/>$address<br/>","$link->{MapMarkerImage}");

Notice:

Code:
<img src="$link->{Logo}">

That should have given an error from day 1, unless it was something you added int? Wink

Anyway - it should all be fixed now (I've also tweaked it so it doesn't try and show the image when nothing exists)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google Map plugin Question In reply to
Thank you Andy. The map now it being displayed now, one thing.

When I click on the icon it displays info and the link to the site doesn't work, as it tries to open a page inside my own domain: link

Thanks as always for your help!


Quote Reply
Re: [Jesus] Google Map plugin Question In reply to
Should be sorted now:

http://www.mundoregio.com/...ornia_Sur/Los_Cabos/

Although your detailed pages still give me a 404 error:

http://www.mundoregio.com/...untry_Club_8024.html

Not sure if its just because I'm looking at them in dynamic mode.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google Map plugin Question In reply to
mmm, I'm not building detailed pages for this links.

I've Detailed pages just on a few links, but by Default Detailed its turned off, so those links needs to be to the regular (client) link directly and not detailed pages.

If its possible to work just like I've on my directory listings?

As I've an if in there, if detailed = off then regular link should be used ir detailed = on then detailed page will be used.

Jesus
Quote Reply
Re: [Jesus] Google Map plugin Question In reply to
So you are using my Build_Detailed plugin to only build certain pages? You need to tell me these kinda things Whistle

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google Map plugin Question In reply to
Yes, sorry Blush

Jesus
Quote Reply
Re: [Jesus] Google Map plugin Question In reply to
Ok, I've tweaked it now so it will ONLY send them to the detailed page if:

Code:
$link->{Build_Detailed_Page} == 1

Can you give that a go and let me know if its ok now?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Google Map plugin Question In reply to
Perfect!!

Now it works fine. As always Andy, I appreciate your help!