HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


ocUsermap - Comments

Login / Search

 [ Join | More ]
 

ocUsermap by Kamen Blaginov

Downloads: 493
Added: 24 May 2011
A main block, which shows a google map with markers of users locations. It adds extra custom profile fields to store members coordinates to store their latitude and logitude. The addon can automatically populate the members when members visit the block page (only supported by browsers that support the HTML 5 Location API, e.g. Firefox). Members can edit their locations in their profile. Coordinates of the Google map centre point and zoom level are also…

Avatar
I was able to get the other map system you made to work, but this one will not display on the site I'm hoping to get it going on.

Any ideas on why one would work and not the other?

files in place, block placed with working api key, but no map and no place in profile to edit location.

Avatar
how did you install it? manually extraction, or properly via addon management?

Avatar
hmmm, manual extraction. I will do it the other way and report....

Avatar
Ok, I have now re-done it properly, it is listed now in the addons, and I replaced the block - and it still does now show a map. There are also still no things in the profile to edit your location.

the other map addon that allows adding places via catalog, works fine (though I probably should go install it correctly so it's in the addons list.)

site I'm working on: Indyfest USA - your guide to self publishing events - Indyfest USA

it's a basically blank install of Ocportal 7.1 RC1 (though it was upgraded along with the rest of my multisites set-up….)

I am wondering if there is a multisites reason that this particular addon is not working…especially since the other does flawlessly…this one is based on showing members.

Avatar
Hi,

My advice was right, except now we have a bug too. The addon installer isn't installing the block, and blocks don't install themselves. You'll need to go to Structure > Addons, then scroll to the bottom and go to Module Management, choose Blocks, and click the green plus next to the name of the block.

That'll create the CPFs. The map will still be blank until some users have entered long/lat data.

The bug will be fixed in 7.1.

Avatar
I love helping find bugs! I have performed the operation described. It did not, however, make the blank map for members positions appear…nor any controlls in the profile edit to add co-ords for the map.

The other map still works perfectly.

BTW: I noticed while in there that all the FACEBOOK blocks also are not installed, and installed them as well, and now that stuff works better too. Now I need to go through my other 6 websites and do that operation for the the facebook blocks….back later to see if any more insight to this add-on is gained.

Indyfest USA - your guide to self publishing events - Indyfest USA

Avatar
No 'Latitude' and 'Longitude' fields when you edit a profile?

Are the CPFs there?

Avatar
nope, no lat/long fields to enter.

If you tell me what a CPF is and where to check it, I will!


Avatar
custom profile field, icon under tools->members

Avatar
HMMMM!!! I have 20 CPFs, and, only 5 of them have NAMES…the rest are just there with random yes and no on the options, but if you edit them, they toss an error that the resource does not exist.

This lead me to the idea that perhaps because of my multisites set up, it is not installing properly, so I installed the add on to the MAIN, parent site.

This addon does not work there either, it did not add any fields to the CPFs, and the map block does not display. It LOOKS like everything installed correctly with the ocp import tools, and I added the blocks activation after installing as discovered.

I can note on the main site, there are NOT any extra CPF fields that are uneditable, they are all valid and working on the main site.

I have it's block sitting on the homepage right now:

Where Small Press Meets - Dimestore Productions




Avatar
Need to make a correction on the Indyfest site, I found that blank fields 19+20 are editable, and are named ocp_latitude, etc.

However, while they have a name when editing them, and I added a description, and made sure the member viewable box is checked, when you hit enter, the name still does not appear, and the yes/no under member viewable is still no.

if you go back in to re-edit, the values are still there and still right, but they arent functioning or something.

tripple checking on my main site…those feilds are not there at all.

Avatar
I could be wrong but I seem to recall someone had posted a method a while back to grab approx lat and long at sign up automatically. Maybe it was in community docs. I will try and find it.

Avatar
that's not the actual problem we're digging into here, and there is a website that lets people find their coords which I'll likely put in there in some way to help people get their numbers…but it would be a cool "approx" thing…is it based on like IP address or something?

Avatar
It was actually on ocPortal that I had seen that and it was for use with this adon. So I thought it worth a mention.

Avatar
Brian-

I think what you are talking about is actually part of the add-on based on the add-on description:
A main block, which shows a google map with pins of users locations. It adds extra custom profile fields to store members coordinates to store their latitude and logitude. The addon automatically populates the members when members visit the block page (only supported by browsers that support the HTML 5 Location API, e.g. Firefox). Members can edit their locations in their profile. Coordinates of the Google map centre point and zoom level are also config…

Brian Hay said

It was actually on ocPortal that I had seen that and it was for use with this adon. So I thought it worth a mention.

Avatar
Oh, yes that is probably what I was thinking of. Thanks Bob  :$

Avatar
I can partly explain it. There is a bug with editing CPFs on MSN's as you guessed. It shows the central ones, but it edits the local ones. Also the names wouldn't show right either as it is looking for local name translations on the central data. The attached file should fix these issues.

Attachment
adminzone/pages/modules/admin_ocf_customprofilefields.php
» Download: admin_ocf_customprofilefields.php (19 Kb, 233 downloads so far)


I can't explain why the block will not work on the central site. It's really the case that the lat/long fields did not create there either?

Avatar
It is, but I will test this all out in a couple hours, and try to re-install on the central site. Report back soon.

Avatar

Avatar
Thanks for that, temp.

I plan on using ocUsermap and this will be a help.

Bob

Avatar
When I get some solid time I'm also planning on creating a 'patch' for ocUsermap to use Google maps API v3 which will not require an API key.

I've already played with it some time ago when I first installed ocUsermap and it will have at least a couple of UI enhancements.

(Chris, I haven't forgotten about timezones. Its almost complete, just need a block of time to do the final checks and conversion. I don't want to rush it.)

Avatar
Chris: your file got the lat and long fields to show up and work on the satelite site, and entering my coords (well, my post office) got the map to appear. so the Indyfest USA - your guide to self publishing events - Indyfest USA site has complete joy, and I can now give the maps a page each and doccument their use for our members as I wanted.

This does not, however, change what is going on at the MAIN site. As I said, the lat long fields do not show up there at all, and I have uninstalled and reinstalled, and it did not change that. So now we have a situation where the satellite site has the coords in the profile, but the same profile viewed in the main site, does not, and those fields do not exist in the CPF, even though the add on was appearantly installed the exact same way as the satellite site. whew! While i do not NEED it to work on the main site, I am willing to help identify the WHY here so it can be solved for other people who need multisite and this add on. Let me know what I can do next to help with that.

main site: Where Small Press Meets - Dimestore Productions


Avatar
I'm not having any luck with this addon - the CPFs are not created even after installing the main_google_map_users. It seems like there should be more than this one module to install but it was the only one not already installed. Should there have been other modules?







Bob




Avatar
Got it…

The sources_custom/hooks/systems/ocf_cpf_filter/latitude.php file is needed, which we have incorrectly put in the ocdatamap addon. So just install that addon and it should be fine.

Avatar
That makes sense. I know that when I installed ocusermap I also installed a few other addons as well, including ocdatamap. That explains why I did not have problems.

Avatar
When I woke up today, the MAP was appearing fine on the main site main page…but the lat long fields were still missing. Adding the other map module to this site did make those fields appear. so it sounds to me like the user map is dependent on the data map at this time. so I guess these mysteries are solved now.

(wanders away muttering about finding something else to dig into….)

Avatar
Thanks for the fix, Chris. Will you be removing the dependency on ocDatamap in 7.1?

Bob


Last edit: by BobS

Avatar
Testing this on my test site, I created a new account using Firefox 4.0.1 but the long and lat fields were not populated.

I have installed ocDatamap and also made sure the module blocks are installed. Do I need to do something else?

Bob

EDIT: SOLVED Needed to install Geo-ip data. Long and lat now populate.


Last edit: by BobS

Avatar

BobS said

Thanks for the fix, Chris. Will you be removing the dependency on ocDatamap in 7.1?

Bob

For the record, reuploading it now.

Show 3 more replies

1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand