Hello all -

I am relatively new to Drupal and even more so to PHP. I have a rather simple request which I'm sure someone will be able to quickly do. After searching for days on how to implement this, I haven't found any documentation on how to pass the location.module variables so that they can be used in ways other than provided by the base installation.

In particular, I am looking to create a custom user_profile.tpl.php file in which I can display the custom profile fields I have created (got this to work), but also display the location that each user has inputted (haven't gotten this to work). In particular, I found this piece of code in location.module that ties to exactly what I want to do:

if ($user_setting == LOCATION_USER_COLLECT && $op == 'view' && (user_access('administer users') || $GLOBALS['user']->uid == $user->uid) && variable_get('location_display_location', 1) && !_location_is_empty($user->location)) {

    $items[] = array(
      'value' => theme('location', $user->location),
      'class' => 'location',
    );

It calls the module.theme, gets variables from that and then displays them at the bottom of the window if I click:

Enable the display of locations. on the location setting page.

Ultimately, what I would like to do is to be able to display the location data directly from some type of code from the user_profile.tpl.php file, but without having to check this setting. (I do not want to check this setting because it will display location information for more than just user profiles (event pages, nodes, etc), plus, I haven't figured out how to check it, pass the variables, but not display the default result, ie. the Location data at the end of the page)

Any hints? I haven't seen a single thing about custom themes for location.module, even though the base install seems to imply that it is possible -- "If you are interested in turning off locations and having a custom theme control their display, you may want to disable the display of locations so your theme can take that function."