I was supposed to write about Datatables for chapter 6, but the website of the plugin I was going to use (http://www.datatables.net/) was down for about a week, and so I wrote about Calendars instead.

I used Red3’s jquery-week-calendar plugin for a recent project in work, and was so impressed I really had to write about it.

In chapter 6 of the book, I’ll walk through how to build a simple calendar, including creation and editing of events, and including once-off and recurring events.

demo

The demo is a session-based calendar, which records only for the duration of your browser session. It’s for demo purposes only, obviously. If you want to use it in a larger project, you would need to adapt the PHP so that it records to a database or files or something.

Download

Here’s an image of it in use:

fig_6_0

Only four or so chapters left and then I’m done with the hard part. After that, is rewrites, then you can all throw your money at me.

For chapter 5 of my book, PHP And jQuery, I wrote a small file manager. It doubles up as a file selector.

demo

You would use this in an admin area where it is necessary to select files or directories, and you’d also like to create/rename/move those things around.

fig_5_10

Try a few things on it – change the selection in the two select-boxes, move a few things around, etc. I think it’s useful and nicely compact.

You can download it here along with the examples that lead up to the finished thing. You will also need a copy of jQuery and uploadify.

To install, just link to your copies of the above libraries, correct the $base variable in the .php file, and in the .js file, change ../jquery.uploadify-v1.6.2/ (in the fm_uploadFileSetup function) to wherever you installed it.

$base should point somewhere outside of the web root, as the file manager does not discriminate between innocent files such as test.txt and potentially harmful files such as hackme.php. A downloader is included which allows any files uploaded through this to also be downloaded through it.

Okay, I succumbed to the temptation and got one.

A number of annoyance have presented themselves already, in just the few hours that I’ve owned it.

First off, when you get the thing, it’s in a fancy box with all the bits and pieces in it. I took all of the bits out, and found a nice rectangular cardboard box which when opened, held the documentation. I took out the documentation and read through it, discarding the box. Couldn’t figure out how to install the SIM card into the machine, as the documentation did not mention it anywhere. After an hour or so of puzzling over it, I finally noticed that the documentation box, which I had discarded, had a weird little diagram on it, which when deciphered, explained how to do it. Way to go Apple – in this case, I did RTFM, but TFM didn’t have the instructions I needed.

Secondly. After going through the jumpy-hoopy thing of filling in a form and waiting 24 hours to be allowed to own the machine (for some reason) and then waiting another hour for the receptionist at the shop to finally get through to O2 to activate the SIM, I was just picking up everything and the guy said “ok, now you just need to activate it through iTunes”. Excuse me?? It’s a fucking phone! I can’t get iTunes running on any of my computers at home anyway because I don’t have anything that runs Windows or Mac! I spent hours trying to get Wine to install iTunes, but finally had to give up and do it on an old WinXP machine in the office the next day.

Then, I wanted an SSH client for the thing. There is a cool store for the iPhone called appStore, and there were a number of SSH clients in there. In order to get one of them, though, you need an account and some cash.

First off, I tried to just create an account. This went okay, up until the point where iTunes asked what my credit card number was. I don’t have a credit card, and don’t want one. After a while, I figured out that the only way to get an account for free (or at least, without giving Apple credit card details), is to apply to download an app which is specified as free – for some reason, in that case, Apple adds a “none” option to the list of payment methods.

So I had an account, but still couldn’t pay for anything. Apple claim that they accept PayPal, and even supply instructions on how to do it. Unfortunately, it falls down immediately, because step two says to click Edit Credit Card or Add Credit Card in your iTunes account page, but those links don’t exist! Maybe they exist if there is already a credit card attached to the account, but that defeats the entire purpose!

But it’s a nice phone, really.

I don't have a geansai gorm, but if I did, I might sometimes wear it.