Well, I have it pretty much working. It still needs some refinement, but the whole site is under construction, so it will coalesce quite well, I’m sure.
You can see it here: https://www.tcryan.com/blog/?p=5
Right now, it shows the whole library, but I’ll uncomment the line soon that does this, so it will only show what has been added for the particular visitor.
It is fairly basic: The plugin code sets a cookie with the current visitor timestamp, but it will only update it once in 24 hours, so the visitor can go back and see the same images more than once in a given time period. This means that the post will appear differently for each user. If someone visits every day, then they will only see a few images. If they visit infrequently, they will see a lot more images.
In this particular case, I am checking a partner installation of Gallery 2 (Bingo release) for new images, and displaying thumbnails of those images, along with links to the full-resolution images within the Gallery. It’s a nice shortcut for a personal site that probably won’t be featuring too many new images. If this were a pro gallery, then I would probably use the Gallery implementation, which is more robust, but a lot more complex for the user.
I did this by creating a blank plugin with a “your content here” type HTML comment. The plugin will process this, and replace it with content as necessary. I used the “Adhesive” plugin to make the post “sticky.” I will probably create an excerpt for the post that indicates the number of images therein. As I said, I still have a fair bit of work in refining the functionality.
I ran into a very nasty problem in WordPress, and was a real puzzler for me. I’d suggest that you consider addressing it. I had originally used the “add_action” and “add_filter” functions to register the plugin hooks, but they didn’t work. I went nuts trying to figure out why, but then I got it: WordPress does not call the hooks for the “get_” versions of the processing functions. I need to use these because I massage the content heavily (notice that all pages validate XHTML 1.1 and WAI AAA). I don’t want to just display it. There also seems to be no hook for a “pre-header” operation. I set a cookie, so I need to do that.
This means that I directly call the plugin functions from my template code. Yucchy, but still within the parameters for a “non-hack” modality. The templates and the plugin need to be installed as a set. I’m not particularly happy with the solution, but it works, and it will still allow WordPress to be updated, which is what I want.
I think this kind of functionality is a pretty important “basic” capability of a blog. Many blogs seem to have it built in, and, quite frankly, I was surprised that WordPress didn’t. I’ll be happy to provide any code to anyone who wants it, but it may not be very useful, as it is directly relevant to this particular site’s customization.