Hi,
First of all, thank you for your outstanding work on an awesome module!
Is it possible to have the user's location show (via Gmap) within their profile page?
Currently, I have it set to show the location in the profile page, but all I get is a location header (h2 tag), with no info underneath. However, if I go to the edit tab for the user, the map does display with the user's location. This can't be a workaround however, because I cannot give all users access to edit each other's profiles. I do not believe this is a permissions issue, because the same issue happens when logged in as the super-user. I'm running drupal 5.7 with Location 5.x-3.x-dev and GMap version 5.x-1.0-beta1.
I'm attaching two screenshots, one showing the regular profile page, and the other showing the profile's edit page (showing the map).
Any help would be greatly appreciated!
| Comment | File | Size | Author |
|---|---|---|---|
| user-edit-tab.gif | 48.33 KB | mherchel | |
| profile.gif | 21.1 KB | mherchel |
Comments
Comment #1
NewZeal commentedCreate a block at admin/build/block and insert the following code (Drupal 5) Make sure you select php input filter.
Comment #2
mrgoltra commentedGood Day,
I tried the code above but I am getting an error
user warning: Unknown column 'type' in 'where clause' query: SELECT latitude, longitude FROM cmmc_location WHERE lid = 1 AND type = 'user' in /hsphere/local/home/mysite.com/includes/database.mysql.inc on line 174.
Looking at the location table structure, there is no entry for eid. I do have lid. Any ideas?
Thank you,
Mark
Comment #3
NewZeal commentedThe solution was for Drupal 5 not 6...
You'll have to debug the differences to get it to work in 6.
Comment #4
mrgoltra commentedI think original post is for 5.7? Thanks.
Comment #5
mrgoltra commentedThe long way
The way I did it was to use advance profile kit + location module + nodeprofile + panels2 + gmap
once you configure all of the modules. In your user profile panel add the location map block.
Comment #6
apanag commented@New Zeal
Thanks for the post man. I only changed this line:
to this:
Drupal 5.14
Comment #7
mherchelThat doesn't seem to be working for me. Did you have to do any additional config of the Location Map Block? I can't get it to work.
Comment #8
yesct commentedmherchel, which fix did you try?
another idea to try: use content profile, and add a cck field to the profile to display the map. (maybe by adding a view that finds the location for the uid for content profile type nodes, maybe with a relation on content profile, and use a display of a gmap... I know that is a lot of maybe's)
Also, try using the latest dev version, there have been a lot of commits and it might be working better in there.
Post back if you are still wanting to get this to work.
Comment #9
mherchelI was able to get this working using the code on http://drupal.org/node/205811#comment-1067358 in addition to the modifications within the following comment: http://drupal.org/node/205811#comment-1130586
Thx
Comment #10
yesct commentedmarked #360759: Help with map display within profile as a duplicate of this one. (It has a pointer to another module that might help as an alternative.)
Comment #11
yesct commentedmarked #396618: Display user's location in a block as a duplicate of this one
Comment #13
tassoman commentedThat code works using Drupal6 and the actual location module. The only problem is ballon it's empty. How to customize baloon's content?
Comment #14
neillodwyer commentedSame here... code from post #9 worked a treat. Thanks everyone.