BMEWS
 
Sarah Palin's presence in the lower 48 means the Arctic ice cap can finally return.

calendar   Tuesday - January 11, 2011

updated?

I think I may have finally got the flag thing fixed on the comments. Too many people have written in, saying “Why does it show me in country ______ when I’m in country ____?”

That’s because the internet has grown by leaps and bounds since this version of the blog software was installed. IP addresses once associated with some country have been assigned to other countries. Thousands of new IP addresses have been created, and none of them were in the database tables for this blog.

It would cost me quite a bit of money, lots of time, and several ulcers to update the Expression Engine (EE) software to the current version. So I’m not going to do that. Too bad, as the latest version has the ability to just click a button and you can update all that IP and country information.

No, Drew had to do it the hard way. First I had to figure out what was wrong, then I had to find where everything was located - and the structure of this blog has dozens and dozens of folders on the server side, with thousands of files in them ... and that’s just the stuff that makes the blog run, not the posts, comments, and images. Then I had to get the update scripts and translate the current version of the database tables back into the early version that this blog software uses, then I had to modify all that data into flat SQL commands. This is an impressive amount of data, about 1500 pages worth in MS Word; around 50,000 records. Even editing the data caused Word to roll over and die several times, but I got it done.

Next I had to find the tables in the database out on the server. Um, this is getting scary. I haven’t messed about with databases in more than a decade. Truncating all the existing records while the tables were active? Crivens! But that’s what you have to do. And there is no such thing as an “un-truncate” function: once you dump the existing data it is gone. Forever. Then I had to paste in the new commands to enter each individual record. Hell, it took 3 minutes just for the paste command to go through. That’s a LOT of data. Then run it. And cross my fingers that the blog software is robust enough so that any “not found” returns from any database table queries that came back while the data updates were running didn’t cause the whole damn blog to crash. Yikes!

And it worked. WOO HOO!!!!

So now the “flags of the world” folder is updated with the latest images of all the world’s flags, the country code table has been brought up to speed, and the IP to Country table has 45,000 new entries, 790 pages worth of commands that look like

INSERT INTO exp_ip2nation (ip, country) VALUES(692551680, ‘ng’); (this just happens to be Nigeria, which now has listings for over 20 IPs. But no flag in the EE World_flags file! Niger neither.)

And that means the flag thing is just about fully modernized. “Just about” because the new table layout has more fields, which allows certain oddball parts of the world to come back with a proper hit on the tables. Places like “Palestine” which the raw data wanted to list as “occupied territory”. Oh the hell you say! I spent a gleeful 2 minutes changing “occupied territory” to “terrorists”, then realized that changing this aspect of the new format to work with the old format was too much of a pain. So I dumped that chunk of data. Which means that any comments or posts from these places may come back with an “unknown”, although my reading of the actual computer code ... which is not the best ... implies that the USA will be the default value. Not that we have any Paleoswinian members. I checked. Nipping off that part of the data cut 300 pages off the document and shortened things up by about 5000 records. So if you’re sending in a comment from the remote island of UngaBunga, gee, too bad, you may not get the proper flag displayed.

So lets see what happens. If it still is messed up, well, maybe I’ll fix it and maybe I won’t. This was a fair amount of work, and a bit of a scary thrill, but it’s not something I want to mess with more than once a year or so.


avatar

Posted by Drew458   United States  on 01/11/2011 at 10:50 AM   
Filed Under: • Blog Stuff •  
Comments (6) Trackbacks(0)  Permalink •  
Page 1 of 1 pages

Five Most Recent Trackbacks:

Once Again, The One And Only Post
(4 total trackbacks)
Tracked at iHaan.org
The advantage to having a guide with you is thɑt an expert will haѵe very first hand experience dealing and navigating the river with гegional wildlife. Tһomas, there are great…
On: 07/28/23 10:37

The Brownshirts: Partie Deux; These aare the Muscle We've Been Waiting For
(3 total trackbacks)
Tracked at head to the Momarms site
The Brownshirts: Partie Deux; These aare the Muscle We’ve Been Waiting For
On: 03/14/23 11:20

Vietnam Homecoming
(1 total trackbacks)
Tracked at 广告专题配音 专业从事中文配音跟外文配音制造,北京名传天下配音公司
  专业从事中文配音和外文配音制作,北京名传天下配音公司   北京名传天下专业配音公司成破于2006年12月,是专业从事中 中文配音 文配音跟外文配音的音频制造公司,幻想飞腾配音网领 配音制作 有海内外优良专业配音职员已达500多位,可供给一流的外语配音,长年服务于国内中心级各大媒体、各省市电台电视台,能满意不同客户的各种需要。电话:010-83265555   北京名传天下专业配音公司…
On: 03/20/21 07:00

meaningless marching orders for a thousand travellers ... strife ahead ..
(1 total trackbacks)
Tracked at Casual Blog
[...] RTS. IF ANYTHING ON THIS WEBSITE IS CONSTRUED AS BEING CONTRARY TO THE LAWS APPL [...]
On: 07/17/17 04:28

a small explanation
(1 total trackbacks)
Tracked at yerba mate gourd
Find here top quality how to prepare yerba mate without a gourd that's available in addition at the best price. Get it now!
On: 07/09/17 03:07



DISCLAIMER
Allanspacer

THE SERVICES AND MATERIALS ON THIS WEBSITE ARE PROVIDED "AS IS" AND THE HOSTS OF THIS SITE EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, TO THE EXTENT PERMITTED BY LAW INCLUDING BUT NOT LIMITED TO WARRANTIES OF SATISFACTORY QUALITY, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SERVICE OR ANY MATERIALS.

Not that very many people ever read this far down, but this blog was the creation of Allan Kelly and his friend Vilmar. Vilmar moved on to his own blog some time ago, and Allan ran this place alone until his sudden and unexpected death partway through 2006. We all miss him. A lot. Even though he is gone this site will always still be more than a little bit his. We who are left to carry on the BMEWS tradition owe him a great debt of gratitude, and we hope to be able to pay that back by following his last advice to us all:
  1. Keep a firm grasp of Right and Wrong
  2. Stay involved with government on every level and don't let those bastards get away with a thing
  3. Use every legal means to defend yourself in the event of real internal trouble, and, most importantly:
  4. Keep talking to each other, whether here or elsewhere
It's been a long strange trip without you Skipper, but thanks for pointing us in the right direction and giving us a swift kick in the behind to get us going. Keep lookin' down on us, will ya? Thanks.

THE INFORMATION AND OTHER CONTENTS OF THIS WEBSITE ARE DESIGNED TO COMPLY WITH THE LAWS OF THE UNITED STATES OF AMERICA. THIS WEBSITE SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE UNITED STATES OF AMERICA AND ALL PARTIES IRREVOCABLY SUBMIT TO THE JURISDICTION OF THE AMERICAN COURTS. IF ANYTHING ON THIS WEBSITE IS CONSTRUED AS BEING CONTRARY TO THE LAWS APPLICABLE IN ANY OTHER COUNTRY, THEN THIS WEBSITE IS NOT INTENDED TO BE ACCESSED BY PERSONS FROM THAT COUNTRY AND ANY PERSONS WHO ARE SUBJECT TO SUCH LAWS SHALL NOT BE ENTITLED TO USE OUR SERVICES UNLESS THEY CAN SATISFY US THAT SUCH USE WOULD BE LAWFUL.


Copyright © 2004-2015 Domain Owner



GNU Terry Pratchett


Oh, and here's some kind of visitor flag counter thingy. Hey, all the cool blogs have one, so I should too. The Visitors Online thingy up at the top doesn't count anything, but it looks neat. It had better, since I paid actual money for it.
free counters