Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2010-11-01 22:02:51

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: bot_file_upload: upload and edit files from within the write tab

Hi Redbot

Finally got around to trying this out and while it works a treat on 4.3 RC1, I can’t get it (or bot_image_upload) to work on r3443. The links appear in the write tab, but rather than launching the lightbox, they just hide #pagetop and #end_page.

Tried rolling back to jQuery just incase, but no change. I think there is work in progress in the Write tab so it’s maybe not worth trying to update now (even if you have the time and motivation) but just thought I’d flag it up incase it’s useful.

Stu

Offline

#14 2010-11-01 22:49:48

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_file_upload: upload and edit files from within the write tab

Hi Stuart,
First of all thank you for testing and reporting here. I have a very few spare time these days so I didn’t even tried to run these plugins in last txp versions. Anyways I think you are right in believing it has to do with the recent changes in the ‘write’ tab.
I promise when txp 4.3 will be out I’ll try to make the necessary code changes.
For what concerns bot_file_upload it needed an update anyway. I have a semi-finished version laying on my desktop for months but I can’t find time and concentration to focus on it lately.
I hope I’ll manage to do it in the near future, ok?

Offline

#15 2010-11-01 22:51:32

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: bot_file_upload: upload and edit files from within the write tab

Of course, yep!

Offline

#16 2010-12-03 19:49:51

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_file_upload: upload and edit files from within the write tab

Version 0.3 released.

This version works only for txp 4.3. For txp 4.2 use v. 0.2.

Changes

  • Code partly rewritten – more tidy
  • Page elements are targeted using the hooks provided by the new txp 4.3 html markup – simpler code
  • Different styling – now it looks more like a ‘typical’ modal window with an opacity layer underneath
  • No more need to upload icons – now base64 encoded
  • Css can be customized a lot more easily than before
  • The file-list in the ‘write’ tab is more compact so can be placed virtually anywere (now defaults under the ‘title’ field)
  • File titles are listed insted of descriptions
  • Other minor glitches fixed

Download from first post.

Offline

#17 2010-12-06 10:00:33

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: bot_file_upload: upload and edit files from within the write tab

Thanks for all your work Redbot. Your plugins are standard on my sites.

Offline

#18 2010-12-06 10:18:22

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: bot_file_upload: upload and edit files from within the write tab

Thanks Redbot :)

Offline

#19 2010-12-06 15:55:10

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_file_upload: upload and edit files from within the write tab

jelle + pieman

Thank you.
BTW in a few days – when I’ll be back home – I’ll upload v. 0.3.1 which should help in case you need to sort files in a specific order.

Last edited by redbot (2010-12-06 15:55:28)

Offline

#20 2010-12-06 16:36:59

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: bot_file_upload: upload and edit files from within the write tab

Sorting?! Brilliant.

May I also suggest a simple Cancel button or X on top of the dialog for those cases where the user does not want it’s changed saved.

Last edited by jelle (2010-12-06 16:37:10)

Offline

#21 2010-12-06 17:09:09

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_file_upload: upload and edit files from within the write tab

jelle wrote:

May I also suggest a simple Cancel button or X on top of the dialog for those cases where the user does not want it’s changed saved.

Yes I was suggesting it to myself too.
Unfortunately I wrote the plugin in such a way that the values in the (hidden) custom field are added as soon as a file is checked in the iframe (you can notice it looking throught the opacity layer) so I should rewrite part of the plugin to make it change the values in the cf only when the ‘save’ button is clicked.
Sadly, untill I change the code (probably in some years considering my slowness) you must live with it.
I’ll add it to the todo list though.

Offline

#22 2010-12-09 18:16:22

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_file_upload: upload and edit files from within the write tab

With version 0.4 this plugin should have reached a mature stage.

Changes

  • Now files can be ordered as you like. The file list can then be output in the frontend in the exact order you specified in the backend using the usual <txp:file_download_list /> tag but with an hackish ‘sort’ attribute (this is not really a hack, it’s only an undocumented value )
  • Added a ‘cancel’ button as per Jelle’s suggestion

To list the files in a specific order in the frontend you just need to use the ‘sort’ attribute this way;

sort='field(id, <txp:custom_field name=''your_files_cf_name'' />)'

Of course you must replace ‘your_files_cf_name’ with your real custom field name.

Despite I tried to test it deeply it could be I left something. I count on you all for reporting issues.

Last edited by redbot (2010-12-09 23:13:53)

Offline

#23 2011-03-18 18:15:58

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 585
Website

Re: bot_file_upload: upload and edit files from within the write tab

Quick clarification question: Can this plugin be used with more than one custom field at a time? I have articles that have up to 10 fields that will take file IDs, and I’m looking for a solution so clients don’t have to type in the ID for each field. Thank you.

Offline

#24 2011-03-18 18:29:02

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_file_upload: upload and edit files from within the write tab

maruchan wrote:

Quick clarification question: Can this plugin be used with more than one custom field at a time?

Er… no, sorry.
I promise I’ll try to add this ability to the next version, together with drag-n-drop sorting a la bot_image_upload.
The only issue is I don’t think I’ll have the time in the next few days.

Offline

Board footer

Powered by FluxBB