Sep 18

update: More on the XHTML technique popup  

I wanted to make a simple popup in my latest Cake app, and so needed to set a blank layout just from looking at the URL, as the page was essentially static that I was going to pop up.

e.g. then my little popup URL caller (hyperlink ;) ) would look like

for a link to http://example.com/pages/coverage/layout:popup

echo $html->link('my popup linky',
array('controller'=>'pages',
'action'=>'coverage',
'layout'=>'popup')
,array(
'onclick'=>
'return Popup.open({url:this.href});'));

that’s the cake url syntax parser doing all the magic there - as in 1.2 the new named paramaters, where one passes the info via GET separated by a : is nimbly handled by just taking its key in the array — e.g. ‘layout’ in this case resolves to popup.

Then I made a quick popup in my layouts folder. It’s totally blank.

But the pages controller display() action usually calls ‘default’ layout. I could simply just make a action in another controller, but this is not very DRY.

So I copied pages_controller to my controllers (overloading the typical one), then added a little switch statement:

// set a custom layout

switch ($this->passedArgs['layout']) {

case 'popup':

$layout = 'popup';

break;default:

$layout = 'default';

break;

}

// change the final line too:

$this->render(join('/', $path),$layout);

the javascript is a slick script that is accessible and uses prototype:

you can also pass it options like width:300 etc so that your popup is not a jumbotron popup.

The magic of CakePHP and Prototype :)

this is my first cake post, might do some more hopefully soon…

Sep 08

ha..[r], as I saw they were nominated but didnae win the ever-blander mercury music prize this year. They didnt deserve to winit, neither did “klaxons” (silly name, silly band) — I knocekd this review out back in the Spring - it was an interesting album and I liked the mix of MBV with more some dancey trancey things. Woxy.com play it all the time now, and I enjoy hearing it when it is on, but it’s not Neu! or Can anything really. Like to see what the guy comes up with next.

Maps:
We Can Create
With James Chapman’s first full-length album, the psychedelic, cosmic pathways of the mind are delineated (a bit), although I actually suspect “Maps” is probably titled after some nickname that the Northamptonshire musician has. And the shoegazey English Shire (alright, that’s not a real genre) sound of Spiritualized and My Bloody Valentine actually gets an effective update by Maps here.It’s pretty good for a first record too, mastering lots of elements of its clear influences, while often coming up with something fresh and different. The album unfolds in a kind of hazy, druggy glory that brings to mind, mid-90s Yo la Tengo , Air, and sometimes on the (thankfully, few) meandering tracks, labelmate Moby. But also there are catchy Stone Roses and Charlatans-like vocals, and the melodies are indeed tuneful, and memorable. It weirdly manages to have the admirable Britpop tunefulness of Badly Drawn Boy and co., without getting stuck in that Nineties sound at all.

In places the music is really excellent - Nyman style repetitions on a Theme and it could well be a bit of a mellow classic, I suppose, the album never going beyond a mid-tempo as it is. And the record benefits from its tracks similarities in acquiring an overall unity, that a lot of contemporary stuff just can’t muster, and the track order is really satisfying, and I found myself happily letting it play through to the end.

I must say, titled with an earnest epithet like “We Can Create”, I thought this album was going to be more annoying, and the lyrics were actually alright - not too grating, but ploughing a kind of unspecific cosmic sense of glory. (I blame drugs, or perhaps religion?). The vagueness only becomes too much on Don’t Fear, which almost spoils (”Feel like Someone, Somehow, Come On”) the track’s pleasant layering of texture. With references to “Songs that write themselves”, Mr Chapman perhaps refers to the escapist pleasures of sequencing electronic tracks, or even the obvious lightness he felt in composing such a succession of catchy tracks when making it.

So if you’re looking for a summery album of refined - yet, not overblown - anthems, definitely try and listen to some of this.

Sep 08

screenshot of dvd drive on my quicksilver g4 Another update.. damn power supply seems to have gone!! Gah..what a rip off :)

hmm think I can fix it easily enough… too much forum 31 activity brought it down I think :p

Oh yeah! Another update :)

Today I swapped out the CD-RW of the original 733 quicksilver edition I have, and after some fumbling and frustrations, installed the Optorite DVD-RW I had from an old PC…CAVEAT - this did take me about 21/2 hours :(
Amazingly, the CD burn works on it- using Liquid CD (much better than builtiin Os X burner, which I havent tried)! The DVD Rom (reading for playback of DVDs - is essentially why I wanted it, as I was confident of this always working, after reading the xlr8yourmac.com archives on Tiger and 3rd party DVD drives).

As soon as I can get a burnable DVD RW disc, I will try the burn function of that. It is a very fast dual layer drive I have, so this will be interesting as there are not many 3rd party DVD players for the Mac I think. Will submit a reader report once I have one to the xlr8yourmac database. Hey, I want to show off like everyone else!

I have been able though to transfer lots of music onto this mahcine, as I have backups of my tunes on DVD drives back from when I had my PC tower.

Heres the info on the wireless I installed yesterday:–

Writing this after a 60 second total time addition of wireless AirPort extreme to my G4 powermac 733 QuickSilver :)

The card that I got off eBay, Buffalo WLi 2 54 PCI card, for under a tenner, including delivery(!) easily went in to the nifty QuickSilver PCI slot.

Restart the Machine, on os X 10.4.3 (about to update now :) ) and it immediately asked me, upon login, to join my neighbour’s free wireless connexion! Sweet! Didn’t even have to configure anything - the wonders of the Broadcom chipsets on Os X.

It is recognised as Airport Extreme by the System Profiler. Interestingly it is getting 3 bars of the wireless signal too (it has a nice wee external antenna), whereas my iBook beside it, gets only 1. It seems faster (because of this? Not sure…) too…

…now to get all my essential apps on to this beauty of a G4..although it is kinda noisy :)

Also picked up a monitor for under a 100, it’s a HannsG 17″ 1440 x 900 — not too bad at all and is running at nice speed on the Quicksilver, at 60Hz.

Thanks biotron for a great machine! Soon I will have these key apps on it

  • Opera 9.5 beta (not tried this - you should - its the fastest full feature web going!)
  • TextMate
  • VLC
  • QuickSilver (hey it IS A QuickSilver!)
  • Monolingual to get some diskspace
  • Fixation (bien sur!)
  • Sigma chess
  • Perian
  • Transmit
  • Unison
  • Xee
  • Graphic Converter
  • MacJanitor
  • Adium
  • Nokia Mac Updater
  • Subversion
  • TinkerTool
  • TextPander
  • Salling Clicker
  • Double Command (allows forward delete)
  • Vienna
  • LiquidCD (easy multi burn of CDs on OsX)

yeahhhhhhhhh, fanboys power ACTIVATE!