pstew21
Member
Posted 4 years ago #
Nice addition. Any way you can clean it up a bit in wording back to indicate which is the thumbnail clickable link and which is just the embedded link?
Also, any chance to pass on the upload code result right to the post new article body area? Not that copy and pasting is that hard, but an option to create a new post after uploading would be nice.
monkinetic
Member
Posted 4 years ago #
Good idea about the wording on the returned code. As for adding the code to a new post, I know that MT does this, and it's something I'd be interested in as well, but for the moment it's beyond my knowledge of WP to add it.
If anyone want's to suggest a way to do it, I'd be interested.
monkinetic
Member
Posted 4 years ago #
Ok, I've added the explanatory text to the output, you can find the code at the same place.
pstew21
Member
Posted 4 years ago #
Cool, thanks, I'll check it out... Hopefully this can get vetted into 1.2 before release. Hate to hack the upload.php each time for such and obvious feature...
Spiffy, will have to try it. I just discovered the thumbnail making feature worked, thought it hadn't but files were there.
monkinetic
Member
Posted 4 years ago #
Yeah at first I thought the thumbnailing wasn't working either, because it did not put any code in to display the thumbnail. Hence this hack. Glad you like it.
monkinetic
Member
Posted 4 years ago #
mumeimagpie,
Would you mind sending me your upload.php?
steve at redmonk dot net.
mumeimagpie
Member
Posted 4 years ago #
All fixed on my end -- I had some silly extra characters in my upload.php file, but thanks to muchly helpful people all is well! :}
bruce2004
Member
Posted 4 years ago #
Way to go monkinetic!!!! Thanks!!!
Totally awesome, now I can quit whining ;-) and get back to work making a site and recomending WordPress to customers (the few I have lol).
Photo handling capabilities is a sign of a small cms that makes it great. Now WP has making of thumbs which it had, which is great, and your hack which makes it even better. I appreciate all the hard work the developers and people like you that know their stuff put into it, and am confident that progress will continue.
It would be useful to add this to the regular WP source :)
Anonymous
Unregistered
Posted 4 years ago #
Just want to say a heartfelt "thank you" for this piece of code. It will ease my life immeasurably.
Beth aka woolgathering
I need a username and password to access the page?
Anonymous
Unregistered
Posted 4 years ago #
monkinetic, this is great. Thanks for that! I would like to add a few style tags to the image / thumbnail links:
style="float: left; padding-right: 10px; padding-bottom: 10px;
Could you or maybe someone else please point to where these tags should be added within the upload.php (or prob. your code snippet) to always assign above mentioned style tags to a thumb per default?
Thanks,
Chris
Anonymous
Unregistered
Posted 4 years ago #
This is exactly what I've been looking for. Thank you
monkinetic
Member
Posted 4 years ago #
Hi all!
I've posted a proper diff.
upload_additions.diff found here.
Use at your own risk.
--Steve
Anonymous
Unregistered
Posted 4 years ago #
the thumbnail is usually located at http://yourserver.com/imagedir/thumb-pic.jpg where pic.jpg is the original images...
-abhi.
monkinetic
Member
Posted 4 years ago #
abhi,
I did discover that eventually, but in 90% of the situations where I'm uploading images (as opposed to FTPing them as in the case of site graphics) it's because I want to link to them from a blog post, and in 89% of those cases I want to link the thumbnail. I think I'm not alone.
The patch here does not remove the original HTML code, it's only adds another version to the returned code.
As a latecomer, let me also say that this is an awesome and very useful contribution. Thanks!
S.
PinHead
Member
Posted 3 years ago #
I was hoping for to find something like this! Nice!
-PH
I found one small typo in this version of upload.php. It writes its link like this: <img/>, so if you try to validate your page, you get end tag for that is not open. To fix this, just replace line 224 with this modified line:
$piece_of_code = "This code will display the thumbnail, linked to the full-sized image:
<img ". $sizes[3] ." src="". get_settings('fileupload_url') ."/$thumbfile" alt="$imgdesc" />"."
"."This code will display the full-sized image:
<img src="". get_settings('fileupload_url') ."/$img1_name" alt="$imgdesc" />";
Best,
S.
I keep getting this error:
Parse error: parse error, unexpected T_VARIABLE in /home/nobodys/public_html/blog/wp-admin/upload.php on line 207
What should I do?
Ill email you a copy of upload.php
@daload > the same error was reported somewhere above... It seems it was caused by some characters (white space?) in the file. Try to check that everything is clean. HTH
Anonymous
Unregistered
Posted 3 years ago #
Parse error: parse error, unexpected T_VARIABLE in /www/htdocs/v109938/blog/wp-admin/upload.php on line 207
I am getting the same error, but I dont know what to clean up.. someone help please??? :-)
Anonymous
Unregistered
Posted 3 years ago #
thank you! I was looking for something like this!
Anonymous
Unregistered
Posted 3 years ago #
worked great on my word press, but when i tried and install this into my friends wordpress I get the following error:
Warning: chmod(): No such file or directory in /usr/home/******/public_html/wp-admin/upload.php on line 177
Warning: getimagesize(/usr/home/******/public_html/images/thumb-abandonhouse10-13-04ss.jpg): failed to open stream: No such file or directory in /usr/home/******/public_html/wp-admin/upload.php on line 212
weird... cause i can copy and paste my whole *working* upload.php into her space and she stll gets that error, works great on my wordpress. and we are using the same version...
monkinetic,
Great work - I've been using this on one of my sites for a while now and love it. Thanks!
-Michael
Over the weekend I upgraded from 1.2.1 to 1.2.2 and since then this peice of code does not work. Instead I'm getting upload errors of unsupported files even though I'm trying to upload .gif and .jpeg files.
Any ideas what I need to change to make this work for 1.2.2?
Thanks,
-Michael
I would just like to point out the issue with validity since the code snippet in Strunk's post is corrupted.
What you need to do is to remove the / in the line mentioned by Strunk. You will find the correct / just after the title tag, and right before the starting img tag.
As long as the code tag doesn't like the php code it is impossible to post the correct code in here.
Cheers