In reading through old forum posts it seems like it's no longer possible to pass a group of random images from Zenphoto to my Wordpress website homepage. I used to be able to do it but not anymore.
Are there any alternatives, like using an RSS feed of the most recent images to display on a Wordpress homepage? Or has anyone worked out how to solve this problem some other way? It seems like such a great way to get people from the home page of a Wordpress site to the galleries in Zenphoto deeper in the site.
Comments
`<?php`
`$link2ID = mysql_connect("database.vista.howlingpoint.net", "userid", "password");`
`mysql_select_db("database", $link2ID);`
`$result2ID = mysql_query("SELECT albumid, filename, title,`desc`FROM zp_images WHERE (albumid = '3' OR albumid = '21') ORDER BY RAND() LIMIT 1", $link2ID);`
`while (list($albumid, $filename, $title2, $zen_caption) =` `mysql_fetch_array($result2ID))`
`{`
`$result3ID = mysql_query("SELECT folder FROM zp_albums WHERE id='$albumid'", $link2ID);`
`list($folder) = mysql_fetch_array($result3ID);`
`$folder2 = urlencode($folder);`
`print "<a href=\"http://vista.howlingpoint.net/z/$folder/$filename.php\" title=\"$title2: $zen_caption\" target=\"_blank\">";`
`}`
`mysql_close($link2ID);`
`?>`
Examples in action are howlingpoint.net/life and beachlaw.info. Note for my server the query for the desc element had to be in backticks to avoid an error.
Anyone else have any ideas?