Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [feedback] Image upload directly in the write tab
Bloke wrote #299058:
OK, first of all: yes! Regardless of whether the remainder of your prefs patch manages to get squeezed into 4.6 before final release, I think this commit ought to be in core, as it continues the tradition of fixing containers to shield plugin authors from markup changes, as well as laying the foundations for plugins such as this one.
I’m still new to admin UI. If you, Phil and others find that’s ok re future custom fields layout, I can amend all containers, sure. I think all the rest of this branch (array prefs and dataform) could go into 4.6 too, save new core html handlers that can wait.
Offline
Re: [feedback] Image upload directly in the write tab
etc wrote #299062:
I think all the rest of this branch (array prefs and dataform) could go into 4.6 too, save new core html handlers that can wait.
I agree. Maybe the HTML handlers could sneak in after beta, once we nail down suitable parameter lists.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: [feedback] Image upload directly in the write tab
etc wrote #299057:
I’m experimenting with
FormData
submit in this 4.6 branch. As a byproduct, uploading images (or files) fromWrite
tab is a few-liner plugin. If somebody wants to test:
Hi, thanks for this experiment, it could definitly enhance the UX for Txp users.
The image preview with a link to edit it is nice.
The only thing that comes in my mind for now is that I often use multiple images id’s in the Article image field so I’d really like to be able to upload several images or add one without removing the previous. It would mean that we’d need a remove link under the preview or something like that but it is maybe not bad because we could also more explicitly display the Edit link…
I don’t know, maybe the easiest way would be to have a dedicate submission for files, independant of the article saving? ‘Do not really know but here are my thoughts.
Anyway, it’s an hopeful (heh… or is that promising the word?) experiment!
Offline
Re: [feedback] Image upload directly in the write tab
NicolasGraph wrote #299069:
The only thing that comes in my mind for now is that I often use multiple images id’s… upload several images or add one without removing the previous… remove link… a dedicate submission for files, independant of the article saving?
And this is precisely the main reason why we have so far shied away from implementing any form of image management to the Write panel: there are so many different people that want so many different things, we’d end up inconveniencing a lot of folk.
Some want multiple images. Some want previews. Some want to adjust. Some want a popup to select from the existing images. Some want drag ‘n drop. Some want reordering… the list goes on.
My view is (and always had been) that our eventual implementation should be very basic. Oleg’s mods above show how easy it can be to customise, which means plugins can spring up to handle many different scenarios that override or augment the default behaviour. Each should cater to one or more of the options in the previous paragraph.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: [feedback] Image upload directly in the write tab
NicolasGraph wrote #299069:
The only thing that comes in my mind for now is that I often use multiple images id’s in the Article image field so I’d really like to be able to upload several images or add one without removing the previous. It would mean that we’d need a remove link under the preview or something like that but it is maybe not bad because we could also more explicitly display the Edit link…
Thanks for the feedback, nice ideas. The aim was to allow multi-part forms uploading, to enable the use of <input type="file" />
handlers. The plugin is only for illustration, but multiple files upload in add/replace mode should be doable, will try it. Or go ahead and do it yourself, it’s a plugin. ;)
I don’t know, maybe the easiest way would be to have a dedicate submission for files, independant of the article saving?
That was already possible, not the purpose here.
Offline
Re: [feedback] Image upload directly in the write tab
etc wrote #299072:
Thanks for the feedback, nice ideas. The aim was to allow multi-part forms uploading, to enable the use of
<input type="file" />
handlers. The plugin is only for illustration, but multiple files upload in add/replace mode should be doable, will try it. Or go ahead and do it yourself, it’s a plugin. ;)
Ok, that was my first thoughts but I’ll need to look deeper to see exactly how it works. I understand the Stef point of view and I love the way Textpattern keeps things simple so if this experiment can be easily enhance with plugins that’s great! …And you’re right, I’ll probably try to work on a plugin if the formdata go into the core.
Last edited by NicolasGraph (2016-05-12 11:27:40)
Offline
Offline
Offline
Re: [feedback] Image upload directly in the write tab
Simply amazing Oleg ;)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: [feedback] Image upload directly in the write tab
Merci les gars, that was amazing to do too. I will push it to the master soon, happy plugin writing!
Offline
Re: [feedback] Image upload directly in the write tab
Hi Oleg ;)
I don’t know if that is very difficult: maybe you could add the current article title as a default “alt text” to image. What about multiple images? Better it will be to have a same “alt text” for all different images than nothing at all.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: [feedback] Image upload directly in the write tab
Pat64 wrote #299302:
maybe you could add the current article title as a default “alt text” to image. What about multiple images? Better it will be to have a same “alt text” for all different images than nothing at all.
Hi Patrick,
valid point, thanks. I have updated the code adding image name as alt (see $meta = array('alt' => $file['name']);
line). Feel free to replace it with article title ('alt' => $rs['Title']
) or whatever you want — I don’t know what is the most pertinent choice here.
Offline