Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2016-05-11 15:41:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: [feedback] Image upload directly in the write tab

Regarding your edit: ummm, think you need this line:

include_once 'lib'.DS.'class.thumb.php';

in the abc_file_save() function, since it tries to write the thumbnails inside the image_data() function.

There’s actually an argument for adding that line to the image_data() function itself in txplib_misc.php? After all, it’s a dependency in that function. What do you think?


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

Offline

#12 2016-05-11 18:11:39

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

Re: [feedback] Image upload directly in the write tab

Bloke wrote #299060:

Regarding your edit: ummm, think you need this line:

include_once 'lib'.DS.'class.thumb.php';...

in the abc_file_save() function, since it tries to write the thumbnails inside the image_data() function.

Oops, sorry, never used thumbnails, updated.

There’s actually an argument for adding that line to the image_data() function itself in txplib_misc.php? After all, it’s a dependency in that function. What do you think?

Well.. don’t know :)


etc_[ query | search | pagination | date | tree | cache ]

Offline

#13 2016-05-11 18:22:07

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

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.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#14 2016-05-11 19:47:19

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

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

Offline

#15 2016-05-12 10:17:16

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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) from Write 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!


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#16 2016-05-12 10:54:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

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

Offline

#17 2016-05-12 10:57:30

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

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.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#18 2016-05-12 11:27:06

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#19 2016-05-12 14:30:07

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

Re: [feedback] Image upload directly in the write tab

Plugin updated to enable multiple files upload in add/replace mode. I leave further enhancements with image aficionados.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#20 2016-05-12 15:47:46

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: [feedback] Image upload directly in the write tab

etc wrote #299076:

Plugin updated to enable multiple files upload in add/replace mode.

Incredible Oleg… :D


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

Board footer

Powered by FluxBB