I tried to cut and paste all the coding from the article, but messed up somewhere and can't seem to fix the problem. Is source code still available for class.photogallery.php in the article?
It appears not. Why don't you follow the actual article and type it out yourself?