Archive for June, 2006

Fixing Internet Explorer

Saturday, June 24th, 2006 | Life

The admin panel to one of my new projects uses a menu frame on the left and the main frame on the right similar to how phpBB, vBulletin and probably countless other scripts do it.

The problem was that Internet Explorer would add un-needed hoziontal scroll bars to every page. Well, I thought it was the menu at first, then all pages then I noticed it was only some pages. I tried to work out which pages it was but I couldn’t find anything in the HTML. It turned out to be whether there was vertical scrolling or not. If there was, IE would also add a horizonal scroll bar.

I found the answer in a journal post on No Scope which presented several solutions, I went with the one that forced vertical scroll bars which for some reason makes IE act normal. The only problem was that this forced a vertical scroll bar in even when it wasn’t needed. I could settle with having it forced upon IE users but I didn’t want Firefox users to suffer so I then went in search of the easiest solution to include extra CSS information for IE preferably without using server side.

I found this answer on Arve Bersvendsen‘s website as you can comment code out and put in [if IE] and Internet Explorer will pick it up which is pretty neat.

The wonders of functions

Saturday, June 24th, 2006 | Life

JavaScript is a funny language. This causes a “not implemented” error in Internet Explorer…

window.onload = document.forms.f.q.focus();

But this works fine…

window.onload = function(){
	document.forms.f.q.focus();
}

Hmmm.

Llamage

Saturday, June 24th, 2006 | Life

My windfall on Wednesday has left me in a good situation. Now that I once again have money I can get some Llamage in. Such as today when we went for lunch as a last outing before Sarann goes home. Sarann actually turned up virtually on time and was the first one there, I joined her soon after and we ordered food though unfortunatly by the time Matt and Kieran turned up they had just stopped serving.

Just after 8 everyone else headed off for a curry but I bailed at this point as I had already eaten a lunch at home and at the Llama so I got the bus home and did some coding. Which thanks to my time at home is going pretty well, I have quite an exciting project nearing a release candidate so yay, hopefully that will be available at least in demo form soon.

Wikipedia has fallen

Thursday, June 22nd, 2006 | Life

Well, sort of.

It could only really last so long really. If you are looking for one central target for abuse on the internet, Wikipedia has to be a good candidate.

But it was also a shining star. If anything saved my belief in humanity, it was Wikipedia and the general concept of wikis. The fact you could put something on the internet that anyone could edit and people wouldn’t crap all over it and abuse it as much as possible.

Of course this isn’t the case, there is a lot of abuse of wikis, most of which seems to be targetted at mine. Still, it was nice to imagine, at least for a little while that people on the internet were on the whole nice people that weren’t looking to screw you.

Wikipedia has now increased it’s restrictions though. It has three levels, protected (nobody can edit), semi-protected (you need to be registered for 4 days) and unprotected. Recently, lots of pages have been moved onto a higher protection level. To stop abuse of course, but it’s a sad that they need to use this kind of protection to protect pages.

If you want to read more about the changes, there is an article on News.com.

addcslashes

Thursday, June 22nd, 2006 | Life

If you ever find yourself needing to escape literal characters such as \n in PHP, the function you are looking for (and which I have been looking for, for the past few days (on and off at least)) is addcslashes.

This seems to take care of it…

<?php
$escaped = addcslashes($not_escaped, "\0..\37!@\@\177..\377");
?>

Then use stripcslashes when decoding it. If you are putting it into a database you will need to escape it again when inserting it but you don’t want to escape your literal characters then so you can just use addslashes (or something more secure, try mysql_real_escape_string).

Productivity

Wednesday, June 21st, 2006 | Life

I feel I have been quite productive with regards to coding recently. I got to bed at 1:30 am on Monday night and dragged my ass out of bed at 9 the next morning so I could get some work done and I got a full day (well not a full, full day but a good day at least) of coding in before going to Sarann’s for the movie night. Well, movie night is probably a bit of a strong term, we put on Madagascar but we soon got talking and I don’t really know what happened once whey were sent into the wild.

Myself, Claire, Kieran and Michelle all ended up crashing at Sarann’s. Claire has a quite amazing ability to fall alseep at super speed. Me and Kieran were just talking for a few minutes and next thing we know, Claire was fast alseep. And this was only at like 1:30.

I woke up at 6:30 at which point Kieran informed me we had achived the required 5 hours sleep and so should now get back to coding :D. Which I pretty much did, I got a bus home and coded until I had to leave to met everyone back at the Quilted Llama for lunch. Luckily my EFT had kicked in as I literally had no money in town. I spent the remaining cash I had on my day rider in the morning and lent £2 to my sister so I literally had nothing at all. But I was able to take some money out even though that money should be in my savings account. But I AM going to put it back, someone make sure I don’t spend it!

I now have more money thankfully as my gran and grandma have given me £80 worth of back-dated pocket money (I still get pocket money off them, how cool is that :D) so I’m less screwed that I thought I was but I am still going to keep expenses to a minimal, at least until I get a job.

So yeah, over today and yesterday I have done a lot of coding which has been cool, I hope I can sustain the amount of work I’ve been putting in to some of the projects as the things that are being coded are the moment are so awesome. I love when you are really fired up about a project, you have so much energy for it.

Llamage

Wednesday, June 21st, 2006 | Life

Oh, how did I manage to go 4 days without llamage? It’s crazy. Although there will probably be longer gaps over the summer. Still my EFT came through so I had a bit of money to see my through a quick session. Still no luck on the job front though, I managed to find another agency today but they said they weren’t registering anyone else at the moment. They did take my CV though. Not much hope there though.

Conclusion for the summer

Tuesday, June 20th, 2006 | Life

Tonight is really the conclusion of everything for summer. Well, the season finale was Wendy House and I’m not going to say too much other than the fact that I am some kind of all-knowing deity (ok, I’ll say a bit more, there was sex, amongst other things, unfortunately not for yours truly) but anyway…

Tonight is the episode after the last episode really. Everyone is going home soon as this is the last chance I will see people (even though I thought that was Wendy House). I prefer this as Wendy House is too loud to say a proper goodbye and it’s nice to just hang out, it seems a better exit. I probably should have gone by now, will write more maybe later.

That said, I haven’t been writing much lately. Looking at my posts I have maintained a decent post count but I really haven’t felt like blogging much. Maybe it’s just because the days seem longer (as I’m not rushed off my feet at home) but I don’t feel like I have blogged much or had much to say. Which I probably haven’t given I have been doing less. But on the flip side, Particle Links has had loads of development on it :D.

Ash gets called a muppet

Monday, June 19th, 2006 | Life

Gary sent this to me. I feel it should be shared with the world.

Ash gets called a muppet

Creek Log

Monday, June 19th, 2006 | Life

I’ve started a new blog over on WordPress.com named Creek Log. It’s going to be a blog of my Dawson’s Creek watching over the summer. I was just going to post it all on here but then I thought, with over a hundred episodes there is going to be a lot of posts to trawl through which aren’t going to be amazingly interesting so I thought it best to start a new one. One which was hosted so I wouldn’t have to maintain it. Hense the result.