News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Google Member Map

Started by Spuds, December 12, 2007, 01:49:12 PM

Previous topic - Next topic

brianjw

Ok, you also need to translate:
ModSettings.english.php into ModSettings.spanish.php
Who.english.php into Who.spanish.php

If these files already exist (they SHOULD) then just add the Google Member Map language strings into them and translate them to your language.

Juan Carlos

#601
It is possible that I have not the ModSettings.english.php file? :-\

I have this error now:

http://www.cuatrocuatro.com/foro/index.php?action=admin;area=modsettings;sa=googlemap;sesc
8: Undefined index: googleMapFO
Archivo: /home/cuatrocuat/domains/cuatrocuatro.com/public_html/foro/Sources/ManageSettings.php
Línea: 2014

Sorry for so much trouble but I am struggling a bit with this

Thank you
Juan Carlos

brianjw

Wait, if you are using SMF 2.0 then there should be a ManageSettings.english.php if there isn't ModSettings.english.php

One of these files should be present.

Juan Carlos

Well now is working, no errors.

If you want i can send to you my translation to spanish. If yes only tell me how.

Thank you very much. You are very very friendly

Juan Carlos

DJHicks

Quote from: brianjw on September 12, 2008, 08:11:32 PM
Make sure that the mod edits for the language strings are in the languages you are using.

Modifications.english-utf8.php might need to be modified if you are using utf-8

omfg... sorry! so used to smf installing with the normal language... but  recently had a server change and its picking up the utf-8 as standard now...

thank you so much!

brianjw


shumar

Quote from: brianjw on September 12, 2008, 05:28:06 PM
Quote from: shumar on September 12, 2008, 05:15:54 PM
Is it possible to change pins, so it's change color according to membership ?

Thank you.
This has been requested. I am not able (with my current knowledge) to code this. I do know someone who might be able to code this.
Thank you.

Stigmartyr

#607
Noticed something buggy with the 0.10 version of the Member Map I'm using, wondering if anyone ran into this.  Suddenly I am unable to see any pins in my forum.  After reading this board and combing through endless code on the site I thought I would try something, as none of the last suggestions seemed to help me show the pins.

When I set "Number of Max Pins To Show On Map" = 100 then all my pins show.  When I set it to anything higher than 160, it shows nothing.

WHY IS THAT?  :P



Also I went to uninstall this version and there are errors, so I can't install the new version until I do all the manual clean up.  Do you have instructions on how to upgrade from previous version(s) or is an uninstall required?


2Ntense

Quote from: shumar on September 12, 2008, 05:15:54 PM
Is it possible to change pins, so it's change color according to membership ?

Thank you.

It's possible, but I don't know the SMF structure well enough to code it cleanly.  To brute-force it, you need to read the ID_GROUP member field (0 = member, 1 = Admin, 2 = Global Mod) and the ID_POST_GROUP, then assign colors to the different group combinations.  You'd need to change the section where it generates the XML file so that instead of the color being set by gender (googleMapsPinGender) it's assigned by groups (new variable). 

The proper solution would be to automatically track whatever color is assigned to the different member groups, but I don't know what that array is.  To generate the XML file we're doing a raw read of the MEMBERS table, not going through the various $context arrays.  I don't think we currently have access to the member groups array inside GoogleMap.php, and decoding what the color field is would be VERY ugly... the color variable onlineColor is a varchar(20) (HTML color string), and you would need some way to map that to the fixed set of Google pin colors, or create your own pins to match any of the 216 'web safe' colors or the 16 million possible 24-bit colors.  Here's an example of that string from one of our forums:


The only way I can see to do it simply would be to add another field to the membergroups table that would contain the Google pin color.  We'd also have to an Admin panel menu to set that field / pin color for the different member groups.

It's all do-able, but takes more work than I'm up for.

2Ntense

Quote from: Sabre™ on September 08, 2008, 07:14:00 PM
Howdy Brian :D

You probably wont recall, but my first attempt at installing this went horrifically wrong lol
I couldnt install via the package upload, because it kept asking for the ftp details, and no matter what I added, I couldnt get the baby to install.
So when I tried to manually install, I think I lost the site.
Anyho, I ended up deletin that site, as it was a new install.

Well Im back! lol

This is just a warning, because I tried to install via the package upload, and it went straight to the ftp info page. Yep..  its chmodded to 777..
Well... Im goin back in for the manual install!
Forum is backed up, but Im guessing I'll be back with an assortment of problems.
So grab a cuppa, and lace up ya bootstraps, cause its gonna be a bumpy ride! lol
;)

That FTP warning shouldn't happen with the current version of the MemberMap... the error was caused in earlier versions because TLM was trying to upload a button to a German language directory that didn't exist in most people's installations.  Since the button text was in English it was a bit pointless, and that entry removed.   O:)  Make sure you're using the current version and let us know how it goes, as it sounds like the Package Manager is linking to an old version of the MemberMap.

2Ntense

BTW, a word of warning to people using various package parsers to add the menu bar code in for custom themes: I've twice seen the parser at a couple of different sites NOT show the edits for index.template.php when you select 'Only Theme edits', so be warned.  Nearly every custom theme I've ever seen needs the index.template.php edited to add the menu bar code for the map.  You may have to check the 'All Edits (default)' radio button to see the edits for index.template.php.

The simple way to add the new button code for custom themes is to copy and paste the code for one of the other buttons in your custom index.template.php file (like the Calendar button code, for instance) and then change all instances of 'calendar' to 'googlemap' for the new button code.  You'll also have to change $txt['calendar24'] to $txt['googleMap']

The next thing you need to modify is the initial IF for the map button.  In this example, replace
if ($context['allow_calendar'])
with
global $modSettings;
if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view')))


The other change is to add another entry to show where you are, just above the button code section and underneath
// Work out where we currently are.

add the lines
   if ($context['current_action'] == 'googlemap')
      $current_action = 'googlemap';

in there with the rest of them (it's pretty easy to see when you look at that section)

Since some of the custom themes use novel methods of generating the menu bar, doing a COPY & PASTE of one of the other buttons for that theme is the only way to get it to work with all themes.

Ace1564

Hi im getting this error code in logs

8: Undefined index: googleSidebar
File: /public_html/forum/Sources/GoogleMap.php
Line: 115

8: Undefined index: googleSidebar
File: /public_html/forum/Themes/default/GoogleMap.template.php (map sub template - eval?)
Line: 78

8: Undefined index: googleSidebar
File: /public_html/forum/Themes/default/GoogleMap.template.php (map sub template - eval?)
Line: 73



Im using SMF 1.1.6
Google Member Map 1.0 beta 

brianjw

That is a known error. I have tried to apply the fix to make it user-friendly but it doesn't like it. You can fix it using an UN-user-friendly method which I don't recommend because you will not be able to tell the difference between sidebars unless you just know it at mind... This is the UN-Userfriendly FIX:
Quote
if you get errors like: "Undefined index: googleSidebar"
->
googleSidebar isnt right defined in ModSettings.php (might be same with ManageSettings.php)
changing
array('select', 'googleSidebar', array('No Sidebar', 'Sidebar Right')),
to
array('select', 'googleSidebar', array('1', '2')),
solves the problem and also make the option usefull
1 = dont show sidebar
2 = show sidebar on the right side
My goal for the next version of this mod is to either apply this fix and (add a key) or come up with a user-friendly fix. I have one on my mind but takes a heavy modification of every file.

To make sure this fix still works, clear all errors out of your error log. Visit the member map page and the member map admin and check your admin panel for more errors relating to this mod.

Ace1564

Quote from: brianjw on September 23, 2008, 06:03:48 PM
That is a known error. I have tried to apply the fix to make it user-friendly but it doesn't like it. You can fix it using an UN-user-friendly method which I don't recommend because you will not be able to tell the difference between sidebars unless you just know it at mind... This is the UN-Userfriendly FIX:
Quote
if you get errors like: "Undefined index: googleSidebar"
->
googleSidebar isnt right defined in ModSettings.php (might be same with ManageSettings.php)
changing
array('select', 'googleSidebar', array('No Sidebar', 'Sidebar Right')),
to
array('select', 'googleSidebar', array('1', '2')),
solves the problem and also make the option usefull
1 = dont show sidebar
2 = show sidebar on the right side
My goal for the next version of this mod is to either apply this fix and (add a key) or come up with a user-friendly fix. I have one on my mind but takes a heavy modification of every file.

To make sure this fix still works, clear all errors out of your error log. Visit the member map page and the member map admin and check your admin panel for more errors relating to this mod.

Ok thanks brianjw
I will leave well enough alone and wait for the fix in your next update  :D

shumar

Quote from: 2Ntense on September 23, 2008, 11:36:22 AM
Quote from: shumar on September 12, 2008, 05:15:54 PM
Is it possible to change pins, so it's change color according to membership ?

Thank you.

It's possible, but I don't know the SMF structure well enough to code it cleanly.  To brute-force it, you need to read the ID_GROUP member field (0 = member, 1 = Admin, 2 = Global Mod) and the ID_POST_GROUP, then assign colors to the different group combinations.  You'd need to change the section where it generates the XML file so that instead of the color being set by gender (googleMapsPinGender) it's assigned by groups (new variable). 

The proper solution would be to automatically track whatever color is assigned to the different member groups, but I don't know what that array is.  To generate the XML file we're doing a raw read of the MEMBERS table, not going through the various $context arrays.  I don't think we currently have access to the member groups array inside GoogleMap.php, and decoding what the color field is would be VERY ugly... the color variable onlineColor is a varchar(20) (HTML color string), and you would need some way to map that to the fixed set of Google pin colors, or create your own pins to match any of the 216 'web safe' colors or the 16 million possible 24-bit colors.  Here's an example of that string from one of our forums:


The only way I can see to do it simply would be to add another field to the membergroups table that would contain the Google pin color.  We'd also have to an Admin panel menu to set that field / pin color for the different member groups.

It's all do-able, but takes more work than I'm up for.
Thank you for your time to explain me.
For now it's too complicated for me.

brianjw

Those of you who are receiving these errors:
Quote
8: Undefined index: googleSidebar
File: /public_html/forum/Sources/GoogleMap.php
Line: 115

8: Undefined index: googleSidebar
File: /public_html/forum/Themes/default/GoogleMap.template.php (map sub template - eval?)
Line: 78

8: Undefined index: googleSidebar
File: /public_html/forum/Themes/default/GoogleMap.template.php (map sub template - eval?)
Line: 73
Please Follow the following instructions...
1.) Open GoogleMap.template.php which is located in ./Themes/default/
2.) Find:
Code (FIND) Select

if ($modSettings['googleSidebar'] == 1)

3.) Replace With:
Code (REPLACE WITH) Select

if (isset($modSettings['googleSidebar']) && $modSettings['googleSidebar'] == 1)

4.) Find:
Code (FIND) Select

if ($modSettings['googleSidebar'] == 2)

5.) Replace With:
Code (REPLACE WITH) Select

if (isset($modSettings['googleSidebar']) && $modSettings['googleSidebar'] == 2)


That should fix the sidebar errors. I personally am NOT sure if this works because I don't receive these errors on my site. For those of you that do receive these errors, please apply this fix then clear your error logs and try browsing in the google map admin and the actual google map. If you don't receive errors it works. This will NOT break your forum. The only thing it will do is fix a possible problem and if it doesn't fix it, it's a harmless piece of code simply checking if the value of googleSidebar has been set.

Let me know guys, thanks. :) If/When you guys let me know it fixes it for sure then I will release a new package with this fix. :)

masa12

Here is translation for finnish

Modifications.finnish.php



$txt['googleMap'] = 'Kartta';
$txt['googleMappinned'] = 'Merkityt Jäsenet';
$txt['googleMapc'] = 'Kartta Modin Rustaili <a href="http://www.gamerzgarage.com/">brianjw</a>';
$txt['googleMapGreenPinGD'] = 'Jonkun paikka';
$txt['googleMapGreenPinNG'] = 'Ei Sukupuolta';
$txt['googleMapBluePin'] = 'Mies';
$txt['googleMapRedPin'] = 'Nainen';
$txt['googleMapPurplePin'] = 'Pinni Ryhmä';
$txt['googleMapAddPinNote'] = '<a href="' . $scripturl . '?action=profile;sa=forumProfile">Aseta paikkasi täältä jos et ole tehnyt sitä vielä.</a>';
$txt['googleMapDisclaimer'] = 'Aseta paikkasi niin lähelle kuin haluat.';
$txt['cannot_googleMap_view'] = 'Sinulla ei ole oikeuksia katsella Karttaa.';
$txt['permissionname_googleMap_view'] = 'Näytä Kartta';
$txt['permissionhelp_googleMap_view'] = 'Näyttää kartan.  Jos ei ole valittuna, niin kartta ei ole näkyvissä.';
$txt['cannot_googleMap_place'] = 'Sinulla ei ole oikeuksia asetaa paikkaa karttaan.';
$txt['permissionname_googleMap_place'] = 'Aseta paikka karttaan.';
$txt['permissionhelp_googleMap_place'] = 'Salli karttapaikkojen lisäys karttaan.  Jos ei ole valittuna, karttapaikkoja ei voi lisätä.';


ModSettings.finnish.php

$txt['googleMapsEnable'] = 'Aseta Google Kartta Aktiiviseksi';
$txt['googleMapsEnableLegend'] = 'Näytä Paikkatieto';
$txt['googleSidebar'] = 'Vierityspalkki';
$txt['googleMapsKey'] = 'Google Kartan API Avain';
$txt['googleMapsPinGender'] = 'Paikkamerkit määritellään käyttäjän sukupuolen mukaan?';
$txt['KMLoutput_enable'] = 'Tallentaa Paikkatiedon KML Tiedostona? (KML on paikkatieto tiedosto Google Earth:ssa)';
$txt['googleMapsPinNumber'] = 'Maksimi paikkojen lukumäärä joka näytetään';
$txt['googleMapsType'] = 'Kartan Tyyli';
$txt['googleMapsDefaultLat'] = 'Oletus Leveysaste';
$txt['googleMapsDefaultLong'] = 'Oletus Pituussaste';
$txt['googleMapsDefaultZoom'] = 'Oletus Suurennos';
$txt['googleMapsEnableClusterer'] = 'Salli Paikkamerkki Ryhmät';
$txt['googleMapsMinMarkerCluster'] = 'Minimi Paikkamerkit Ryhmässä';
$txt['googleMapsMaxVisMarker'] = 'Maksimi Paikkamerkkien lukumäärä Kartalla';
$txt['googleMapsMaxNumClusters'] = 'Maksimi Lukumäärä Ryhmiä';
$txt['googleMapsMaxLinesCluster'] = 'Maksimi Lukumäärä Rivejä Ryhmän Info Laatikossa';
$txt['googleMapFO'] = 'Kartta';


Who.finnish.php

$txt['whoall_googlemap'] = 'Näytetään <a href="' . $scripturl . '?action=googlemap">Kartta</a>.';
$txt['whoall_.kml'] = 'Näytetään Google Earth Syöte.';


This Is great mod Thanks. ;D

brianjw

I am glad you like it. And thanks for posting this, I am sure it will help others. :)

meniinem

Here is a translation into German. I hope it will help you in some way...

Modifications.german.php

$txt['googleMap'] = 'Usermap';
$txt['googleMappinned'] = 'Eingetragene Mitglieder';
$txt['googleMapc'] = 'Benutzerkarten Mod by <a href="http://www.gamerzgarage.com/">brianjw</a>';
$txt['googleMapGreenPinGD'] = 'Ortsmarke';
$txt['googleMapGreenPinNG'] = 'Kein Geschlecht angegeben';
$txt['googleMapBluePin'] = 'Männlich';
$txt['googleMapRedPin'] = 'Weiblich';
$txt['googleMapPurplePin'] = 'Ortsmarkengruppe';
$txt['googleMapAddPinNote'] = '<a href="' . $scripturl . '?action=profile;sa=forumProfile">Klicke hier um deine Ortsmarke zu setzten!</a>';
$txt['googleMapDisclaimer'] = 'Setzte deine Ortmarke so genau wie möglich.';
$txt['cannot_googleMap_view'] = 'Du darfst die Usermap nicht sehen.';
$txt['permissionname_googleMap_view'] = 'Benutzerkarte ansehen';
$txt['permissionhelp_googleMap_view'] = 'Erlaubnis, dass leute die Usermap sehen dürfen. Wenn nicht gesetz wird niemand die Karte sehen.';
$txt['cannot_googleMap_place'] = 'Du darfst keine Ortsmarke setzten.';
$txt['permissionname_googleMap_place'] = 'Ortsmarke setzen';
$txt['permissionhelp_googleMap_place'] = 'Erlaubnis Ortsmarken zu setzten.  Wenn nicht gewähtlt kann niemand Ortsmarken erstellen';
?>


ModSettings.german.php


$txt['googleMapsEnable'] = 'Google Usermap aktivieren';
$txt['googleMapsEnableLegend'] = 'Zeige die Ortsmarkenlegende';
$txt['googleSidebar'] = 'Position der Sidebar';
$txt['googleMapsKey'] = 'Schlüssel der Google Maps API Page';
$txt['googleMapsPinGender'] = 'Sollen die Ortsmarken das Geschlecht des Benutzers zeigen?';
$txt['KMLoutput_enable'] = 'Sollen komprimierte KMLs erlaubt werden? (KML sind in Google Earth herunterladbare Dateien, die alle Ortsmarken der registrierten Benutzer zeigen.)';
$txt['googleMapsPinNumber'] = 'Höchstzahl der Ortsmarken die angezeigt werden sollen';
$txt['googleMapsType'] = 'Angezeigter Kartentyp';
$txt['googleMapsDefaultLat'] = 'Standard Breite';
$txt['googleMapsDefaultLong'] = 'Standard Länge';
$txt['googleMapsDefaultZoom'] = 'Standard Zoom';
$txt['googleMapsEnableClusterer'] = 'Aktiviere Zusammenlegung von Ortsmarken';
$txt['googleMapsMinMarkerCluster'] = 'Minimale Ortsmarkenzahl pro Gruppe';
$txt['googleMapsMaxVisMarker'] = 'Höchstzahl der sichtbaren Ortsmarken auf der Karte';
$txt['googleMapsMaxNumClusters'] = 'Maximale Gruppenzahl';
$txt['googleMapsMaxLinesCluster'] = 'Höchstzahlen der Zeilen pro Gruppe';
$txt['googleMapFO'] = 'Usermap';


Who.german.php

$txt['whoall_googlemap'] = 'Zeige <a href="' . $scripturl . '?action=googlemap">Usermap</a>.';
$txt['whoall_.kml'] = 'Zeige den Google Earth Feed.';


Can you tell me where to find the line: 'Click to place a point or click on your point to remove it.'
I didn't find it :(

For the rest great work!

Advertisement: