elizabethanne,
This is a special code that really only works in conjunction with a Gallery viewer page. It basically just appends gallery's id to the current page's URL.
The problem that I had was that you could display a Gallery Viewer gallery on any page/post, so I can't assume that we need the url to use the main gallery viewer page.
So, what I've done is to add an attribute to the [gallery_url] tag...now, you can specify: [gallery_url main=true]. This will make it use the Main Gallery Viewer permalink set in PhotoSmash Settings instead of the current page's URL as the base. It's not perfect, but I couldn't really figure out how to get around the fact that the current page could be valid or it might not. If you're using it in a widget, that compounds the problem, but this should make it so that you can control it...hopefully.
BB