Code

Internet Explorer limits stylesheets links to 30 could be the reason your styles are not applied

// July 3rd, 2010 // Comments Off // Code

After spending several hours the other day working on the endless adaption of Internet Explorer 6 for a Drupal project, and wondering why the styles in the conditional stylesheet I had added weren’t being applied, I stumbled on a small note that IE for some reason limits the number of linked stylesheets to 30 before it stops rendering. This causes the styles in any additional stylesheets to not be applied although the stylesheet is in the code. This seems like another stupid limitation in the painfully crappy (yes, it’s a pro term) IE series of browsers.

(more…)

Greasemonkey script for quotations and line-height

// May 28th, 2010 // Comments Off // Code

It’s been bothering me for such a long time that so many sites have forgotten/ignored to set their line-height which makes their sites unreadable. After some googling I found an excellent typography script by Josefec.

(more…)

First Drupal modules online

// March 8th, 2010 // Comments Off // Code

So, the day has finally come. My first two Drupal modules are now online at Drupal.org. Both of them are add-ons to the Support module and provide some extra functionality.

Support fields: http://drupal.org/project/support_fields
Support custom e-mail: http://drupal.org/project/support_custom_email

Big thank you to Kodamera who employed me so I could finally learn programming for real :]

Nice!

Never forget the Drupal cache

// December 13th, 2009 // Comments Off // Code

Had my first experience with Drupal 5 today when I was trying to install a multisite that i checked out from work the other day on my mamp localhost. (more…)

Extend Windows 7 logical drive with Gparted

// October 8th, 2009 // Comments Off // Code

I installed Windows 7 on a logical partition without thinking properly before and of course I ended up with too little space. Who could ever believe 25GB is not enough for an OS to run with a few programs installed. (more…)

Updating to Eclipse Galileo with Flex Plugin

// June 25th, 2009 // No Comments » // Code

Pfewwww. Installing a new version of eclipse with it’s plugins is something I always dread. The hassles and problems never seem to end.

After updating my Flex Builder today it stopped working giving me weird errors and refusing to start. After having a look at the log files and realizing I don’t understand any of it I decided to do a clean install of the new Eclipse and get the Flex plugin instead. Easier said then done.

(more…)

ActionScript string replace ( str_replace() )

// June 11th, 2009 // 1 Comment » // Code

Another function I constantly find myself missing in ActionScript in the str_replace() which you can find in other languages. My memory is just as bad when it comes to remembering this function as it is when trying to remember the syntax for the FullScreen function so I’ll post it here as well.

function str_replace(haystack:String, needle:String, replacement:String)
{
	var temp:Array = haystack.split(needle);
	return temp.join(replacement);
}

ActionScript Full Screen function

// June 11th, 2009 // No Comments » // Code

Started working on a new Flex project today and found myself searching the docs for the correct syntax in making Full Screen apps so I figured I’d post it here and hopefully I’ll remember this function next time I need it.

private function toggleFullScreen():void
{
    try 
    {
        switch (systemManager.stage.displayState) 
        {
            case StageDisplayState.FULL_SCREEN:
                systemManager.stage.displayState = StageDisplayState.NORMAL;
                break;
            default:
                systemManager.stage.displayState = StageDisplayState.FULL_SCREEN;
                break;
        }
    } 
    catch (err:SecurityError) 
    {
    }
}

Drupal node access and redirect of users based on role and username

// June 5th, 2009 // 17,137 Comments » // Code

My boss asked me to start setting up a client area on our company website where we could share documents with our clients and also do some minor commenting about the documents. It was also a requirement that the clients would be taken to their own specific client page without access to any other clients page. (more…)

jQuery (JavaScript) Font Resize

// May 26th, 2009 // 1 Comment » // Code

Here is a way to resize text with javascript. Calling these 2 functions from clicks on images or button is easy. Just add a click event to call the functions as needed. (more…)