PDA

View Full Version : Random background image in postbit


NutriaMagnate
08-26-2007, 04:44 PM
I think this is a pretty cool idea but it's beyond my meager coding skills so I thought I'd post it here and see if anybody bites.

What it would be is this: when a user posts, that post is permanently assigned a background image at random from an admin- defined pool of images. For my own purposes I'm thinking of something very subtle, like a watermark more or less, but it could be anything according to taste I suppose. The background image would appear underneath the text of the post, and once assigned the image would remain the same for that post throughout its lifetime, even when edited.


I've got a rough idea of what it would take to pull this off, but like I said it's a bit more than I can chew at this point:

A new db table to store the pool of background images
A new field in the posts table to store the post's background image id
A small script to obtain the number of possible images and assign one at random at time of posting
A new module for the ACP to allow admins to add or remove images from the db
A feature similar to "update counters" to assign an image to posts that have no image assigned or an invalid image assigned.
A small modification to the postbit template and presumably a new cell class in the stylesheet.


That doesn't sound on the face of it like a major ordeal for somebody who knows what he/ she is doing, but of course I could be totally mistaken about that -- what do I know? *prepares burnt offering for the code gods*


Also, I'm fair- to- middling at Photoshop and am prepared to trade some graphics in exchange for the code if that would be desirable or acceptable.