are you trying to use this: http://gallery.menalto.com/
gallery software? because if you are... it works seemlessly as is. all you have to do is install it into the nuke system (mods or blocks... whatever they are called)... I tried phpnuke and postnuke out for about a week each, and the gallery worked like a charm.
might try looking around the http://gallery.menalto.com/
site for the topic... but I think there are readme files that come with the download.