I'm trying to integrate an image gallery onto my website. I've chosen to temporarily use
SPGM because it works without a database.
It's designed to integrate easily by just being included but it doesn't work with my website's (shoddy, homemade) friendly URL system.
Not being able to easily find what I need to modify in the SPGM code I found a different approach of buffering the output then modifying that (http://www.schilken.de/weblog/archives/2004/02/20/gallery-spgm-with-good-static-urls.htm is where my idea is from but it needs to be changed a bit).
I will have a string that is a snippet of HTML code. Inside that I need to find all links within the gallery and fix them like this:
"index.php?
spgmGal=rav&
spgmPic=7&title=
something#
spgmPicture" becomes
"/
something?
spgmGal=rav&
spgmPic=7#
spgmPicture" or even
"/
something/
rav/
7#
spgmPicture"
spgmGal and spgmPic won't always be there, and spgmPic won't be unless spgmGal is also. title will always be there (this is the heart of my friendly URLs and why the integration won't work as-is).
PS I have explained the plan I developed which I have trouble implementing because I don't know how to change the URL and I have come here to ask. If anybody knows of another way of fixing the problem of the invalid links being generated I would consider that also.