Hack help: Random smug thumb/url on my webpages
tcurtin
Registered Users Posts: 5 Big grins
I recently set up a a smugmug site for a non profit I help run. I'd like to write a script that uses the APIs to insert random thumb img src= urls and their corresponding smugmug gallery hrefs on any page. I can use server-side includes as the mechanism to insert them into the webpages, but the real trick is - how do I get a listing of all the images in all of my galleries?
I've seen something close in php here: http://www.dgrin.com/showthread.php?t=6206
Since I'm not familiar with php, I'd like to do something similar in perl, but if anyone knows of a pre-existing app that does this or something close, I'd rather not reinvent the wheel.
My web server is running linux, so anything linuxable is an option as long as it doesn't involve changing the server. (ie I have a cgi directory and can run crontabs, etc but I won't be upgrading apache.)
Help is much appreciated - this seems like something a lot of people could use!
-Tim
I've seen something close in php here: http://www.dgrin.com/showthread.php?t=6206
Since I'm not familiar with php, I'd like to do something similar in perl, but if anyone knows of a pre-existing app that does this or something close, I'd rather not reinvent the wheel.
My web server is running linux, so anything linuxable is an option as long as it doesn't involve changing the server. (ie I have a cgi directory and can run crontabs, etc but I won't be upgrading apache.)
Help is much appreciated - this seems like something a lot of people could use!
-Tim
0
Comments
There is one hackish thing I do - when creating the links to open the image in its smugmug gallery, I use links of the format http://gmara.smugmug.com/gallery/999/999/58701059. The "999/999" is bogus, after I discovered that it didn't matter what was in those positions, you'd still get the image in its gallery home. I don't know if this is always going to be the case, so caveat emptor!