GeoMashup
[ class tree: GeoMashup ] [ index: GeoMashup ] [ all elements ]

Source for file user.php

Documentation is available at user.php

  1. <?php
  2. /**
  3.  * This is the default template for the User info window in Geo Mashup maps.
  4.  *
  5.  * Don't modify this file! It will be overwritten by upgrades.
  6.  *
  7.  * Instead, copy this file to "geo-mashup-user.php" in your theme directory,
  8.  * or "user.php" in the Geo Mashup Custom plugin directory, if you have that
  9.  * installed. Those files take precedence over this one.
  10.  *
  11.  * For styling of the info window, see map-style-default.css.
  12.  *
  13.  * @package GeoMashup
  14.  */
  15. ?>
  16. <div class="locationinfo user-location-info">
  17. <?php if GeoMashupQuery::have_users() ) ?>
  18.  
  19. <?php GeoMashupQuery::list_users'callback=geo_mashup_user_default_template' )?>
  20.  
  21. <?php else ?>
  22.  
  23.     <h2 class="center">Not Found</h2>
  24.     <p class="center">Sorry, but you are looking for something that isn't here.</p>
  25.  
  26. <?php endif?>
  27. </div>
  28. <?php 
  29. /**
  30.  * Template callback for GeoMashupQuery::list_users()
  31.  *
  32.  * @since 1.3
  33.  * @param object $user The user to display.
  34.  */
  35. function geo_mashup_user_default_template$user 
  36.     GeoMashupQuery::set_the_user$user );
  37. ?>
  38. <div id="div-user-<?php echo esc_attr$user->ID )?>" class="vcard">
  39.     <div class="fn">
  40.         <span class="type"><?php _e'Display Name' )?></span>: <span class="value"><?php echo esc_attr$user->display_name )?></span>
  41.     </div>
  42.     <?php echo GeoMashup::location_info'fields=locality_name,admin_code&format=<div class="adr"><span class="locality">%s</span>, <span class="region">%s</span></div>' )?>
  43.     <?php if isset$user->user_url && strlen$user->user_url ?>
  44.     <div class="url">
  45.         <span class="type"><?php _e'Website' )?></span>: <a class="value" href="<?php echo esc_attr$user->user_url )?>"><?php echo esc_attr$user->user_url )?></a>
  46.     </div>
  47.     <?php endif?>
  48. </div>
  49. <?php ?>

Documentation generated on Sat, 09 Jul 2011 21:55:00 -0700 by phpDocumentor 1.4.3