[wp-hackers] Thumbnail HTML Code

Owen Winkler ringmaster at midnightcircus.com
Tue Jul 12 02:25:56 GMT 2005

Matthew Mullenweg wrote:

> I don't think it would hurt to rip out the Upload tab and make 
> uploading something that's done inline with posting (where it makes 
> sense).
> Owen, any update on the media uploading stuff?

Part of the reason why my patches on the permissions stuff is coming so 
slowly (!!) is because I have to remove the media stuff from the unified 
diffs that TortoiseSVN makes.  I know I keep promising to send it, but 
obviously my schedule is a bit clearer this week than it has been for 
the past few months and there should be goodness.

In the media patch at the very, very minimum:

* Permalinks for images and thumbnails.
* A new advanced section in the post editing form for selecting images, 
dubbed "media browser".
* Uploading into directories via the media browser.
* Several functions for building media albums from child object posts on 
a new template similar to page.php.

What I'm doing in between permissions patches:

* Fiddling with the file selection UI, including the option to sandbox a 
user into their own user-image-upload directory unless they have a 
permission (see why I like the new capabilities stuff?).
* Basic options page settings for media.

To answer the question directly about adding thumbnails- The Upload tab 
is history.  There is a button for inserting something (one of two sizes 
of thumbnails or the original image), and having it link to something 
(nothing, the full sized image, or the dedicated image post page).  
WordPress creates the thumbnails automatically, and although the custom 
thumb-cropping doodad isn't in there yet, I still have that code.

There are still some problems I haven't solved to my satisfaction, for 
example, how to display different media types using different HTML 
snippets.  (For example, movies should use some kind of object tag, not 
<img>.)  I think I might just throw a plugin hook there and say, "Add 
via plugin whatever I couldn't think of."

I finally figured out my sticky issue - how to add children to a post ID 
that doesn't exist yet.  The solution was one of those thing where I hit 
my head on the toilet -wham!- and I had the design for the Flux Capacitor.

Another tricky bit is the expando js code.  I need to fire an event to 
load an iframe either when the box expands (easy) or when the page loads 
and the cookie says "leave expanded" (not possible with current code).  
So that change (in the shared dbx lib from brothercake) will be in the diff.


More information about the wp-hackers mailing list