Plugin Release New page: MyBB Google maps v3
Author Message Action
mattzz

Junior Member
Posts: 1

Hi,

I upated the php user page code so that the user map works with Geocoding API V3.
This was my first time digging into PHP code so please double check my modifications.


It would be great if the cache updates were incremental so that only new users or updated user locations would require a new geocoding request from Google. This would minimize the number of requests and hence speed up map updates. (Imagine having 5000 or 10000 users...)

Cheers,
mattzz


Attached Files
.txt   Usermap-pagecontent.txt (Size: 7.57 KB / Downloads: 67)
Post: #21
16-03-2013, 10:47 PM
Andrew F.

Administrator
Posts: 221

Thanks mattzz,

I just had a quick look at your code and you seem to have made the correct modifications.

Good suggestion too, that process does need to be optimised.
Post: #22
17-03-2013, 09:30 PM
maat

Junior Member
Posts: 5

Thank you very much mattzz, my user map work again now. 001_smile
Post: #23
17-03-2013, 10:40 PM
meister-igi

Junior Member
Posts: 4

my map is empty
no user is displayed

what can I do

Link: http://www.e-zigarettenclub.com/misc.php?page=usermap
----------------------
choords file must contain this a:0:0 (...server/chache/choords) for the 1 run then its shown

was added a solution other
everything must always be clicked

choords the file must contain this
Post: #24
18-03-2013, 01:56 AM
(This post was last modified: 18-03-2013, 09:08 AM by meister-igi.)
ps915

Junior Member
Posts: 2

Same Problem to me. My Map is also empty.
http://www.forum-raspberrypi.de/page-mit...-landkarte

I tryed this:

1. delted "chords"
2. opened map (takes a long time becaus of the cache)
3. then it breaks up with a SQL Error
4. opened the map again and its still empty
5. "chords" exist with this content "a:0:{}"

@meister-igi
GERMAN: Wie hast du deine Karte wieder zum laufen gebracht?
ENGLISH: How do you fixed that?
Post: #25
19-03-2013, 03:49 PM
(This post was last modified: 19-03-2013, 03:50 PM by ps915.)
meister-igi

Junior Member
Posts: 4

deinen api Key hast du? ( v3 von Google )

oder den Api Key weglassen geht auch aber nicht immer

die choords Datei komplett leeren und als Inhalt dieses hinein: a:0:0

Danach Chache vom Server leeren und "http://www.deine.Domain/misc.php?page=name der Karten-Seite" aufrufen und ca 1 Minute warten bis der neue Chache erstellt ist in der choords-Datei

das war alles
----------------------
unbedingt den neuen Code im Pagemanager eintragen nicht vergessen...
https://www.mybbstyles.com/thread-plugin...92#pid1692 da im Anhang
Post: #26
19-03-2013, 04:19 PM
(This post was last modified: 19-03-2013, 04:44 PM by meister-igi.)
meister-igi

Junior Member
Posts: 4

nachtrag: die choords muss beschreibbar sein!
Post: #27
19-03-2013, 05:21 PM
ps915

Junior Member
Posts: 2

Works! thanks!
Post: #28
19-03-2013, 05:44 PM
Majes

Junior Member
Posts: 1

HI andrew,

It doesn't work in my site, i'm on godaddy. Is there any special requirements? It gives me error 500... after a loong blank screen.

http://www.foro125.com/misc.php?page=usermapv3

I've tried everything, and i'm pretty jealous of this one working so well: http://www.e-zigarettenclub.com/misc.php?page=usermap

any idea?
----------------------
Ok, it's starting to work:

I've just created a file called "coords" in "/cache" and gave 777 permissions. Now it shows up!

But it's empty, i'll try to investigate further... OMG it's 4.26am here, haven't slept already!
----------------------
I did it!

looks like the cache just takes too long to read the whole user database. it gives a 500 error because of timeout.

I've tried to make it work with moderators only (Adding group 2 in the exceptions), and it shows me the mods.

Can you modify the code to refresh every...50 members or so when making the cache? it takes too long and crashes in most servers.

I have right now 1100 members, and a shared hosting, not very powerful.

---

By now i am using a variable that selects only the users who have more than 20 posts so the map shows only the "active" users of the forum

Find:
AND u.usergroup NOT IN (5, 7)

Add after:

AND u.postnum > 20

It works, even if I have absolutely no idea of mysql xD

anyway, it would be awesome to do this in separate pages. Maybe creating a mybb task which updates the file, 50 users each X minutes...
Post: #29
01-04-2013, 02:11 AM
(This post was last modified: 01-04-2013, 04:36 AM by Majes.)
optimusgeorge

Junior Member
Posts: 1

I'm getting this error. Any help would be much appreciated...

Parse error: syntax error, unexpected T_STRING in /home/content/o/p/t/optimusgeorge/html/forums/inc/plugins/pagemanager.php(799) : eval()'d code on line 1
Post: #30
03-04-2013, 07:41 PM


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Release]  New page: MyBB Rules Page Andrew F. 1 33,763 06-01-2015, 07:02 PM
Last Post: 123
  [Release]  New page: MyBB Contact Form with reCAPTCHA Andrew F. 21 91,665 06-01-2015, 07:01 PM
Last Post: 123



Users browsing this thread: 1 Guest(s)