From af9b7abc5f7baf23b1a174632a880939a9ef70d6 Mon Sep 17 00:00:00 2001 From: mikelittle Date: Tue, 5 Aug 2003 22:44:38 +0000 Subject: [PATCH] Changes for new geourl functionality. Example added to index.php. Install and update done. git-svn-id: http://svn.automattic.com/wordpress/trunk@294 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- b2-include/b2functions.php | 50 ++++++++++++ b2-include/b2template.functions.php | 118 ++++++++++++++++++++++++++++ b2mail.php | 32 +++++++- index.php | 26 ++++-- wp-admin/b2edit.form.php | 9 +++ wp-admin/b2edit.php | 100 ++++++++++++++++------- wp-admin/optionhandler.php | 1 + wp-admin/upgrade-071-to-072.php | 82 ++++++++++++++++++- wp-admin/wp-install-helper.php | 12 +-- wp-admin/wp-install.php | 29 +++++++ wp-locations.php | 37 +++++++++ 11 files changed, 450 insertions(+), 46 deletions(-) create mode 100644 wp-locations.php diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php index 558228c8a..c27a7a9ba 100644 --- a/b2-include/b2functions.php +++ b/b2-include/b2functions.php @@ -511,6 +511,8 @@ function get_postdata($postid) { 'Excerpt' => $post->post_excerpt, 'Title' => $post->post_title, 'Category' => $post->post_category, + 'Lat' => $post->post_lat, + 'Lon' => $post->post_lon, 'post_status' => $post->post_status, 'comment_status' => $post->comment_status, 'ping_status' => $post->ping_status, @@ -529,6 +531,8 @@ function get_postdata2($postid=0) { // less flexible, but saves DB queries 'Excerpt' => $post->post_excerpt, 'Title' => $post->post_title, 'Category' => $post->post_category, + 'Lat' => $post->post_lat, + 'Lon' => $post->post_lon, 'post_status' => $post->post_status, 'comment_status' => $post->comment_status, 'ping_status' => $post->ping_status, @@ -1254,4 +1258,50 @@ function balanceTags($text, $is_comment = 0) { return $newtext; } +function doGeoUrlHeader($posts) { + global $use_default_geourl,$default_geourl_lat,$default_geourl_lon; + if (count($posts) == 1) { + // there's only one result see if it has a geo code + $row = $posts[0]; + $lat = $row->post_lat; + $lon = $row->post_lon; + $title = $row->post_title; + if(($lon != null) && ($lat != null) ) { + echo "\n"; + echo "\n"; + return; + } + } else { + if($use_default_geourl) { + // send the default here + echo "\n"; + echo "\n"; + } + } +} + +function getRemoteFile($host,$path) { + $fp = fsockopen($host, 80, &$errno, &$errstr); + if ($fp) { + fputs($fp,"GET $path HTTP/1.0\r\nHost: $host\r\n\r\n"); + while ($line = fgets($fp, 4096)) { + $lines[] = $line; + } + fclose($fp); + return $lines; + } else { + return false; + } +} + +function pingGeoURL($blog_ID) { + global $blodotgsping_url; + + $ourUrl = $blodotgsping_url."/index.php?p=".$blog_ID; + $host="geourl.org"; + $path="/ping/?p=".$ourUrl; + getRemoteFile($host,$path); +} + + ?> \ No newline at end of file diff --git a/b2-include/b2template.functions.php b/b2-include/b2template.functions.php index 85f9364b4..7af82b4a3 100644 --- a/b2-include/b2template.functions.php +++ b/b2-include/b2template.functions.php @@ -229,6 +229,12 @@ function get_archives($type='', $limit='', $format='html') { /***** Date/Time tags *****/ +function the_date_xml() { + global $post; + echo mysql2date("Y-m-d",$post->post_date); + //echo ""+$post->post_date; +} + function the_date($d='', $before='', $after='', $echo = true) { global $id, $post, $day, $previousday, $dateformat, $newday; $the_date = ''; @@ -287,6 +293,118 @@ function the_weekday_date($before='',$after='') { /***** // Date/Time tags *****/ +/**** // Geo Tags ****/ +function get_Lat() { + global $post; + return $post->post_lat; +} + +function get_Lon() { + global $post; + return $post->post_lon; +} + +function print_Lat() { + if(get_settings('use_geo_positions')) { + if(get_Lat() > 0) { + echo "".get_Lat()."N"; + } else { + echo "".get_Lat()."S"; + } + } +} + +function print_Lon() { + global $id, $postdata; + if(get_settings('use_geo_positions')) { + if(get_Lon() < 0) { + $temp = get_Lon() * -1; + echo "".$temp."W"; + } else { + echo "".get_Lon()."E"; + } + } +} + +function print_PopUpScript() { + echo " + "; +} + +function print_UrlPopNav() { + $sites = array( + array("http://www.acme.com/mapper/?lat=".get_Lat()."&long=".get_Lon()."&scale=11&theme=Image&width=3&height=2&dot=Yes","Acme Mapper"), + array("http://geourl.org/near/?lat=".get_Lat()."&lon=".get_Lon()."&dist=500","GeoUrls near here"), + array("http://www.geocaching.com/seek/nearest.aspx?origin_lat=".get_Lat()."&origin_long=".get_Lon()."&dist=5","Geocaches Near Nere"), + array("http://www.mapquest.com/maps/map.adp?latlongtype=decimal&latitude=".get_Lat()."&longitude=".get_Lon(),"Mapquest map of this spot"), + array("http://www.sidebit.com/ProjectGeoURLMap.php?lat=".get_Lat()."&lon=".get_Lon(),"SideBit URL Map of this spot"), + array("http://confluence.org/confluence.php?lat=".get_Lat()."&lon=".get_Lon(),"Confluence.org near here"), + array("http://www.topozone.com/map.asp?lat=".get_Lat()."&lon=".get_Lon(),"Topozone near here"), + array("http://www.findu.com/cgi-bin/near.cgi?lat=".get_Lat()."&lon=".get_Lon(),"FindU near here"), + array("http://mapserver.maptech.com/api/espn/index.cfm?lat=".get_Lat()."&lon=".get_Lon()."&scale=100000&zoom=50&type=1&icon=0&&scriptfile=http://mapserver.maptech.com/api/espn/index.cfm","Maptech near here") + ); + echo "
"; +} + +function longitude_invalid() { + if (get_Lon() == null) return true; + if (get_Lon() > 360) return true; + if (get_Lon() < -360) return true; +} + +function print_AcmeMap_Url() { + if (!get_settings('use_geo_positions')) return; + if (longitude_invalid()) return; + echo "http://www.acme.com/mapper/?lat=".get_Lat()."&long=".get_Lon()."&scale=11&theme=Image&width=3&height=2&dot=Yes"; +} + +function print_GeoURL_Url() { + if (!get_settings('use_geo_positions')) return; + if (longitude_invalid()) return; + echo "http://geourl.org/near/?lat=".get_Lat()."&lon=".get_Lon()."&dist=500"; +} + +function print_GeoCache_Url() { + if (!get_settings('use_geo_positions')) return; + if (longitude_invalid()) return; + echo "http://www.geocaching.com/seek/nearest.aspx?origin_lat=".get_Lat()."&origin_long=".get_Lon()."&dist=5"; +} + +function print_MapQuest_Url() { + if (!get_settings('use_geo_positions')) return; + if (longitude_invalid()) return; + echo "http://www.mapquest.com/maps/map.adp?latlongtype=decimal&latitude=".get_Lat()."&longitude=".get_Lon(); +} + +function print_SideBit_Url() { + if (!get_settings('use_geo_positions')) return; + if (longitude_invalid()) return; + echo "http://www.sidebit.com/ProjectGeoURLMap.php?lat=".get_Lat()."&lon=".get_Lon(); +} + +function print_DegreeConfluence_Url() { + if (!get_settings('use_geo_positions')) return; + if (longitude_invalid()) return; + echo "http://confluence.org/confluence.php?lat=".get_Lat()."&lon=".get_Lon(); +} diff --git a/b2mail.php b/b2mail.php index 9b8e49cc1..e9080de1e 100644 --- a/b2mail.php +++ b/b2mail.php @@ -156,6 +156,7 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { $blah = explode("\n", $content); $firstline = $blah[0]; + $secondline = $blah[1]; if ($use_phoneemail) { $btpos = strpos($firstline, $phoneemail_separator); @@ -174,6 +175,24 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { $contentfirstline = ''; } + $flat = 999.0; + $flon = 999.0; + $secondlineParts = explode(':',$secondline); + if(strncmp($secondlineParts[0],"POS",3)==0) { + echo "Found POS:
\n"; + //echo "Second parts is:".$secondlineParts[1]; + // the second line is the postion listing line + $secLineParts = explode(',',$secondlineParts[1]); + $flatStr = $secLineParts[0]; + $flonStr = $secLineParts[1]; + //echo "String are ".$flatStr.$flonStr; + $flat = floatval($secLineParts[0]); + $flon = floatval($secLineParts[1]); + //echo "values are ".$flat." and ".$flon; + // ok remove that position... we should not have it in the final output + $content = str_replace($secondline,'',$content); + } + $blah = explode(':', $userpassstring); $user_login = $blah[0]; $user_pass = $blah[1]; @@ -209,7 +228,11 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { if (!$thisisforfunonly) { $post_title = addslashes(trim($post_title)); $content = addslashes(trim($content)); - $sql = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category) VALUES ($post_author, '$post_date', '$content', '$post_title', $post_category)"; + if($flat > 500) { + $sql = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category) VALUES ($post_author, '$post_date', '$content', '$post_title', $post_category)"; + } else { + $sql = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category, post_lat, post_lon) VALUES ($post_author, '$post_date', '$content', '$post_title', $post_category, $flat, $flon)"; + } $result = $wpdb->query($sql); $post_ID = $wpdb->insert_id; @@ -218,7 +241,12 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { } $blog_ID = 1; - rss_update($blog_ID); + if($flat < 500) { + pingGeoUrl($post_ID); + } + // HACK HACK HACK this next line is commented out because I don't know what the word-press replacement + // is. right now it's undefined and does not work + //rss_update($blog_ID); pingWeblogs($blog_ID); pingCafelog($cafelogID, $post_title, $post_ID); pingBlogs($blog_ID); diff --git a/index.php b/index.php index 424214f50..efa836b20 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,8 @@ - @@ -13,6 +14,9 @@ require_once($abspath.'wp-links/links.php'); + @@ -21,7 +25,11 @@ require_once($abspath.'wp-links/links.php'); + + @@ -29,13 +37,19 @@ require_once($abspath.'wp-links/links.php');

- ',''); ?>

- - [] @ + + [] @
+ -360)) { ?> + from:   +

@@ -52,7 +66,7 @@ require_once($abspath.'wp-links/links.php'); - +
diff --git a/wp-admin/b2edit.form.php b/wp-admin/b2edit.form.php index 6ab3b2fb6..429a8c492 100644 --- a/wp-admin/b2edit.form.php +++ b/wp-admin/b2edit.form.php @@ -171,6 +171,15 @@ if ($action != 'editcomment') { } ?>
+ +  +  click for Geo Info +
+ diff --git a/wp-admin/b2edit.php b/wp-admin/b2edit.php index 4ececafa0..b20eb8e0e 100644 --- a/wp-admin/b2edit.php +++ b/wp-admin/b2edit.php @@ -11,7 +11,7 @@ function add_magic_quotes($array) { } } return $array; -} +} if (!get_magic_quotes_gpc()) { $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); @@ -40,7 +40,7 @@ switch($action) { case 'post': $standalone = 1; - require_once('b2header.php'); + require_once('b2header.php'); $post_pingback = intval($HTTP_POST_VARS['post_pingback']); $content = balanceTags($HTTP_POST_VARS['content']); @@ -49,6 +49,14 @@ switch($action) { $excerpt = format_to_post($excerpt); $post_title = addslashes($HTTP_POST_VARS['post_title']); $post_category = intval($HTTP_POST_VARS['post_category']); + if(get_settings('use_geo_positions')) { + $latstr = $HTTP_POST_VARS['post_latf']; + $lonstr = $HTTP_POST_VARS['post_lonf']; + if((strlen($latstr) > 2) && (strlen($lonstr) > 2 ) ) { + $post_latf = floatval($HTTP_POST_VARS['post_latf']); + $post_lonf = floatval($HTTP_POST_VARS['post_lonf']); + } + } $post_status = $HTTP_POST_VARS['post_status']; $comment_status = $HTTP_POST_VARS['comment_status']; $ping_status = $HTTP_POST_VARS['ping_status']; @@ -73,24 +81,36 @@ switch($action) { $now = date('Y-m-d H:i:s', (time() + ($time_difference * 3600))); } - $result = $wpdb->query(" - INSERT INTO $tableposts - (ID, post_author, post_date, post_content, post_title, post_category, post_excerpt, post_status, comment_status, ping_status, post_password) - VALUES - ('0','$user_ID','$now','$content','$post_title','$post_category','$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password') - "); + if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) { + $postquery ="INSERT INTO $tableposts + (ID, post_author, post_date, post_content, post_title, post_category, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password) + VALUES + ('0','$user_ID','$now','$content','$post_title','$post_category',$post_latf,$post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password') + "; + } else { + $postquery ="INSERT INTO $tableposts + (ID, post_author, post_date, post_content, post_title, post_category, post_excerpt, post_status, comment_status, ping_status, post_password) + VALUES + ('0','$user_ID','$now','$content','$post_title','$post_category','$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password') + "; + } + $postquery = + $result = $wpdb->query($postquery); $post_ID = $wpdb->get_var("SELECT ID FROM $tableposts ORDER BY ID DESC LIMIT 1"); if (isset($sleep_after_edit) && $sleep_after_edit > 0) { sleep($sleep_after_edit); } - + if ($post_status == 'publish') { + if((get_settings('use_geo_positions')) && ($post_latf != null) && ($post_lonf != null)) { + pingGeoUrl($post_ID); + } pingWeblogs($blog_ID); pingCafelog($cafelogID, $post_title, $post_ID); pingBlogs($blog_ID); - + if ($post_pingback) { pingback($content, $post_ID); } @@ -136,9 +156,11 @@ switch($action) { $authordata = get_userdata($postdata['Author_ID']); if ($user_level < $authordata->user_level) die ('You don’t have the right to edit '.$authordata[1].'’s posts.'); - + $content = $postdata['Content']; $content = format_to_edit($content); + $edited_lat = $postdata["Lat"]; + $edited_lon = $postdata["Lon"]; $excerpt = $postdata['Excerpt']; $excerpt = format_to_edit($excerpt); $edited_post_title = format_to_edit($postdata['Title']); @@ -164,7 +186,7 @@ switch($action) { $standalone = 1; require_once('./b2header.php'); - + if ($user_level == 0) die ('Cheatin’ uh?'); @@ -179,6 +201,17 @@ switch($action) { $excerpt = balanceTags($HTTP_POST_VARS['excerpt']); $excerpt = format_to_post($excerpt); $post_title = addslashes($HTTP_POST_VARS['post_title']); + if(get_settings('use_geo_positions')) { + $latf = floatval($HTTP_POST_VARS["post_latf"]); + $lonf = floatval($HTTP_POST_VARS["post_lonf"]); + $latlonaddition = ""; + if( ($latf != null) && ($latf <= 90 ) && ($latf >= -90) && ($lonf != null) && ($lonf <= 360) && ($lonf >= -360) ) { + pingGeoUrl($post_ID); + $latlonaddition = " post_lat=".$latf.", post_lon =".$lonf.", "; + } else { + $latlonaddition = " post_lat=null, post_lon=null, "; + } + } $post_status = $HTTP_POST_VARS['post_status']; $prev_status = $HTTP_POST_VARS['prev_status']; $comment_status = $HTTP_POST_VARS['comment_status']; @@ -202,17 +235,17 @@ switch($action) { } $result = $wpdb->query(" - UPDATE $tableposts SET - post_content = '$content', - post_excerpt = '$excerpt', - post_title = '$post_title', - post_category = '$post_category'".$datemodif.", - post_status = '$post_status', - comment_status = '$comment_status', - ping_status = '$ping_status', - post_password = '$post_password' - WHERE ID = $post_ID -"); + UPDATE $tableposts SET + post_content = '$content', + post_excerpt = '$excerpt', + post_title = '$post_title', + post_category = '$post_category'".$datemodif.", + ".$latlonaddition." + post_status = '$post_status', + comment_status = '$comment_status', + ping_status = '$ping_status', + post_password = '$post_password' + WHERE ID = $post_ID "); if (isset($sleep_after_edit) && $sleep_after_edit > 0) { sleep($sleep_after_edit); @@ -223,7 +256,7 @@ switch($action) { pingWeblogs($blog_ID); pingCafelog($cafelogID, $post_title, $post_ID); pingBlogs($blog_ID); - + if ($post_pingback) { pingback($content, $post_ID); } @@ -258,6 +291,15 @@ switch($action) { if ($user_level < $authordata->user_level) die ('You don’t have the right to delete '.$authordata[1].'’s posts.'); + // send geoURL ping to "erase" from their DB + $query = "SELECT post_lat from $tableposts WHERE ID=$post"; + $rows = $wpdb->query($query); + $myrow = $rows[0]; + $latf = $myrow->post_lat; + if($latf != null ) { + pingGeoUrl($post); + } + $result = $wpdb->query("DELETE FROM $tableposts WHERE ID=$post"); if (!$result) die('Error in deleting... contact the webmaster.'); @@ -348,11 +390,11 @@ switch($action) { $content = format_to_post($content); $result = $wpdb->query(" - UPDATE $tablecomments SET - comment_content = '$content', - comment_author = '$newcomment_author', - comment_author_email = '$newcomment_author_email', - comment_author_url = '$newcomment_author_url'".$datemodif." + UPDATE $tablecomments SET + comment_content = '$content', + comment_author = '$newcomment_author', + comment_author_email = '$newcomment_author_email', + comment_author_url = '$newcomment_author_url'".$datemodif." WHERE comment_ID = $comment_ID" ); diff --git a/wp-admin/optionhandler.php b/wp-admin/optionhandler.php index d2e76def5..408259330 100644 --- a/wp-admin/optionhandler.php +++ b/wp-admin/optionhandler.php @@ -15,6 +15,7 @@ function get_option_widget($option_result, $editable, $between) switch ($option_result->option_type) { case 1: // integer case 3: // string + case 8: // float case 6: // range -- treat same as integer for now! if (($option_result->option_type == 1) || ($option_result->option_type == 1)) { $width = 6; diff --git a/wp-admin/upgrade-071-to-072.php b/wp-admin/upgrade-071-to-072.php index 7746dea3e..fb6839b2e 100644 --- a/wp-admin/upgrade-071-to-072.php +++ b/wp-admin/upgrade-071-to-072.php @@ -43,6 +43,7 @@ if (!$step) $step = 0; switch($step) { case 0: + { ?>

Welcome to WordPress. You're already part of the family so this should be familiar to you now. We think you'll find to like in this latest version, here are some @@ -69,9 +70,11 @@ switch($step) {

Have you looked at the readme? If you’re all ready, let's go!

Step 1

There are some changes we need to make to the links tables with this version, so lets get those out of @@ -201,10 +204,57 @@ if ($error_count > 0) {

OK, that wasn't too bad was it? Let's move on to step 2!

Step 2

+

There are some changes we need to make to the post table, we'll do those next.

+'."\n"; +} else { + $res .= 'There was a problem with ' . $tablename . '
'."\n"; + ++$error_count; +} + +$ddl = "ALTER TABLE $tableposts ADD COLUMN post_lat float "; +maybe_add_column($tablename, 'post_lat', $ddl); +if (check_column($tablename, 'post_lat', 'float')) { + $res .= $tablename . ' - ok
'."\n"; +} else { + $res .= 'There was a problem with ' . $tablename . '
'."\n"; + ++$error_count; +} + + +if ($error_count > 0) { + echo("

$res

"); +?> +

Hmmm... there was some kind of error. If you cannot figure out + see from the output above how to correct the problems please + visit our support + forums and report your problem.

+ +

OK, another step completed. Let's move on to step 3.

+ +

Step 3

There are a few new database tables with this version, so lets get those out of the way.

+see here', 8, 20)", +"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(87,'default_geourl_lon', 8, 0.0, 'The default Longitude ICBM value', 8, 20)", + +"INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(9,'Geo Options', 'Settings which control the posting and display of Geo Options')", + +"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,84,1)", +"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,85,1)", +"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,86,1)", +"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,87,1)", +); + +foreach ($geo_option_data as $query) { + $q = $wpdb->query($query); +} +?> + +

Geo option data inserted okay.

+

Good, the option data was inserted okay.

@@ -741,7 +814,8 @@ foreach ($links_option_data as $query) {

You can now go play with your updated blog

diff --git a/wp-admin/wp-install-helper.php b/wp-admin/wp-install-helper.php index 08161c415..369f26f66 100644 --- a/wp-admin/wp-install-helper.php +++ b/wp-admin/wp-install-helper.php @@ -1,5 +1,6 @@ get_col("DESC $table_name",0) as $column ) { + if ($debug) echo("checking $column == $column_name
"); if ($column == $column_name) { return true; } @@ -90,15 +92,15 @@ function maybe_drop_column($table_name, $column_name, $drop_ddl) { ** Extra */ function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) { - global $wpdb; + global $wpdb, $debug; $diffs = 0; $results = $wpdb->get_results("DESC $table_name"); foreach ($results as $row ) { - //print_r($row); + if ($debug > 1) print_r($row); if ($row->Field == $col_name) { // got our column, check the params - //echo ("checking $row->Type against $col_type\n"); + if ($debug) echo ("checking $row->Type against $col_type\n"); if (($col_type != null) && ($row->Type != $col_type)) { ++$diffs; } @@ -115,7 +117,7 @@ function check_column($table_name, $col_name, $col_type, $is_null = null, $key = ++$diffs; } if ($diffs > 0) { - //echo ("diffs = $diffs returning false\n"); + if ($debug) echo ("diffs = $diffs returning false\n"); return false; } return true; diff --git a/wp-admin/wp-install.php b/wp-admin/wp-install.php index 316e1ba30..902af73a2 100644 --- a/wp-admin/wp-install.php +++ b/wp-admin/wp-install.php @@ -192,6 +192,8 @@ $query = "CREATE TABLE $tableposts ( post_title text NOT NULL, post_category int(4) NOT NULL default '0', post_excerpt text NOT NULL, + post_lat float, + post_lon float, post_status enum('publish','draft','private') NOT NULL default 'publish', comment_status enum('open','closed') NOT NULL default 'open', ping_status enum('open','closed') NOT NULL default 'open', @@ -358,6 +360,8 @@ $option_data = array( "INSERT INTO $tableoptiontypes (optiontype_id, optiontype_name) VALUES (5, 'select')", "INSERT INTO $tableoptiontypes (optiontype_id, optiontype_name) VALUES (6, 'range')", "INSERT INTO $tableoptiontypes (optiontype_id, optiontype_name) VALUES (7, 'sqlselect')", +"INSERT INTO $tableoptiontypes (optiontype_id, optiontype_name) VALUES (8, 'float')", + //base options from b2cofig "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(1,'siteurl', 3, 'http://example.com', 'siteurl is your blog\'s URL: for example, \'http://example.com/wordpress\' (no trailing slash !)', 8, 30)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(2,'blogfilename', 3, 'index.php', 'blogfilename is the name of the default file for your blog', 8, 20)", @@ -618,6 +622,31 @@ foreach ($links_option_data as $query) {

Links option data inserted okay.

+see here', 8, 20)", +"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(87,'default_geourl_lon', 8, 0.0, 'The default Longitude ICBM value', 8, 20)", + +"INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(9,'Geo Options',Settings which control the posting and display of Geo Options')", + +"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,84,1)", +"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,85,1)", +"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,86,1)", +"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,87,1)", + +); + +foreach ($geo_option_data as $query) { + $q = $wpdb->query($query); +} +?> + +

Geo option data inserted okay.

+ +

OK. We're nearly done now. We just need to ask you a couple of things:

diff --git a/wp-locations.php b/wp-locations.php new file mode 100644 index 000000000..42100edda --- /dev/null +++ b/wp-locations.php @@ -0,0 +1,37 @@ +\n"; ?> + += 0; $i--) { + $post = $posts[$i]; + start_b2(); + if ((get_Lon() != null) && (get_Lon > -360) && (get_Lon() < 360 )) { +?> + + + + + + + + + + + + + + +