Skip to main content

Posts

Microsoft Internet Explorer - a "special needs" browser

When developing a website I usually consider how long it will take to code the site, template it, and test it.  Then I add a whole lot of extra time to make it work in Internet Explorer. A Microsoft User - ready to use the interweb In a way Microsoft's refusal to believe that there is a world of computing outside of Redmond is a good thing - it means that I get more billable hours per project.  Of course those billable hours are spent in frustrating searches through Google to try and work out all of the various quirks and bugs in Internet Explorer. I tend to think of Microsoft Internet Explorer users as "special needs" kids who are being set loose in the playground that is the Internet.  Barely able to prevent themselves from drooling on their keyboards and eating their mouses they demand that websites conform to their special needs.  Standards such as Javascript DOM level 2, HTML5, CSS, CSS3 are pretty much ignored because their parent doesn't believe in mode...

CakePHP : Changing .htaccess to prevent one (or more) directory from being handled by Cake

This technique may be useful if for example you have decided to use Wordpress to handle your blog, rather than trying to code your own competing blog system. This .htaccess file is based on the CakePHP default but simply adds a rewrite rule to exclude the "blog" directory from Cake's control. <ifmodule mod_rewrite.c=""%gt; RewriteEngine on RewriteRule ^(blog).* - [NC,L] RewriteRule ^blog /blog [L] RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </ifmodule%gt; If you want to prevent Cake from controlling multiple directories you can simply modify the rewrite rule like such: RewriteRule ^(blog|my|other|directories|go|here).* - [NC,L] In order to accomplish this on an IIS server you can email sballmer@microsoft.com and ask for support in getting his expensive software to do what it says it does on the box.

CakePHP : Adding a file upload and adding a select list of URLs for users in a CMS

CakePHP automagically generates textboxes for users, but it's usually a project requirement that these boxes are "user friendly". Adding CK editor to CakePHP is easy, but lets go a few steps further and give it the ability to allow users to upload images directly into their content and to select a list of pages when creating a link. This article is based heavily on two articles ( Adding file upload in CK editor and Adding a ‘Link to local page from site’ field ) which I have simply modified to be CakePHP specific. So all credits to Ben Roberts and Zac. Step 1 - Adding CK editor to CakePHP with the FileManager plugin 1) Download CK editor from the official site and unzip it into your /app/webroot/js directory. To make things easy I put it in /app/webroot/ckeditor directory. 2) Download FCK editor from the same site.  It was at the bottom of the CK downloads page (because it is deprecated).  Unzip it to a temporary directory and copy the filemanager directory (fcke...

Hassles with Uniforum and co.za registration

Dreams of Technology foiled by pokey companies I've previously found that the Uniforum email form does not allow for providing more than a certain, fixed, number of nameservers.  Apparently nobody would ever require more than that number.  Well unless they're using a high availability DNS service (like www.dnsmadeeasy.com) that is.  If you happen to be using more nameservers than Uniforum has determined to be the maximum that South Africans need then they won't register your domain. More recently I've found that they don't like nameservers where the FQDN lookup doesn't match the reverse lookup.  This is pretty much understandable, but what I don't understand is why it was working for a particular host I use until a month ago and is now no longer working. I raised a support ticket with Uniforum and it took them a good couple of days to come back to me.  I wonder how a company that charges R 50 for every single co.za domain offers such poor service and ...

One way to reduce HTTP requests

CSS Data URI's are a way to encode images directly into CSS.  This helps to reduce the number of HTTP requests on your server.  For example:  Instead of linking to an external resource like a background image, your CSS can have the image available within it.  As soon as the CSS is loaded the browser is ready to render the image. This can have real speed advantages, especially if the browser is configured to limit the number of connections to a host.  By freeing up a connection you can improve your rendering time. Another advantage is that if you are serving across a secure connection then all of your page elements can originate from the same, secure site, and not generate those annoying warnings to your visitors that some elements are not secure. More information on CSS data URI is available at http://en.wikipedia.org/wiki/Data_URI_scheme Spritebaker ( http://http://www.spritebaker.com/ ) offers a free web-service.  They will take your CSS and parse...

Fixing mySQL CDR module compile error for Asterisk 1.6 in Ubuntu

There is a bug in the Ubuntu release (still in 10.04) that causes a mismatch between the Asterisk 1.6 package and its addon package. This results in the error message: WARNING[4238] loader.c: Module 'app_addon_sql_mysql.so' was not compiled with the same compile-time options as this version of Asterisk. To produce this error you just need to apt-get install asterisk-mysql in an effort to get the cdr logging to a mySQL database (assuming that you also used aptitude to install Asterisk 1.6 of course). In order to fix it do the following: aptitude purge asterisk-mysql apt-get build-dep asterisk-mysql apt-get -b source asterisk-mysql dpkg -i asterisk-mysql_1.6.2.0-1_i386.deb Do this in a temp folder as it will create a number of .deb packages. You may need to change the filename depending on your hardware architecture. The idea is to uninstall the faulty package that Ubuntu created and then compile a copy of the addons that matches the current Asterisk version. Since you've h...

Kannel Configuration

It took a whole day in front of an ssh screen onto my server to get Kannel up and running, but I finally managed to get a box ready to be tested. A very useful resource is the SMSC emulator from Selenium Software . They're kind enough to give it away, and it is definitely the pick of the litter compared to the other free options. I needed this because for some reason Kannel wasn't liking the fake SMSC setting. I had noticed that the binary file they refer to in their documentation was missing from my install (a Debian apt-get install kannel default). So I thought I would rather emulate an SMSC than fiddle with trying to get the fake one running. I had a few errors that were baffling due to the lack of thorough documentation, but the users@kannel.org list (subscription needed to send to it) was awesomely helpful. Within an hour of posting my config files and outlining what I had tried I had a solution thanks to a tip from them. The mailing list is searchable so it can take...