By dsanchez on
I wonder how to do that. Currently the "Author map" block allows to show it only in node pages, but not in the profile.
Thanks in advance!
David.
I wonder how to do that. Currently the "Author map" block allows to show it only in node pages, but not in the profile.
Thanks in advance!
David.
Comments
Any update on this?
Any update on this?
Premium component based Drupal themes
User Location block
Create a new block at admin/build/block and put this in it:
Passing Phase Web Development
The 5.x-3.0-rc2 version of
The 5.x-3.0-rc2 version of location requires different treatment.
Instead of this:
use this
Passing Phase Web Development
I still see no map on the
I still see no map on the profile page... perhaps this is because I'm using content profile? At least your code fix made the error disappear.
Location block on usernode versus nodeprofile
Thanks!
This worked well for the USER location for us on 5.x.
For newbies, here's the complete code by NewZeal:
Unfortunately, we would rather use the location on the profile node so we have more flexibility with views (unless someone can think of a bad reason to do this?).
ANYONE KNOW HOW TO MAKE THIS WORK IF YOU ARE USING THE LOCATION ON A NODE LIKE UPROFILE INSTEAD?
New Zeal: That worked great
New Zeal: That worked great for me!
I have one issue: the map that displays is hard set by inline css to be 200px square. I can't for the life of me figure out what's setting that. Does anyone know how to change that? I have all my defaults set to something other, and the code above sets the width to 100%.
Any ideas?
Premium component based Drupal themes
Drupal: how to get people confused...
...or how to make simple things complicated.
At least that's the feeling I get most of the time when trying to work out something in Drupal. After two years of banging my head against walls I still feel like a newbie and definitely still do not understand Drupal philosophy.
Why is a simple user-location-map not a core element on the user page???? (that you just turn off or on)
What is the logic behind having users indicate their location on a map if that map can not even be shown on their page? At least not in an easy way...
Isn't Drupal meant to be maker and user friendly?
First I tried the plain user stuff - no way to have a map.
Then I downloaded the profile module hoping for additional 'show' options, only to find out that both have maps... So now I don't even know which one to use anymore (or both and have some nice duplicity of info?). Profile map does not show up either anyway...
I just discovered that in blocks you can tell the 'author map' to appear in the profile, so I turn it on. No map...
As a last hope for rescue I tried New Zeal's suggestion. But still no map. Of course, it's for D5. I'm afraid I don't know how to debug the differences to get it to work in 6.
I see all those solutions about using panels, creating nodes, additional code, applying filters and stuff and I get scared and a headache. ¿Why does Drupal have it's people take the complicated way?
Isn't there just some code (a piece of Gmap macro?) that should be put in the user.module to generate the corresponding user's map? Or something close to the already existing code on the user editing page ....or profile.... Why not re-use that (by default)?
Sorry I sound upset but I feel that I'll never advance from newbie to moderate level with all this senseless trial and error on apparently basic things.
I started with Drupal in 2007 and then my life got stuck...
For example, some code in the body of the profile...
I just found out the following:
1 - You copy the Map Macro from the 'author map' block under
admin/build/block/configure/gmap_location/1 (or whatever user) which is:
[gmap |width=100% |height=200px |control=None |behavior=+autozoom +notype]
(this has some automated map behavior)
2- Here you can add the coordinates and some other stuff if you want.
You can find it through the user-profile at user/1/edit/profile (beware: not just the standard user account, but the profile module! - so if you hadn't already download and activate it) assuming that you already placed yourself (or your user) on the map. You open the format field and hit Create a Macro (map/macro). At the bottom you find the full code of your location map. Copy the part you are interested in (coordinates, markers, control....)
3 - You combine it with the Map Macro from line 1 and you get something like:
[gmap markers=small red::52.010762,4.354737 | width=100% |height=200px |control=None |behavior=+autozoom +notype]
4 - Put this in the body part of the user-profile and you will have a map in the user-profile with a marker for his or her location. But of course, unfortunately it's not dynamic, and you won't want to put the map manually for every user.
BUT I INSIST
Wouldn't it be enough to have just a line of code that simply uses the Gmap macro above and have PHP automagicaly generate the user's coordinates?
I started with Drupal in 2007 and then my life got stuck...
Yes, you're totally right, it
Yes, you're totally right, it would be enough. And you would have a 500Mo CMS... with a 3000 modules list to admin, each time a module would be released, that would mean a work to integrate it into the core. With a major fix each day, hard work to maintain for webmasters!
No thanks. The modular approach gives you a way to have a small and powerful CMS easy to maintain on last releases.
BTW, there's nothing "automagical" in software development... there's only work, and work, and work.
But you're (really) right on one point : one could imagine a system where you would have only a line to put to install stuffs, like what is done in Joomla for instance. There's two common things where Drupal has messed : the importance given to the path system (which is not clear for a non geek user, and for instance makes hard to use the menu system : this should be an intern variable, not a thing that final user has to manipulate) and the install process where users have to manage the files processing.
That would be great if some webservice could retrieve available modules in some general deposits ("Location" would be one of this deposit, with all GMAP and Location modules for instance) and then give the possibility to user to install it with a click and then to activate it with another. Eclipse has choosen this way to manage addons.
I think this could be done in a near future, it's not very complicated but needs a work on defining the right wsdl.
Drupal rocks!
www.tahiticlic.com