[wp-hackers] Patch for image thumbnail code.

Robert Deaton false.hopes at gmail.com
Sun Jul 17 17:53:28 GMT 2005


It's been said that Owen's new multimedia handling code will be
integrated into the core, which will fix this and add many more
features with images.

On 7/17/05, Luke Reeves <luke at neuro-tech.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This is a patch in relation to a problem I filed on the support board
> (http://wordpress.org/support/topic/38872) about the fact that Wordpress
> doesn't generate any HTML for images uploaded with thumbnails.  It's
> simple, it justs wraps the thumbnail image in an A tag which is a link
> to the full-size image.
> 
> The only affected file is wp-admin/upload.php:
> 
> 
> 202c202
> < if ( ereg('image/',$img1_type) )
> - ---
> > if ( ereg('image/',$img1_type) ) {
> 204c204,208
> < else
> - ---
> >       if($_POST['thumbsize']) {
> >               $piece_of_code = "<a href='" .
> get_settings('fileupload_url') ."/$img1_name'><img src='" .
> >                       get_settings('fileupload_url')
> ."/thumb-$img1_name' alt='$imgdesc' border='1'/></a>";
> >       }
> > } else {
> 205a210
> > }
> 
> Someone may find this fix useful.  Thanks,
> 
>         Luke Reeves
> This is a patch in relation to a problem I filed on the support board
> (http://wordpress.org/support/topic/38872) about the fact that Wordpress
> doesn't generate any HTML for images uploaded with thumbnails.  It's
> simple, it justs wraps the thumbnail image in an A tag which is a link
> to the full-size image.
> 
> The only affected file is wp-admin/upload.php:
> 
> 
> 202c202
> < if ( ereg('image/',$img1_type) )
> - ---
> > if ( ereg('image/',$img1_type) ) {
> 204c204,208
> < else
> - ---
> >       if($_POST['thumbsize']) {
> >               $piece_of_code = "<a href='" .
> get_settings('fileupload_url') ."/$img1_name'><img src='" .
> >                       get_settings('fileupload_url')
> ."/thumb-$img1_name' alt='$imgdesc' border='1'/></a>";
> >       }
> > } else {
> 205a210
> > }
> 
> Someone may find this fix useful.  Thanks,
> 
>         Luke Reeves
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFC2nXlEkTpono0swERAuZUAJ0dveKvGixXVOu+b4W895LqZSgRxwCdG6uW
> evQMiocNfvK7gvgpzgzEaU0=
> =mvBu
> -----END PGP SIGNATURE-----
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 


-- 
--Robert Deaton
http://somethingunpredictable.com


More information about the wp-hackers mailing list