Archives for 2009
You are currently browsing 17 articles posted 2009.
aFramework Release
Published Monday 28th of December 2009
I've put it up for too long now but I've finally made a (beta) release of aFramework to the public.

I've had some freelance the last couple of months (a new version of "Our Life as Elderly") which has meant that I've had to fix certain things with aFramework like brushing up all the admins and fixing a couple of bugs.
The main thing though is that aFramework now natively supports more than one language on the same site. Each language gets its own URL like: mysite.com (default language), mysite.com/sv/ (swedish), mysite.com/es/ (spanish) etc.
I've also made tons of other fixes, tweaks and optimizations. If you check the svn commits you'll see plenty of them the last few months.
Anyway, as it all started to shape up quite nicely I figured it was time to release it to the public so I put together a super-simple one-page-style and a zip with the latest code and put it all on a-framework.org (everything else was taken :/).
There's a demo too where you can check out most of the features as well as try out the admin.
Laters
Be the first to post a comment
Merry Christmas!
Published Thursday 24th of December 2009
From a ridiculously hot Thailand.

Photo by Francesco MarinoAnd a Happy New Year!
Be the first to post a comment
Monkey con Banana
Published Thursday 17th of December 2009
In Koh Lanta's Mangrove Forrest.
Be the first to post a comment
aFramework's Dynamic Admin: aDynAdmin
Published Friday 20th of November 2009
The other night I felt like coding so I built a little app I've been thinking about for a while now.
It's basically a lightweight PHPMyAdmin with just the most necessary and it allows users to insert, update and delete rows from any table in their database.
It uses SHOW TABLES and SHOW COLUMNS to dynamically generate everything from the navigation to the items table to the update/insert forms.
Most of aFramework's modules come with "in-page" admins but the dynamic admin allows users to get a little better overview of things as well as giving them full control over their databases.
There's a bit left before I can start offering aFramework for download for real, but it's definitely getting closer and if you're really interested you can always check out the source over at Google Code.
Laters
Join 2 others and post a comment
I'm In Thailand!
Published Thursday 12th of November 2009
Once again I've been quiet for a while and again it's because I've been slacking off! :)
A while back I mentioned that I was about to move to Thailand and the reason I've been so quiet is 4 weeks ago I landed in Bangkok and I've just been chilling since.
Join 1 others and post a comment
Skate 3 Announced!
Published Wednesday 16th of September 2009
Finally EA Skate 3 has been announced, I've been waiting for this ever since I finished 2!
As you can see in the trailer they've added underflips and darkslides. Part from that I have to say it looks pretty much the same as Skate 2. Here's a few things I wish they'd improve/add:
Join 4 others and post a comment
Accessible, Stylish Modal Windows With Modern CSS
Published Wednesday 12th of August 2009
With this tutorial I will try to show you a way to do accessible, stylish modal windows (complete with an overlay-div) without using a single image and just a couple of div-elements.
Our goal is to create a generic modal that can be re-used and that has these basic features:
Modals should be hidden by default, except if the user has JavaScript disabled
The modal should be centered in the view port, even as the user scrolls
The modal should have those semi-transparent, rounded corners I've been seeing a lot of lately :)
There should (obviously) be an overlay behind the modal, preventing the user from interacting with anything behind it
Clicking outside the modal (i.e. on the overlay) should hide the overlay as well as all open modals (could be optional)
Clicking a link pointing to a modal (a[href=#login] for example) should open the modal and display the overlay
Don't use any images and keep it accessible!
You can check out the example here. We'll kick off simple with the HTML.
Join 7 others and post a comment
Am on a Break
Published Thursday 23rd of July 2009
You might've noticed it's been a bit quiet around here lately. I've taken a little break and I forgot to tell you.

If you've checked exscale lately you'll know that I've quit my job (again!) and am in the process of renting my flat out and going for an 8 to 10 month trip around South East Asia.
Come Friday I'll start my two week holiday so I thought I'd just relax, play some video games, skate(!!) and maybe, if I feel like it, do some coding.
See you in a month or so!
Be the first to post a comment
The Site Looks Weird in FF3
Published Tuesday 30th of June 2009
I've been doing more bug-fixing lately, and one I did recently introduced several new ones in FF3 but not in Chrome, Opera, Safari or FF3.5.
What I did was I added a "Continue Reading"-link at the bottom of the article on the home-page. In order to style it without using a class I used the :last-of-type pseudo-class:
#article > p:last-of-type = $icon;As you can see I'm using a type of CSS-constants (new version in the works btw), and because many other selectors should be icons as well they're all merged by the constants-parser so in the end i end up with something like this:
#article > p:last-of-type,
#article > dl:last-child dt,
#quick-about > p:last-child {
/* Icon styling */
}What seems to happen is that when Firefox chokes on one of the selectors it ignores (or improperly parses) the entire block.
Since 3.5 is out I expect it to start taking over so I thought I'd leave this bug as it is.
Sorry for any inconvenience!
Be the first to post a comment
Bug Fixin'
Published Wednesday 24th of June 2009
My evening was kind of free today and I felt like coding so I took the time to sort out some annoying bugs I've been having with aFramework v3, and hence AndreasLagerkvist.com as well.

Here's a list of the updates:
- I've solved the case of the missing RSS-feed.
- I had a bug where line-breaks weren't allowed in comments - pretty bad, but fixed now.
- Removed previous-link from first page recent-comments.
- Now sorting the plugins by name.
- Now the date of a comment links to the comment, the author's name links to his/hers website.
- Fixed broken pagination for search-results.
+ some more, even less interesting fixes.
Stay tuned for real articles :)
Be the first to post a comment
Now Using the Universal IE6 Stylesheet
Published Thursday 18th of June 2009
When looking through the stats for my various sites I noticed that some people are actually still viewing them in IE6. Today I decided to get rid of all my IE6 and IE7-problems forever.
I recently read about Andy Clarke's Universal Internet Explorer 6 CSS and decided it was about time I implemented something like this in aFramework.
Join 3 others and post a comment
Super Simple Ajax (Without a Framework)
Published Friday 12th of June 2009
If you're looking for the bare minimum when it comes to doing cross-browser GET or POST XHR then this might be the script for you.
I know there's hundreds (probably thousands) of these scripts out there already but even the most lightweight ones I could find seemed kind of bloated.
Example
// GET latest-comments.php and update the #latest-comments element
superSimpleAjax({url: 'latest-comments.php'}, 'latest-comments');
// GET article with ID 12 and alert its contents
superSimpleAjax({
url: 'get-article.php',
data: 'id=12',
callback: function (data) {
alert(data);
}
});
// POST a comment to post-comment.php
superSimpleAjax({
method: 'POST',
url: 'post-comment.php',
data: 'author=John Doe&email=johndoe@johndoe.com&content=Hi, my name is John Doe',
callback: function (data) {
alert('Thanks for your comment!');
}
});Grab the code from Google Code. It's about 1k uncompressed.
Enjoy!
Be the first to post a comment
7 Nifty htaccess Tips
Published Monday 8th of June 2009
If you use Apache you've probably heard of a file called .htaccess. It can be extremely useful for a number of different things. Here are some htaccess-tricks I've been using myself.
# A little mod rewritin
<IfModule mod_rewrite.c>
# Start ModRewrite
RewriteEngine On
RewriteBase / # Root-dir for your site
# Prevent access for visitors without user-agent string (prevents some spam)
RewriteCond %{HTTP_USER_AGENT} = ""
RewriteRule .* - [F,L]
# Prevent www-access (you should change the yourdomain-bit)
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://yourdomain\.com/$1 [R=301,L]
# Force a trailing slash for dirs
RewriteRule !\..{2,4}$ - [C]
RewriteCond %{REQUEST_URI} !^.*/$
RewriteRule ^(.+)$ $1/ [R=301,L]
# These are useful for running everything but real files through index.php (the way many CMSes and blogs work)
# Redirect /index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php
RewriteRule ^index.php/?(.*)$ $1 [R=301,L]
# Run everything else but real files through index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1?%{QUERY_STRING} [L]
</IfModule>
# These are for performance and they increase
# speed a lot! (try yslow wiv and wivout)
# Configure ETags
FileETag MTime Size
# Enable expirations
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 3 days"
</IfModule>
# Gzip HTML, CSS and JS
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css application/x-javascript text/plain text/xml
</IfModule>Hope it wasn't all old news to you!
Be the first to post a comment
New Domain, Design, Front-end and Back-end
Published Monday 1st of June 2009
Por fin! A brand new design on a brand new domain running on a brand new back-end!

It took a little longer than I expected but I've finally "finished" AndreasLagerkvist.com.
Join 3 others and post a comment
Past Designs
Published Sunday 31st of May 2009
I work as a web developer for a living. By web developer I mean I take a PSD from a designer and I turn it into HTML, CSS and JS. In other words, I never really design for money.
In my spare time, however, and for my own projects, I always like to do the design myself. There's a really nice feeling of satisfaction when you draw something that you actually like.
It doesn't happen often, and most of the time someone else has probably done it before you but it still feels really nice when you look at something you've created yourself and you feel happy with it.
I've created numerous designs particularly for my old site exscale.se. Most of them are rubbish. I mean total rubbish, but here's three that I was actually kind of pleased with after I finished them.
Be the first to post a comment
The "Ultimate" Video Game
Published Sunday 31st of May 2009
I've owned a PS3 for about a year now and even though there are some really fucking wicked games for the console there hasn't been one yet that I would consider ultimate.
It's a little like with mobile phones. One comes with an Mp3-player but another comes with FM-radio. One has DivX-support but one YouTube-support.
I want a mix of all the best games put together in one massive, ultimate video game.
Be the first to post a comment
Kiefer's Inability to Emphasize
Published Sunday 31st of May 2009
If you've ever watched the TV-show "24" you'll know that in the beginning of every episode Kiefer Sutherland (aka Jack Bauer) states when the coming episode is taking place.
What annoys the shit out of me is his inability to emphasize. Here are a few quotes I put together myself to illustrate what I mean:
Be the first to post a comment



