Make WordPress Core


Ignore:
Timestamp:
04/28/2004 04:42:37 AM (21 years ago)
Author:
saxmatt
Message:

Changes from Carthik.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-geo.php

    r1179 r1196  
    11<?php
     2
    23function get_Lat() {
    34    global $post;
    45
    56   if ($post->post_lat != '') {
    6        return $post->post_lat;
     7       return trim($post->post_lat);
    78   } else if(get_settings('use_default_geourl')) {
    8        return get_settings('default_geourl_lat');
     9       return trim(get_settings('default_geourl_lat'));
    910   }
    1011
     
    1617
    1718   if ($post->post_lon != '') {
    18        return $post->post_lon;
     19       return trim($post->post_lon);
    1920   } else if(get_settings('use_default_geourl')) {
    20        return get_settings('default_geourl_lon');
     21       return trim(get_settings('default_geourl_lon'));
    2122   }
    2223
     
    5051<script type='text/javascript'>
    5152<!-- This script and many more are available free online at -->
    52 <!-- The JavaScript Source!! http://javascript.internet.com -->
     53<!-- The JavaScript Source!! -->
    5354function formHandler(form) {
    5455  var URL = form.site.options[form.site.selectedIndex].value;
     
    100101    if (!get_settings('use_geo_positions')) return;
    101102    if (longitude_invalid()) return;
    102     echo "http://www.acme.com/mapper/?lat=".get_Lat()."&amp;long=".get_Lon()."&amp;scale=11&amp;theme=Image&amp;width=3&amp;height=2&amp;dot=Yes";
     103    echo "http://www.acme.com/mapper?lat=".get_Lat()."&amp;long=".get_Lon()."&amp;scale=11&amp;theme=Image&amp;width=3&amp;height=2&amp;dot=Yes";
    103104}
    104105
     
    134135}
    135136
     137function print_TopoZone_Url() {
     138    if (!get_settings('use_geo_positions')) return;
     139    if (longitude_invalid()) return;
     140    echo "http://www.topozone.com/map.asp?lat=".get_Lat()."&amp;lon=".get_Lon();
     141}
     142
     143function print_FindU_Url() {
     144    if (!get_settings('use_geo_positions')) return;
     145    if (longitude_invalid()) return;
     146    echo "http://www.findu.com/cgi-bin/near.cgi?lat=".get_Lat()."&amp;lon=".get_Lon()."&amp;scale=100000&amp;zoom=50&amp;type=1&amp;icon=0&amp;&amp;scriptfile=http://mapserver.maptech.com/api/espn/index.cfm";
     147}
     148
     149function print_MapTech_Url() {
     150    if (!get_settings('use_geo_positions')) return;
     151    if (longitude_invalid()) return;
     152    echo "http://mapserver.maptech.com/api/espn/index.cfm?lat=".get_Lat()."&amp;lon=".get_Lon();
     153}
     154
    136155?>
Note: See TracChangeset for help on using the changeset viewer.