Hello,
Great plugin!
My issue is that the database call needs to be closed in Random.php so that the remaining php includes in my WordPress page work properly.
Currently, I include this code which works great:
<?php include ("random.php"); ?>
Unfortunately, any WordPress includes that come after the above include, try to look up their tables in the gallery database, causing db errors.
The WordPress includes look like this:
<?php wp_list_pages('title_li='); ?>
Error message on the page for this Include is this:
WordPress database error: [Table 'mm_gallery.wp_posts' doesn't exist]
SELECT * FROM wp_posts WHERE post_status = 'static' ORDER BY post_title ASC
I'm too new at this, but what I think needs to be done is to somehow terminate the db connection iin Random.php so that the remaining includes on the page will work.
In Random.php, I've tried adding mysql_close($foobar); after the three echo lines (66, 67, 68) but nothing happens.
Then, if I remove $foobar from between the parenthesis, the errors go away, but so to any WordPress includes. But the random picture works though!
Next, I tried adding $db->db_close&; in the same location in Random.php, however, that killed the entire remaining page contents after the random.php include!
Not sure what I'm looking for here. Apparently WordPress uses it's own include mechanism which is what's creating some of these issues. I've posted over there about this problem as well, but no on seems to know.
Thanks!