[wp-hackers] Patch for image thumbnail code.
Luke Reeves
luke at neuro-tech.net
Sun Jul 17 15:14:45 GMT 2005
-----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-----
More information about the wp-hackers
mailing list