Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-05-15 15:56:12

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

bot_file_upload: upload and edit files from within the write tab

When you need to associate files with an article you’ll probably do the same as me: create a custom field called ‘files’ and manually insert file ids in it. Then you call a file list in your artcle with something like:

<txp:file_download_list id='<txp:custom_field name="files" />'  wraptag="ul" break="li">
    <txp:file_download_description/>
</txp:file_download_list>

(or use upm_file for txp versions pre 4.2.0).
This plugin doesen’t change this internally, it just operates at a visual level hiding the custom field and replacing it with an interface which lets you also upload and edit files from within the “write” tab – all without even touching the keyboard.

The plugin is heavily jquery based and basically uses an iframe to add and edit the files.

This plugin is interface-less. It must be configured by modifying plugins code.

Once some files are uploaded/associated with an article bot_file_upload will create a file list just under the ‘title’ field (but can be easily moved in another location)

Download page

Last edited by redbot (2012-12-07 14:16:53)

Offline

#2 2010-05-15 18:09:04

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

Result! Another essential redbot plugin.

:-)

Offline

#3 2010-05-16 21:38:27

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

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

pieman wrote:

Result! Another essential redbot plugin.

Thank you, glad you found it useful :-)

Offline

#4 2010-05-17 03:37:07

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

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

Redbot, I’m really looking forward to testing this out. Should have something to report back soon.
:)

Offline

#5 2010-05-17 15:05:52

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

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

Excellent, you rock man.

Offline

#6 2010-05-19 17:00:35

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

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

hey just tried it out and it integrated with the system i had already set up very well! (it’s the daily creations project on my homepage)

do you think there is a way to remove a file directly from the write tab? you have to go into the menu and uncheck it.

also i have been wondering for a while – is there any way to show a progress bar when uploading in txp?

Last edited by mrtunes (2010-05-19 17:01:05)

Offline

#7 2010-05-19 19:35:42

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

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

mrtunes wrote:

…do you think there is a way to remove a file directly from the write tab? you have to go into the menu and uncheck it.

Er… the plugin should already provide this feature. Have you uploaded the icons provided? On the right side of each file in the file list there should be an “x” like icon (delete) and a “pencil” icon (edit).

…also i have been wondering for a while – is there any way to show a progress bar when uploading in txp?

No, sorry, not really a progress bar (too complicated for me), but again… did you upload the images provided? one of them is a classic “loading” gif

aswihart wrote:

..Excellent, you rock man.

;-) thanx!

Last edited by redbot (2010-05-19 19:38:32)

Offline

#8 2010-05-21 08:13:05

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

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

Result! Another essential redbot plugin.

:)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#9 2010-05-27 17:45:08

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.2 released.
This version doesn’t add new features, just fixes some issues and refines the overall look.

  • File description changes are now immediately shown in the write tab, without the need to reload the page
  • fixed Opera bug (file names didn’t show up)
  • refined look
  • file list is now placed by default under the ‘excerpt’ field (can be configurable anyway)
  • other minor glitches fixed

Offline

#10 2010-07-28 15:14:40

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

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

Hey redbot, just trying this out, but I’m not getting anything on the “Write” tab. I tried disabling bot_wtc with no change. Also tried changing the plugin setting from after ‘excerpt’ to ‘body’. Any idea what could be wrong?

EDIT: Spoke to soon, I just hadn’t made the files custom field, which is obviously needed.

I just ran into the same issue using Remora with the “lightbox” window asking me to login again, and also it has the drop-down Remora menu bar showing at the top inside the lightbox. This seems like the same thing that you smashed out in bot_image_upload, so nothing new here. I will keep playing around and check back later.

Last edited by aswihart (2010-07-28 15:20:47)

Offline

#11 2010-07-28 15:20:54

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

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

Hi, have you set a custom field for files? And secondly, have you changed plugins code accordingly (By default it works with a cf called “files”)?

edit
Oops! too late! Anyway you are right, it has the same issues of bot_image_upload (first version) so you can have a look on that thread to fix them.
I wish I had the time to release a new version but unfortunately it wasn’t the case. I’ll try to do it asap…

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

Offline

#12 2010-07-28 15:58:48

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

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

Yep, the same fixes you mentioned for Remora and bot_image_upload work here, the following changes are needed for those affected:

change line 33 from…

$bot_iframe_url = hu.'textpattern/index.php?event=file';

…to…

$bot_iframe_url = 'index.php?event=file

and change line 144 from…

iframe.find("#pagetop,#end_page").hide();

…to…

iframe.find("#pagetop,#end_page,#nav,#messagepane").hide();

Offline

Board footer

Powered by FluxBB