Apr 27



Alphabeat / Leon Jean Marie

Originally uploaded by battez

saw this great band AlphaBeat last night - kind of S Club 7 with early Madonna and recent Madonna thrown in. Lots n lots of catchy tunes…

Apr 25

A really nice script for a basic cross fading slideshow in javascript was written by Andrew Sellick a wee while ago.

Along with others using the script I was suffereing from a behaviour in browsers where the images in the list items would be cycled through as stills briefly until the slideshow was ready to go (After they had all loaded). To fix this you

I think I have managed a suitable fix for the flash of the images that this script displays sometimes :

like another poster said - add the INLINE style to the LI elements, within your HTML

so LI style= “visiblity: hidden”

THEN in the script itself, add this in the init() for loop: (before the if(i!=0) bit:

lis[i].style.visibility = ‘visible’;

esentially when it inits the LI list items it sets them back to visible. Visibility is the key since until visible, the elements act as a placeholder.

can do the following, which looks much more slick:

Apr 23

…but only english schools it seems. Still, an interesting scheme to provide chess sets for free to all schools who apply. They look slightly ugly but are intriguingly meant to be near indestructible sets made from some form of durable plastic.

Apr 15

Hi we are having a tournament for he next 4 weeks at our Chess Club - “Phones” in Glasgow’s Polish club at the Park.

I have set up a website for the tournament using a free wiki

Mar 30

 I took a few nerdy pics of my chess set that I totally love. It has sentimental and aesthetic value, but doesn’t seem to help my playing level that much :/

Jaques of London

Jan 31

made this several years ago (end 2003 /early 04?) as part of our Animation class using LightWave at University of Paisley - Multimedia BSc Honours . Nicolas Blanchard, David Gallagher and Sophie Godard - Nicolas really knew his stuff (like the textures and more fancy Lightwave effects) but I think we all contributed a fair bit too :)

Wonder where they all are now ? ( I know about Dave though!)

Nov 07

A site by Infinite Eye for the new Glasgow Poetry Society: Vital Synz.

www.vitalsynz.co.uk

glasgow poetry society site by web design company infinite eye

Really enjoyed the Oran Mor launch event, despite only snarfing one canapé…

Worth not staying in and installing Leopard on my new Mini for, even!

Oct 31

*updated Jan 30th 08*

Snook blog post

Jonathan Snook points out another solution to an easy http-auth implementation for Cake’s directories (that are really rewrites).

the gist is that you put a <Location “/name_of_dir/”> in your httpd.conf, which you may well have access to if you are telling it the webroot of Cake is the webroot anyway.

Works like a charm with 1.2 for me! Very useful - the original post was in the group.

Hey dudes, second in my Cake tips posts :o

This took me a while to get my head round, since I’m nada. I was wanting incorrect user details for an HTTP authentication to give the user a prompt again, upon a refersh. I struggled to get the Cake default to do this for me, other than in Safari .

And I am still not sure why. But my callback function (as the component has provision for!) below, will allow you to do this. So I can give a user friendly mesage to someone who has got their details wrong.

Handy method then for single admin mini sites:

(in app/app_controller.php)


function beforeFilter() {
if (isset($this->params["admin"])) {
$this->Security->blackHoleCallback = 'incorrect';			$this->Security->requireLogin('*',array('type'=>'basic','realm' => Configure::read('Settings.title')));$this->Security->loginUsers = array("admin" => 'password');}
} 

function incorrect () { 

header('WWW-Authenticate: Basic' .' realm="' . Configure::read('Settings.title') . '"'); 

header('HTTP/1.1 401 Unauthorized'); 

$this->autoRender = false;
$this->layout = ''; 

die('
HTTP/1.1 401 Unauthorized.
Details incorrect. Please refresh.');
} 

Oct 11

Nice work Craig (of Glasgow’s Infinite Eye) on Stand/ Tennent’s new site for Scotland’s Finest bars — including supporters and bar photos!

And well done to all the bars who have got passion & belief that we will go through, as you can see from all the photos!

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…