Alex,
Thank you. It works perfect.
I know you guys have gotten many requests to allow images to be automatically inserted into posts when submitted by users rather than go to attachments. With your filter, I'm able to do this. I'll provide a summary of the steps for people that look at this in the future.
First off, I'm running Theme Hybrid by Justin Tadlock which features his Get The Image plugin by default. This allows me to avoid any further code to create a Thumbnail, because it literally gets the image from the attachment and creates the thumbnail. I'm also using Justin's Cleaner Gallery plugin to make my code valid (which WP doesn't do) and able to easily interact with the Lightbox 2 plugin.
Using Alex's code for the filter, I'm able to have the form automatically insert the [gallery] shortcode at the beginning of the post content and grab attached images that users submit with the form. From here, all it took was to adjust the image gallery css so that my image will default to the top right corner of my post with text wrapped around.
Thanks for the help guys! This alone makes the GF purchase worth it.
Posted 14 years ago on Friday April 30, 2010 |
Permalink