I am experimenting with APK on Drupal 6.10 to learn it. I installed APK, Content Profile and Panels2 modules for panel based profiles. I am using the uprofile provided by APK. I tried to add a google map to user profile page via Gmap+Location modules as a panel pane, but I couldn't. I am using "node locations" module for adding locations to profiles as nodes. I can see and modify the google map via user/1/edit/uprofile . I added the "Location map" pane to uprofile via panels. but it does not show up in the profile. Is there are a special setting necessary in the panels? I thought that maybe "node locations" module cannot find out the node number as "user_profile" panel is taking only "User ID" as an argument.

Comments

mcload’s picture

Status: Active » Closed (fixed)

I saw that it was asked before at http://drupal.org/node/353929 .

mcload’s picture

Project: Advanced Profile Kit » Location
Version: 6.x-1.0-alpha1 » 6.x-3.1-rc1
Status: Closed (fixed) » Active

Could anybody set this up for D6?

mcload’s picture

Status: Active » Needs review

I solved it with a crude patch to gmap_location.module file. The problem is that it expects a node id as an argument, but APK+Content Profile+Panels2 based profile page sends only a user id to the module. Find the code

          if (arg(0)=='node' && is_numeric(arg(1))) {
            return gmap_location_block_view(arg(1));
          }

and replace with

          if (arg(0)=='user' && is_numeric(arg(1))) {
          	$node2= content_profile_load('uprofile', arg(1));
		$profileid= $node2->nid;
          	return gmap_location_block_view($profileid);
          }elseif (arg(0)=='node' && is_numeric(arg(1))) {
          	return gmap_location_block_view(arg(1));
          }

Replace 'uprofile' in the code with the name of your profile content type. There may be a way to get the name of content type automatically, but I do not know for now.

yesct’s picture

is this a suggestion to make a change to a location module file? maybe create a patch: http://drupal.org/patch/create

tagging.

sleepingloach’s picture

I do not mean to mix issues, but this is similar -

The panels based profiles do not allow the CCK fields from the location module to be chosen for display. I would like to show only the city and state in the public facing user profile (not the entire gmap), but I record more detail as I allow proximity searching in a view.

How could those fields be displayed in panels?

Matt

frankcarey’s picture

@sleepingloach

If you use a node context in your panel, then load node content (like teaser or fieldgroup) into a pane, this should work to get that stuff. Note that cck 2.3 doesn't work with panels 2 anymore. any further questions, please start a new thread?

nickl’s picture

Category: support » feature
Status: Needs review » Needs work

Subscribe - This vaguely resembles getting a map to display on node view so I will bite.

Status: needs review, means that we have a diff patch rolled which us eager patch junkies can easily apply, test, review and give feedback. Lets keep the gears greased and get rid of all these open issues.

Changed
Status to needs work: Please roll a patch.
Category Feature request: since this doesn't appear to currently be possible without a patch so not support request anymore.

ankur’s picture

Status: Needs work » Closed (works as designed)

I think this should now be possible with #487790: Panels integration