Have you tried WordPress 2.0 yet? Did you find a bug? Leave a comment here and let me know what desperately needs to be fixed.
For the first time since 1998, the year will be about one second longer, as scientists agreed to add a leap second to the year.
Among other things, this means you start the 10-second countdown to midnight at 11:59:51 pm.
The once-common “leap second” is the first in seven years and reflects the unpredictable nature of the planet’s behavior.
The International Earth Rotation and Reference Systems Service in Paris keeps track of time by measuring the Earth’s rotation, which varies, and by an atomic clock, which is unwavering. When a difference in the two clocks shows up, the IERS adds or subtracts a second to the year.
For the first time since 1998, the IERS will sneak in an extra second this year to get time back in synch, officials said in a statement Monday.
On Dec. 31, the clock will read like this as it leads into Jan. 1, 2006:
23h 59m 59s … 23h 59m 60s … 00h 00m 00s. Normally, the seconds would roll from 59 directly to 00. — Live Science
Since 1972, when the technology had advanced sufficiently to keep accurate time, scientists have added 22 leap seconds. This weekend’s will be the 23rd.
If you’re upgrading to WordPress 2.0 and use Google AdSense, there is something very important you need to know to ensure you continue to get well-targeted ads, and that Google doesn’t suspend your account for program violations.
One of the new features in WordPress 2.0 is a live post preview. If you scroll to the bottom of the page while editing a post, you’ll see a live preview of how your page will look once it’s published. This is a very nice addition to WordPress, but for AdSense publishers, and those using other context-targeted ad networks, it presents a serious problem.
When the post preview is rendered, it will try to fetch your Google ads!
And because the post hasn’t been published yet, when Google’s bot tries to crawl the page a few seconds later, it will receive a 404 error.
The best case scenario for this is that some of you (who don’t use permalinks) will receive very poorly targeted ads for up to two weeks after you publish your post.
And the worst case scenario, since Google prohibits displaying ads on 404 pages, is that you could get your account suspended.
WordPress 2.0 does provide a solution, though; it’s the new
is_preview template tag. This new tag tells whether the post is being displayed in the post preview section while it’s being edited.
So all you need to do is to add in a check for this into your template code wherever you have placed AdSense, and the problem will be solved. Just add this code around your AdSense code:
<?php if (!is_preview()): ?>
// Paste your AdSense code here //
<?php endif; ?>
This way, the post preview will not try to show Google ads, and they will only be shown once your post is published. This will keep your AdSense account safe and your ads well-targeted.
Update: It’s come to my attention that
is_preview() may be broken. If you find that’s the case, submit a bug report and post the ticket number in the comments below so we can track it.
Update: I’ve tested
is_preview() and it seems to be working just fine. Like other template tags, it only works inside the loop, though.
Update: Since people frequently place ads outside the loop, there needs to be a way to test for this outside the loop. The following workaround worked for me:
<?php global $wp_query; if (!$wp_query->is_preview): ?>
// Paste your AdSense code here //
<?php endif; ?>
Update: Ticket 2188 is open for
is_preview() acting strangely.
I’m finally making progress on getting Bad Behavior 2 debugged and in some sort of releasable shape. I was hoping to have it ready by now, but I had computer problems earlier in the week and spent most of a day and night working that out.
So I’ll be spending this weekend and probably Christmas Day working on Bad Behavior 2. Such is my life.
This is the third in a series of updates on the roadmap to Bad Behavior 2, the next major version of the Web’s premier link spam killer for PHP-based sites of all types.
The Bad Behavior API and callback layers are complete; the core code is now completely independent of the host application, which should make it much easier to port to other PHP-based systems. As proof of concept I’m developing an ExpressionEngine extension, in addition to the traditional WordPress plugin and MediaWiki extension. Other platforms should be able to get on board pretty quickly.
The first pre-release code should be out sometime this weekend, sleep and cash flow permitting. Those of you who are porting to other platforms will be able to work from this codebase with minimal or no changes through the final 2.0 release.
Remember, Bad Behavior is a user-driven project. If you feel that Bad Behavior has been useful to you and want to support its continued development, feel free to send along your holiday wishes. Yes, I know ’tis the season to max out the credit cards. Still, providing you with software that worries about spam so you don’t have to is what I do. And without your support, I’ll have to go do something else. (Thanks again to those of you who already contributed!)
I complained last time that I hadn’t yet received a copy of ExpressionEngine and wouldn’t be able to delay development of Bad Behavior much longer to wait for it. Well, this afternoon, the long-awaited beta copy of EE 1.4 arrived in my inbox, and so I’ll be spending the weekend looking at it and seeing what all needs to be done for a port.
Unfortunately, every host platform is somewhat different, and it’s becoming increasingly clear that installation for some platforms is going to be hairy at best, but compared to other plugins for those same platforms, about average.
I’ve had to drop the idea of using a PHP class for Bad Behavior’s tests, as it simply was too slow. Classes will still be used for certain host platforms that require them or where it will benefit, for the glue layer, but the core itself will be a set of callable functions.
I have been able to reduce the number of global variables used, though; the only thing global that’s particularly needed are the server globals anyway. Everything else can be passed around. This carries a slight performance penalty, but it’s much cleaner code, and you won’t notice a few microseconds here and there.
In other news, I’ve been busier than expected with trying to work on things that actually pay me money, of which Bad Behavior is only rarely such a thing. That also tends to delay development somewhat, as I generally don’t pull all-nighters anymore, for instance. 🙂
I’ve also been tossing around the idea of creating an alternative to Akismet, Matt Mullenweg’s commercial spam screening service. Because the API is open, anyone could (assuming the proper know-how) create their own service that talks to the Akismet plugin.
It isn’t all that hard to set up such a service, but as Matt found out, it does have to be funded somehow. So he went with a commercial model based on obtaining WordPress API keys… I can’t do that.
So if you’re interested in seeing a noncommercial Akismet replacement service, click here.
Anyway, I’m preparing to spend most of the weekend working on Bad Behavior. Feel free to leave your comments below. Nice holiday wishes are appreciated, too. After all, most of you missed my birthday…
If you’re one of the few people still using the Proxomitron proxy server, you’ve probably already noticed that you can’t access a large — and growing — number of sites on the Web.
Unfortunately, Proxomitron contains a bug which causes it to be blocked by Bad Behavior, even when accessing a site placed on the program’s “bypass” whitelist. Under normal circumstances, I would contact the author and advise him of the problem, and a fix would be out shortly thereafter, but this isn’t possible for Proxomitron.
Unfortunately, Bad Behavior cannot detect the use of Proxomitron, and thus there is nothing I can do; Proxomitron users will, if they continue using it, continue being blocked by Bad Behavior, and continue to find themselves locked out of a growing number of sites.
Since the final release of the product two and a half years ago, a product has appeared on the Internet which makes Proxomitron obsolete. That product is called Firefox.
And if you still need an HTTP proxy, consider using Privoxy, which is open source, well-supported, and (when not deliberately misconfigured) passes Bad Behavior just fine.
The Coca-Cola Company will introduce a new advertising slogan in 2006, along with new energy drinks and sodas.
Next year, it will introduce Coca-Cola Blak, a coffee-flavored drink that will be marketed as an energy beverage and soda. Coca-Cola will also debut an advertising slogan, “Welcome to the Coke side of life,” in 2006. . . .
Coca-Cola Blak will debut in France in January and move into other countries, including the U.S., next year. . . .
The company continues to make new soft drinks. It is developing a citrus-flavored energy soda called Vault in addition to Coca-Cola Blak.
Earlier this year, the company introduced calorie-free Coca-Cola Zero, which tastes similar to Coca-Cola Classic, and it reformulated Diet Coke with Splenda sweetener.
Coca-Cola recently started selling black cherry vanilla-flavored Coke and Diet Coke and said it will stop selling Diet Coke with Lemon, Vanilla Coke and Diet Vanilla Coke because of weak demand. — Bloomberg News
You heard it here first.
If you want something done right, you have to do it yourself.
This is why I’ve implemented my own What is your IP address and proxy server tool.
In addition to IP address, I’ve also built a What are your HTTP headers tool.
The IP address tool attempts to detect and expose a proxy server, if one is in use, and show the address behind the proxy, if known, as well as the public IP address.
And the HTTP headers tool shows all of the HTTP headers sent on that request, and if you are experimenting with Bad Behavior, you’ll find this an invaluable tool.
The denial message reads, Header ”Pragma” without ”Cache-Control” prohibited for HTTP/1.1 requests.
(This is part of a series of new tests for spambots which claim to use the HTTP/1.1 protocol but actually do not do so properly.)
The trouble has been traced to a problem with those particular bots, and Syndic8 and PubSub have been notified.
Until they are able to fix their bots, you can add them to Bad Behavior’s whitelist.
Update: If you’re being blocked by Bad Behavior, don’t comment here. Read this.