Considering how regularly new versions of Firefox now come along, that's quite some bug fix list in version 10! http://t.co/K3I2vLpW 1 week ago

4th
Sep 09

Torture numbers, and they’ll confess to anything



..as the writer Gregg Easterbrook once said.

I’ve been less than impressed with the governments recent decision on how to tackle illegal filesharing1, but now it’s been revealed that the statistics that they are using to back it all up are dubious, to say the least.

Or as someone else once declared, “facts are stubborn things, but statistics are more pliable.”

Why let little things such as facts and hard evidence get in the way when you have something to prove?

  1. and for those that missed it, they’re insisting that ISPs remove customers internet access if their IP is traced and they’re found to share files. So, no possible issues there then! []

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly



4th
Sep 09

Switching blog content on and off


A while ago I realised that I had a need to be able to turn off particular content on and off, as required, on particular posts and pages. In this case, it was to switch off comments and/or advertisements (they default as being switched on). For example, you may have an “About Me” page on which you may not want people to be able to leave comments.

The solution was quite simple and makes use of the custom fields feature.

First of all, find the code that you need to find switchable within your theme page and add the following before it…

<?php $nocomment=get_post_meta($post->ID,"nocomment",false); ?>
<?php if ($nocomment[0]!="Yes") : ?>

And immediately after it…

<?php endif; ?>

What this does is look for a custom field named “nocomment”. If it exists and doesn’t contain “Yes” then it will execute the code in question. Obviously, you can change the field name as you require – make sure you change the reference in the above code as well.

I have another, titled “noad”, which I then use for turning off advertisements on particularly pages.

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly