Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.38 veröffentlicht (30.04.24)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Google Maps Usermap
#11
Hi,

that's because the field for evolution doesn't exist in the database. Until now, for example, if you had 200 users entered in the usermap, 200 requests were sent to Google each time the usermap was opened. This has increased the loading time extremely and many requests have been sent to Google (there are also costs per request to Google). This was changed by me this way: When entering a user into the usermap 1 request per user is sent to Google and the result is written into the database. When the usermap is opened, the data from the database is used. When a user registers in the user map, the height must always be written to the database. It does not matter whether "Height" is activated or deactivated. This is the only way I can guarantee that the height will also be displayed if it is activated and was previously deactivated.

I guess you've already added Key 2 and 3. Now all you need is the field in the database and for all users (who are already registered in the usermap) the evolution value must be calculated once. For all new users this will happen automatically. Please proceed as follows:

1. download attachment and open it with an editor (e.g. Notepad++)
2. adjust database connection (MyBB-Database)
3. Add Evolution-Key
4. upload to your webspace and open the file

(This part you have to change! Check ScreenshotSmile
---
Screenshot:    
---

if you did everything right, the field was now added and all values of all already registered users were calculated. Now you can deactivate and reactivate the plugin - then everything works. (DO NOT uninstall - ONLY deactivate!) if everything is working, you can delete the update-file. You don't need the file anymore.

Please test with a test/development-system first.

(Info for all who want to use the user map for the first time: If you install the Usermap the First time, there are no problems. Unfortunately the update to 1.5.0 is a bit difficult. This should work as described.)


Angehängte Dateien
.php   update.php (Größe: 1,46 KB / Downloads: 3)
Zitieren
#12
(30.04.2019, 19:58)Ian schrieb: INSERT INTO mybb_settings (name, title, description, optionscode, value, disporder, gid, isdefault)

VALUES ('usermap_apikeythree', 'API key for elevation', 'The required API key (for the
Elevation) must be generated in a GoogleMaps account. Informationen über die reference is
<a "https://developers.google.com/maps/documentation/javascript/get-api-key"
target = "_ blank"> find here code, text '', 0, ' 2 ',' GID ',' 0 ');
Sorry, that was probably my fault!

as Schnapsnase told me, the SQL commands must be correct:
INSERT INTO mybb_settings (name, title, description, optionscode, value, disporder, gid, isdefault)
VALUES ('usermap_apikeythree', 'API key for elevation', 'The required API key (for the Elevation) must be generated in a GoogleMaps account. Informationen über die reference is <a "https://developers.google.com/maps/documentation/javascript/get-api-key" target = "_ blank"> find here code, text '', 0, ' 2 ',' GID ',' 0 ');
without the semicolon after "Elevation')" and before the parenthesis.

wrong (see red marked) Elevation') / accurate = Elevation)

I will correct the update instructions and direct itsmeJAY to embed them into the download plug-in.

Mea Culpa for the inconvenience.
Sollte ich der Ansicht sein helfen zu können biete ich Hilfe(n) an!  ...ich bitte jedoch nicht darum helfen zu dürfen!
Tools [Unixzeit ⇔ Realzeit] ♦ [BOM-Finder] ♦ [SQL-Prefix-Changer] ♦ [USV-Rechner] ♦ [PlugIns]
Zitieren
#13
Hello -

Sorry about the delay - I've not had time to work on this until today....

I've run into an issue with step 4 on your directions - And i don't fully understand what to do ..

If I log onto the phpmyadmin and run the script on the DB with the changed fields set to the correct details it shows some errors and fails -

Static analysis:
5 errors were found during analysis.

  1. Unexpected character. (near "?" at position 1)

  2. Unexpected character. (near "$" at position 78)

  3. Unexpected beginning of statement. (near "?" at position 1)

  4. Unexpected beginning of statement. (near "php" at position 2)

  5. Unrecognized statement type. (near "by" at position 10)

If I copy the altered file to the root location and open it, it allows me to read the information but doesn't appear to do anything...

The system is Windows based with XAMPP installed - so might be different to what you are expecting ?

I know this is my lack of knowledge - but fully appreciate your assistance ..  

Regards

Ian

(01.05.2019, 10:15)Gerti schrieb:
(30.04.2019, 19:58)Ian schrieb: INSERT INTO mybb_settings (name, title, description, optionscode, value, disporder, gid, isdefault)

VALUES ('usermap_apikeythree', 'API key for elevation', 'The required API key (for the
Elevation) must be generated in a GoogleMaps account. Informationen über die reference is
<a "https://developers.google.com/maps/documentation/javascript/get-api-key"
target = "_ blank"> find here code, text '', 0, ' 2 ',' GID ',' 0 ');
Sorry, that was probably my fault!

as Schnapsnase told me, the SQL commands must be correct:
INSERT INTO mybb_settings (name, title, description, optionscode, value, disporder, gid, isdefault)
VALUES ('usermap_apikeythree', 'API key for elevation', 'The required API key (for the Elevation) must be generated in a GoogleMaps account. Informationen über die reference is <a "https://developers.google.com/maps/documentation/javascript/get-api-key" target = "_ blank"> find here code, text '', 0, ' 2 ',' GID ',' 0 ');
without the semicolon after "Elevation')" and before the parenthesis.

wrong (see red marked) Elevation') / accurate = Elevation)

I will correct the update instructions and direct itsmeJAY to embed them into the download plug-in.

Mea Culpa for the inconvenience.


Hi -

No problem …. Thank you for the update and keep up the good work Smile

Ian
Zitieren
#14
Hi,

what command are you executing? Does the field "Key2" and "Key3" already exist in your admin area? If yes, all you have to do is upload the PHP file to the server, modify it and execute it as described. (Please check my last reply here and download the file)

DO NOT execute the PHP file in phpmyadmin. This makes no sense.
Zitieren
#15
Hi ..

In my config I have 17 settings that are available and what I can see is shown in Image 1 & 2 …

   

   

The altered update.php file is in the location xampp\htdocs\Forum on my server ( This is the root location ) but I am unsure how to execute it ? { Sorry I jut don't know what to do with it ? }

The file is altered with the settings for my site at the locations blanked out ..

   

Thanks ..

Ian
Zitieren
#16
Why do you have the field for "Geocoding" and "Elevation" twice each? I think you've gotten pretty confused with the queries.

You can execute the file by simply calling it up. You put the file "update.php" e.g. in the folder Forum and call it with: localhost/Forum/update.php (or: www.domain.de/Forum/update.php)

If I were you, I would completely uninstall the plugin once and reinstall it again. Then everything should be right. How many users have already registered in your user map?
Zitieren
#17
(03.05.2019, 13:08)itsmeJAY schrieb: Why do you have the field for "Geocoding" and "Elevation" twice each?

Hi Jay,

die doppelten Einträge entstehen, wenn der SQL-Befehl zur Integration der neuen Keys doppelt ausgeführt wird.
Das Problem ist wahrscheinlich entstanden, weil die  Schreibweise des Befehls in der ursprünglichen Updateanleitung falsch war, zu einem Fehler geführt hat und daraufhin erneut ausgeführt wurde.
Die doppelten-fehlerhaften Einträge können in der DB-Tabelle mybb_settings gelöscht werden.
Zitieren
#18
Hi Schnapsnase,

danke erstmal Wink ich find es nur komisch -> wenn der Query syntaktisch falsch ist, dürfte nichts passieren und phpmyadmin sollte den Query nach einer geschmissenen Fehlermeldung auch nicht nochmal versuchen auszuführen. Und selbst wenn es phpmyadmin versucht, dürfte es ja trotzdem nicht klappen. Ich geh eher davon aus, dass der Query bewusst 2x ausgeführt wurde mit behobener Syntaxproblematik.

Mir ist übrigens bewusst, dass die fehlerhaften Einträge über die Tabelle mybb_settings direkt gelöscht werden können (immerhin hab ich die Querys ja geschrieben  Big Grin ), ich denke aber eher, dass sollte lan direkt über das ACP machen und nicht ohne Erfahrung auch noch in der Datenbank rumfuchteln...  Big Grin

@lan:

In the admin area please go to "Configuration" then click in the upper tab on "Modify Settings" and scroll down. There you should be able to delete 1x Elevation and 1x Geocoding.

After that you should run update.php (upload it to the server and call it via a link) and then everything should work.
Zitieren
#19
Hello ..

Yes when I deployed the plugin update it duplicated the 3 lines [Maps JavaScript, Geocoding, Elevation] where the Google API key is required ? 3 of them can be changed and set to the correct API, 3 are locked with a value of 0 (zero)… I thought this was normal as it appears to have no adverse affect.

After the execution of the command using the method you shared,  my site has responded with the list of users and the elevation details for each of them, and now the map PIN's including location and elevation are working, with new ones being able to be added again...

Thank you very much for your time and support and indeed ongoing plugin development, and apologies for my lack of knowledge around this ..  

Regards

Ian
Zitieren
#20
You should delete the unnecessary fields via "Configuration" -> "Modify Settings".

I'm glad it works now. Have fun with the plugin. If you have any wishes, if you find any errors, please contact me/us in this thread.
Zitieren