December 06, 2020, 01:22:57 am
News: If someone gives you assistance give them a Good Star
Pages: [1]   Go Down
Author Topic: PHP & wordpress - modifying pressthis.php to upload images rather than hotlinkin  (Read 2932 times)

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8560

« on: December 01, 2011, 09:48:03 pm »

When I want to repost something from my news feeds, I can hit a button that opens my "pressthis.php" page and it passes a few things via the query string.

I've got it all sorted out where the things being passed go into the fields I want (the via was going to the title, and that didn't make sense Another Tounge ) but when I hit the image upload button it doesn't function how I would like.

It goes to the url of the article I am reposting and searches for images. That is pretty neat, and 95% of the time is what I would upload, but when I choose one to insert, it hot links it.

Is there any way in php to have it upload the image from the url to my server? I can do this in asp, but this isn't asp Another Tounge

An alternate solution would be for me to just have a regular upload button, I can probably copy that from another page though smile


I'm not the only one that doesn't like the hotlink:



the normal image uploader will upload from url, so if I can just get it figured out how to make that work for pressthis.php... I almost have it. I have the button popping the right window, which loads media-upload.php. I then upload my image and hit "insert image" nothing happens. and by nothing I mean, the "add image" window goes to blank white rather than closing, and the image is not inserted into the post.



It's not working because I don't have a post id yet. Not sure how to resolve...yet.

« Last Edit: December 01, 2011, 11:28:03 pm by msimmons » Logged

                 ..... .....

Pages: [1]   Go Up
Jump to: