Blogger Tag Cloud Script

Being bored on a Monday morning, I wrote this script.

Its’ for bloggers with an FTP account, (non-blogspot account), this tag cloud will read the contents of your ‘labels’ folder and create a formatted cloud of links based on file sizes and category headings.

Blogger Tag Cloud Script – (php server – php 4 or higher)

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




Untitled Document










Chunky Borders


// php tag cloud - blogger ftp accounts tag cloud for labels folder.
// The tag cloud automatically takes the contents of your labels folder,
// reads the files and gives the values according to the number of posts.
// Change the 'labels' location marked.
// Please leave my little marker at the bottom. Thanks.

$handle = opendir('../labels/'); // change **
if (!empty($handle))
{
while (false !== ($page = readdir($handle)))
{
if ($page != "." && $page != "..")
{ $filesize = filesize('../labels/'.$page); // change **
$labels[] = array ("page" => $page, "filesize" => $filesize); }
}


}
// tag cloud functionality ===
foreach ($labels as $key => $value){
$tags[$value["page"]] = $value["filesize"];
}

$max_size = 180; // max font size in %
$min_size = 58; // min font size in %


$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));


$spread = $max_qty - $min_qty;
if (0 == $spread) {
$spread = 1;
}


$step = ($max_size - $min_size)/($spread);

foreach ($tags as $key => $value) {
$size = $min_size + (($value - $min_qty) * $step);

echo 'style="font-size: '.$size.'%; font-weight: 200; "'; // change **
$delim = '.';
$page = substr($key, 0, strpos($key, $delim));
echo ' title="'.$page.'" >'.$page.'
';
}
// end tag cloud

?>











Angelina Jolie – Locations of chidren

angelina jolies tattoo
Using this photograph of Angelina Jolie’s tattoo, I’ve geolocated each of her spawn.

And this map shows the location of each of Angelina Jolie’s children from the latitude and longitude tattoo’s on her arm.

Bearing in mind one of her children was born in a pond, we can only assume GPS was not experiencing the leaps forward of modern days.
Unless she wants to get them lazered out and corrected, here they are.

Serbia & Kosovo – A new front for the war on terror

Kosovo: 10th December marks the official deadline for sovereignty negotiations to end. For someone that’s visited Kosovo (and Serbia) within the last 3 months, I can bring back the following observations.

a) Kosovo has been invaded by Albanians:
Maybe you need to quantify this statement in wikipedia. As a foreign onlooker, the number of Albanian, not Serbian, flags throughout the territory leads you to believe you’re in Albania, not Serbia.

b) Almost 1/3 of the traffic on the roads is KFOR:
If, like the newspapers are saying, there is a rumbling of radicalism. It stands to be toward the Serbs.
With 45,000 troops stationed there, any attack on Kosovo is likely to be met with stiff resistance and international back-up.

In black and white
Historically pitted with conflict, there are no black and white solutions.
In an attempt to be seen to be ‘doing good’, KFOR’s presence has had the net-effect of setting both Serbia and Kosovo back 7 years, also, giving rise to the growth of criminal cells with close links to terrorism, who have prospered under the troops presence through illegal-goods, prostitution and the supply of drugs.

The politics
Personally, I don’t think the region has any potential for serious conflict, Serbia is too poor and Kosovo has too many troops.

If Kosovo achieves independence, you can expect that within 5-10 years resolutions will make it part of the wider Albanian authority, and eventually becoming part of Albanian territory per-se.

The nature of the beast


I’m just trying to be clear about the reasons why people do things:

You have a subject; who you torture. You know the outcome.

You carry on the torture, knowing the outcome.

In order to get to torture the subject in the first place, you tell lies, knowing there’ll never be an outcome.

Welcome home Mike
I am undergoing torture at the moment.
People surrounding my flat, are using weapons, low frequency weapons to keep me awake at night.
I haven’t been to sleep properly for 4 days.

The effects of the weapons is a slight tingling sensation. This is accompanied by a sound like a television or electrical device, barely audible, like background static.
You can hear the devises being turned on and off on the walls in the properties adjacent to mine.
When they are turned on, the tingling starts.
It is possible to sleep if you move away from the devise.

The past number of nights I’ve been moving my bed around. At the moment it’s up against a chest of drawers next to a window.

The spirit of Christmas past
Is this punishment for not signing a contract with Unilever 10 years in my past.

If I’ve done something wrong, shouldn’t the Police arrest me and I be tried?

There’s no reason to torture me. I’m not going to confess to anything.

Nothing’s going to change.
Nothing’s going to happen.

If you believe there’s suddenly going to be a result. You are wrong.

Just thought I’d let you know.