
You know why!
I’m been spammed by this Chinese spam bot. It tries to post on my non-existing guestbook by loading /?guestbook&action=write and generating dummy hits on my wordpress blog front page. Today I decided to stop that.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^guestbook&action=write$
RewriteRule ^index.php$ / [G]
</IfModule>
Now you are done and that url returns now 410 error code, which means the resource is gone.
Yesterday I booked the return tickets from Helsinki to Bucharest from Kilroy Travels. It was ~500 euros for both of us. So not that bad. \o/
Now the I just need to pressure/convince Philip to come as well… We’ll see how it goes. I’ve been trying that already few times with no luck yet. Me and Bobby just have to unite our forces.
Well, I was asked to do a suggesting text-box for one field in the UI so that it would be easier to type in the info which apparently is the one they make most of the errors. I did it with some script.aculo.us love. It’s nice that they have pretty good docs.
So basically what you have to do is include
<head>
...
<script src="scriptaculous/lib/prototype.js" type="text/javascript"></script>
<script src="scriptaculous/src/scriptaculous.js" type="text/javascript"></script>
...
</head>
Then add
<label for="signum">Signum</label>
<input id="signum" name="item[signum]" type="text" />
<div id="signumhint" class="signumhint"></div>
<script type="text/javascript">
// <![CDATA[
new Ajax.Autocompleter("signum","signumhint","AjaxController.php?get=signum", {})
// ]]>
</script>
Then add process the request, this is from my AjaxController.class.php draft
function handleRequest($post, $get) {
if(count($post) <= 0 && count($get) <= 0) {
return null;
}
if($post['item']['signum'] != null) {
$signums = $this->getSignums($post['item']['signum']);
}
$this->makeUnorderedList($signums);
$this->printList($signums);
}
function makeUnorderedList($results) {
$unorderedList = Array();
$unorderedList[] = '<ul>';
foreach($results as $result) {
$unorderedList[] = '<li>'.$result.'</li>';
}
$unorderedList[] = '</ul>';
return $unorderedList;
}
function printList($unorderedListArray) {
foreach($unorderedListArray as $item) {
print $item;
}
}
You also need to edit your css so that the hints div will look nice. It’ll be populated data. In here the hints field css looks like this:
.signumhint {
position: absolute;
font-size: 0.8em;
background-color: white;
left: 8em;
z-index: 100;
}
.signumhint ul {
list-style-type:none;
margin:0px;
padding:0px;
}
.signumhint ul li.selected { background-color: #ffb;}
.signumhint ul li {
list-style-type:none;
display:block;
margin:0;
padding:0;
height:32px;
cursor:pointer;
}
And voila, you’re good to go.
Since I came back from London, I swore I’ll visit Vlad aka Bobby, good one Phil, in Romania. So we’ve, me and Johanna, have been planning this for quite a while now. What it all comes down now is if we Johanna can get her vacation on 4.8.-7.8. and when that’s sure we’ll book the tickets. Hopefully that will cleared either today or tomorrow because I want the tickets as cheap as possible
I’m really looking forward to see Bucharest and Transylvania. I’m really grateful to Bobby that she has invited us there and promised even to plan schedule there. That’s just brilliant. I’ve invited her to Finland in return but I she hasn’t been interested yet. Anyhow, I’ll take her some Gilmore Girls and maybe something else as well… We’ll see.
What I’ve been doing lately? Well, work, visiting Johanna in Jokioinen and that’s about it. Oh yes, and watching soccer as well
Which Johanna doesn’t really appreciate. Anyway the near future holds brilliant times because there’s Ruisrock with Tool next sunday and Ilosaarirock a week after that. So my weekends have been booked in advance for quite a while now. I probably have to take next monday off free from work because Tool stops playing at 0.30 at the earliest so I doubt I can get proper sleep if I’ll try to travel to Jyväskylä same evening.
Anyway I’ll put up some pictures soon enough to everyone see. I haven’t even delivered pictures to Ananda from the Oxford trip so I have to do that as well… Cheerio for now.
Powered by WordPress