Monthly Archives: February 2005 - Page 2

wireless hell

I just bought an access point and a PCMCIA card, so I could send emails while sitting on the toilet.

The access point was simple to set up.

The card wasn’t.

The Netgear WG511 v2 (made in China) is definitely supported by Linux, and is supposedly simple to set up.

Unfortunately, I got the Netgear WG511 v2 (made in Taiwan), which is not.

The difference is in the chipsets. The Linux-friendly card uses a Prism chipset, which has been part of the Linux kernel for a while. The damned hell-sent one uses a Marvell chipset, which is just a pain in the ass.

deep depression today

I started on a new drug at the beginning of the week; Efexor (or “venlafaxine”, by its non-commercial name). My doctor said it has received good press from some users.

Of course, “some” does not mean anything more than “more than 0% and less than 100%”.

Efexor, unlike my previous drug, Cipramil (an SSRI), is an SNRI. This means that, as well as combatting my depression, it also combats the malaise that I feel – the lack of concentration and motivation that makes me feel guilty about the amount of work that I do (I know that it’s good work, but I feel I could do more if I could focus on it).

While reading up on SNRIs, I came across this page. Section 9 of it describes what I’m feeling right now, I think.

I feel like I spent most of the last week awake, was allowed to get to sleep, then woken up four hours later and thrust straight into a demanding schedule. The thing is, though – I’ve had ten hours sleep, I try to get at least eight hours of sleep every night (to bed at 10pm, up at 6:30am), and my thoughtful fiancee never forces me to do anything around the house that I’m not up to. There is no obvious reason for me to feel this way, but I do.

Actually, one of the reasons I went to my doctor in the first place was this feeling. It feels like I am trying to cope with two or more straws too many, while all around me are people jogging while juggling straw bales.

Earlier today, I almost cracked again. Jareth was screaming his head off about teeth coming up through his gums, and I was trying to not get too upset by the sound. My chest was tightening, I was finding it hard to concentrate, and my jaw ached. Eventually, I had to get up and find somewhere quiet to stand and look out on my garden. I would have gone out there, but there’s a gale wind blowing.

I really felt like the best thing I could do right then was to leave the house and go to work (on a Sunday, no less!), just for a bit of silence.

He’s asleep now, and there is much less noise. I hate to blame him, as he is an un-knowing conspirator in the out-to-get-me war, but the noise was tearing me apart.

Venlafaxine apparently takes about two weeks to start working, so what I’m feeling now may actually just be what I would be feeling without any drugs at all. I stopped using Cipramil a week ago, and the “flush-time” for that is normally about 48 hours, so I guess I can be considered “stabiliser-free” now for about five days. The new drugs should kick in, within the next week. I look forward to not feeling shitty.

IE5's document.getElementsByTagName deficiency, sorted

I’m working on fixing up the XMLHTTPRequest shoppingcart so it will work in IE5 and IE6.

While debugging, I came across the annoyance that IE5 doesn’t properly return an array of all objects for document.getElementsByTagName('*'). I use that to find out what elements need to have JavaScript enhancements applied to them (see alistapart for PPK’s take on this).

Mentioned this on #linux, and Nargler offered this solution:

 function ie_getElementsByTagName(str) {
  // Map to the all collections
  if (str=="*")
   return document.all
  else
   return document.all.tags(str)
}
if(document.all)document.getElementsByTagName=ie_getElementsByTagName;

Of course, I had to tinker.

var supportsDom=(document.getElementsByTagName('*').length)?1:0;
if(!supportsDom && document.all){
 document.getElementsByTagName=function (str){
  return(str=='*')?document.all:document.all.tags(str);
 }
 supportsDom=1;
}

The bonus here is that document.getElementsByTagName is used in all cases where possible (IE6, for example), and you also get a supportsDom variable which you can use to decide whether to bother trying to add your enhancements.

swapping image focus using javascript

I’ve seen a few pages where the background images fade gradually into other photos.

While walking to work, I wondered what it would look like to do the same, but fading into itself, with a different focal point. The results can be found in this example.

This example works in standards-compliant browsers only, because I don’t care about IE. If you want to get it to work in IE, then hack the code to use the filter:alpha() CSS manglement instead of the W3-recommended opacity.

webme 0.2

Okay – I think the reason that WebME got off to such a slow start was that it’s a bugger to install if you haven’t done it day in day out for the last year.

So, today, I wrote a simple install wizard, which takes care of the config file and installs a bare-bones database.

click here to download WebME 0.2

The WebME site is growing as well. There’s now a very sparse comparison matrix on it, which I’ll fill in as I get to try out the other OS CMSes around.

The goal of WebME is to become the easiest CMS for a web developer’s clients to use. At webworks.ie, we know that the CMS is not for the web designer, but for the end client, so we built our CMS in such a way that a designer/developer can use it to set up the site initially, then turn off all the features that would just confuse the end user.

I hope you all give the CMS a shot – just download the zipped file, unzip it, and move all of the files into the root of a fresh domain (including the /.htaccess file). When you visit that domain in your browser, you will see a very simple installation wizard.

The wizard is rudimentary at the moment, and does not check for all the things that can go wrong. If there is a problem installing it, then please comment here on it, describing the problem, and I will prescribe a fix, and will fix the wizard and CMS to take care of that the next time.

As usual, the demo is at demo.webme.verens.com – don’t forget to give it a try.

Firefox tip – loading multiple URLs from console

A question was asked in #linux how to load up a group of URLs in tabs from the console. The documentation was less than awe-enspiring, but at least gave the clue that opening a single URL is done as mozilla "url".

Then, I remembered that when a group of URLs is saved as a home group, the input box that shows the current setting separates all URLs by pipe symbols. So, to load a group of URLs from the console, try this: firefox "URL1|URL2|URL3".

ringtones for little or nothing

Bronwyn spent the last hour choosing a ringtone to install on her phone. When it came to doing it, though, she asked me to do it. I watched what the phone was doing at all times, and realised that it’s just making a WAP connection to a MIDI file on a web server.

So, I tried it myself – I put up Eugene’s Trick Bag (with the awful last note – must fix that), and told my Nokia 3510i to go to that address. It immediately downloaded the file. I told it to Save in the Tones directory, and disconnected.

Then, when I went in to change the selected ring tone, I looked through the Gallery, and there it was!

So – Bronwyn’s ringtone cost her 4 euro. I went into my account information at O2, and found out that my own method cost me only 1c! That’s 400 times less than Bronwyn paid!

So, there you have it!

xmlhttprequest-based shopping cart

The release of WebME was pretty quiet. No-one really noticed it until I pushed it into their faces.

The biggest “woah!” piece of the CMS was the new shopping cart demo. I ran some fellow ILUGers through it, and their reactions made my day:

davew oh this is pretty
davew is this using the same kind of tech gmail uses in its ui?
kae davew, yes
kae davew, you should see the backend. I built that shopping cart in less than two minutes
davew kae: seriously? holy shit. i need to get my web skills back
kae davew, check it out – /admin/ – username and password are “admin”
davew kae: mind if i meddle around creating a cart?
kae davew, knock yourself out 🙂
kae as soon as you’ve saved it, it should be visible on the front side
longword Sweet.

davew this fucking kicks arse
longword !kae++
longword Well done that man.
* kaebows
davew !kae++
davew that’s fucking astonishing
* davew puts the price up mid-shop to see whath appens
davew squee. it updated the price of the already-added items. 🙂
davew ahh this is a fucking beauty

The major difference between this demo shopping carts and most others is that this one uses XMLHTTPRequest to manage the basket and items.

In every shopping cart I’ve seen before, doing a simple thing like “add this to my basket” usually requires a full reload of the page, with all associated images, scripts and other excess data. With this demo, though, all that is sent to the server is the request to add another copy of that item to the basket, and the server returns the new basket list.

This technology is also used to grab item data, category contents; in fact, everything you see in that demo is managed through XMLHTTPRequest.

A major plus of this method is that the chore of shopping online is very much streamlined for any user of it. DSL and faster users will probably only notice that the experience is much smoother (in fact, that’s one of the reactions I was given yesterday). ISDN, 56k and lower, though, should notice a dramatic increase in usability.

Accessibility-wise, this is still not useful – for the last two weeks, I have been concentrating on the XMLHTTPRequest side of things, getting it to where I want it in Firefox. It will not work in non-JavaScript browsers, and the JavaScript browser must support XMLHTTPRequest calls.

Firefox, Mozilla, Netscape, etc support this mechanism. Recent versions of Opera should also work. Thanks to the work of Dean Edwards, IE5+ should also work. There may be minor tweaks to be worked out, but I’ll take care of them.

Non-JavaScript browsers will ave to wait for the weekend. I will write that version up then. Of course, the benefits of XMLHTTPRequest will be lost on them… but at least users of old browsers, or accessible browsers, should be able to shop with some degree of comfort.

first release of WebME

I don’t have a version number for it yet (never had need for it in work), so let’s call it webme 0.1.

This is a fairly mature CMS, just released by webworks.ie for the open source community.

Consider it to be free software, in that you do not have to pay us to use it. We would like for you to release any improvements or modifications that you make to the code, though, so we all benefit from your work.

Requirements

The system I use is like this:

  • Apache. No particular version.
  • Mod Rewrite for Apache. Probably already built into your system.
  • PHP 4.x or higher.
  • ImageMagick
  • MySQL

Quick Installation Instructions

Download the site code (bz2 or tar.gz) and unzip it. The files contained in the webme directory should be placed in the root of your intended website. This CMS is not designed to co-exist with an existing website, so please use a fresh domain.

Create a fresh database for yourself in MySQL. Use “webme” as the name of the database for now (simplicity’s sake).

Edit /common/config.php and update the appropriate sections. There are two database settings in use – one for offline, and one online. This is to accomodate hacking the source and running two concurrent versions of the same site.

Download the sample database (webme.sql) and use it to populate your new database.

Add the new site into your Apache config, and away you go!

There is a sample site up here. The admin username and password is “admin”. Have fun!

WebME goes GPL

Bloody fantastic.

We (webworks.ie) have a CMS engine that we’ve worked on for the last few years. It has a number of features that make it very simple for designers to use, and for end-users to administrate.

However, a lot of our rivals (or “fellow web developers” (whichever is friendlier 🙂 ) ) tend to use ready-built CMS engines such as Mambo, which have also been developed over years, by a community of open source hackers.

Our dilemma was that we much prefer our in-house CMS for many reasons, but as we basically only have three programmers in-house (and I’m the only strictly-programming-only one), it is difficult to keep up with the growing demand for new features.

So, the choice was difficult – to either start learning the ins and outs of Mambo so we could use its services and hack it to fullfil our own needs, or we could release our own CMS code into the wild and see if we can build a community around it to help develop it into the mature, easy-to-use system that I envisage it becoming.

We decided to release it. Tonight, I will do a spring clean of our “stable” branch, and release that code, with some documentation on what needs to be done to set it up (very little) for your site.

I am hoping that this will spark off a small community of hackers – there are some features I would love to see built into this, that will really set your minds on fire.

So – the existing features that come to mind are:

  • User creation, with some configurable “rights” mechanisms to restrict the actions that a user can perform.
  • Easy page creation, with the ability to hide pages from the navigation, to create “related links”.
  • A built in formatting engine that uses a similar system to the textism one. It was developed around the same time, so the ideas don’t really overlap, but it should be easy to understand (our clients have no problems).
  • Very simple templating system for designers. Basically, they would just create a html page, and put a marker (“content goes here”, “navigation goes here”) in the html, and the engine will do the rest.
  • The system is designed with standards and accessibility in mind. There is a JavaScript detection method in use in it, so you can use JavaScript if need be, while also providing a non-JavaScript version for those people that do not have it enabled (or search engines, etc).
  • Easy image uploading facility which automates resizing, thumbnail creation, captions and alternative text.
  • Simple table creation. For “matrix” type tables, there is one administration area, and there is an mini-application for building more complex tables that have non-simple input methods (combo-boxes, images, etc).
  • Form creation, with checks for required items, etc.
  • A whole lot more…

I’m really excited about this! I hope any readers will give me criticism (positive or negative) after you try it. I’ll update this post when I have it ready for download.